diff options
author | Andrew Dolgov <[email protected]> | 2011-11-07 10:21:18 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2011-11-07 10:21:18 +0400 |
commit | 8ad4bac0fd44220528896d8b5fedbb84220b1ea4 (patch) | |
tree | bf5729885a96772c3899a7f040602977cdc2a09f | |
parent | 823da71a1036e20d3e34de3aa1930026d0b6c8c5 (diff) |
api: always chdir() to base directory (refs #375)
-rw-r--r-- | api/index.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/api/index.php b/api/index.php index f6e1cb79f..4a5c1bb31 100644 --- a/api/index.php +++ b/api/index.php @@ -10,6 +10,8 @@ define('API_STATUS_OK', 0); define('API_STATUS_ERR', 1); + chdir(".."); + if (defined('ENABLE_GZIP_OUTPUT') && ENABLE_GZIP_OUTPUT) { ob_start("ob_gzhandler"); } @@ -154,8 +156,6 @@ $limit = (int) db_escape_string($_REQUEST["limit"]); $offset = (int) db_escape_string($_REQUEST["offset"]); - chdir(".."); // so feed_has_icon() would work properly for relative ICONS_DIR - $feeds = api_get_feeds($link, $cat_id, $unread_only, $limit, $offset); print api_wrap_reply(API_STATUS_OK, $seq, $feeds); |