diff options
author | Andrew Dolgov <[email protected]> | 2013-05-07 15:36:14 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-05-07 15:36:14 +0400 |
commit | 82076ce53113be9cc053f8740356e7e1b81e5643 (patch) | |
tree | 5eba36805f593ec7dd0aad671b5bcca0ae01cf53 /api/index.php | |
parent | 66af65f14b4f3c670bb3f9ca7b1c80081f9281d1 (diff) | |
parent | 23923fb29b345c1eea5b70a6df4d30395425bf37 (diff) |
Merge branch 'master' into css-feedtree-counter
Conflicts:
tt-rss.css
Diffstat (limited to 'api/index.php')
-rw-r--r-- | api/index.php | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/api/index.php b/api/index.php index 53b78b010..facdf82c5 100644 --- a/api/index.php +++ b/api/index.php @@ -13,6 +13,7 @@ define('TTRSS_SESSION_NAME', 'ttrss_api_sid'); define('NO_SESSION_AUTOSTART', true); + require_once "autoload.php"; require_once "db.php"; require_once "db-prefs.php"; require_once "functions.php"; @@ -30,8 +31,6 @@ ob_start(); } - $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME); - $input = file_get_contents("php://input"); if (defined('_API_DEBUG_HTTP_ENABLED') && _API_DEBUG_HTTP_ENABLED) { @@ -54,11 +53,11 @@ @session_start(); } - if (!init_connection($link)) return; + if (!init_plugins()) return; $method = strtolower($_REQUEST["op"]); - $handler = new API($link, $_REQUEST); + $handler = new API($_REQUEST); if ($handler->before($method)) { if ($method && method_exists($handler, $method)) { @@ -69,8 +68,6 @@ $handler->after(); } - db_close($link); - header("Api-Content-Length: " . ob_get_length()); ob_end_flush(); |