summaryrefslogtreecommitdiff
path: root/backend.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-04-17 16:23:15 +0400
committerAndrew Dolgov <[email protected]>2013-04-17 16:48:41 +0400
commit6322ac79a020ab584d412d782d62b2ee77d7c6cf (patch)
treeb2e64a140a3bc9d9ce649ee67f8a687b6511d9f4 /backend.php
parentaca75cb5cb323535099c7aef46a78ea3cec082f2 (diff)
remove $link
Diffstat (limited to 'backend.php')
-rw-r--r--backend.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/backend.php b/backend.php
index b583d379e..b06cca2d2 100644
--- a/backend.php
+++ b/backend.php
@@ -50,7 +50,7 @@
$link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
- if (!init_plugins($link)) return;
+ if (!init_plugins()) return;
header("Content-Type: text/json; charset=utf-8");
@@ -59,16 +59,16 @@
}
if (SINGLE_USER_MODE) {
- authenticate_user($link, "admin", null);
+ authenticate_user( "admin", null);
}
if ($_SESSION["uid"]) {
- if (!validate_session($link)) {
+ if (!validate_session()) {
header("Content-Type: text/json");
print json_encode(array("error" => array("code" => 6)));
return;
}
- load_user_plugins($link, $_SESSION["uid"]);
+ load_user_plugins( $_SESSION["uid"]);
}
$purge_intervals = array(
@@ -106,7 +106,7 @@
5 => __("Power User"),
10 => __("Administrator"));
- #$error = sanity_check($link);
+ #$error = sanity_check();
#if ($error['code'] != 0 && $op != "logout") {
# print json_encode(array("error" => $error));
@@ -123,7 +123,7 @@
if ($override) {
$handler = $override;
} else {
- $handler = new $op($link, $_REQUEST);
+ $handler = new $op(Db::get(), $_REQUEST);
}
if ($handler && implements_interface($handler, 'IHandler')) {
@@ -155,5 +155,5 @@
print json_encode(array("error" => array("code" => 7)));
// We close the connection to database.
- db_close($link);
+ db_close();
?>