diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/functions.php | 50 | ||||
-rwxr-xr-x | include/login_form.php | 4 | ||||
-rwxr-xr-x | include/sanity_check.php | 4 |
3 files changed, 5 insertions, 53 deletions
diff --git a/include/functions.php b/include/functions.php index 526c6058a..59c824e43 100644 --- a/include/functions.php +++ b/include/functions.php @@ -5,12 +5,6 @@ define('LABEL_BASE_INDEX', -1024); define('PLUGIN_FEED_BASE_INDEX', -128); - define('COOKIE_LIFETIME_LONG', 86400*365); - - // this CSS file is included for everyone (if it exists in themes.local) - // on login, registration, and main (index and prefs) pages - define('LOCAL_OVERRIDE_STYLESHEET', '.local-overrides.css'); - $fetch_last_error = false; $fetch_last_error_code = false; $fetch_last_content_type = false; @@ -37,49 +31,7 @@ ini_set('display_errors', "false"); ini_set('display_startup_errors', "false"); - require_once 'config.php'; - - /* Some tunables you can override in config.php using define(): */ - - if (!defined('FEED_FETCH_TIMEOUT')) define('FEED_FETCH_TIMEOUT', 45); - // How may seconds to wait for response when requesting feed from a site - if (!defined('FEED_FETCH_NO_CACHE_TIMEOUT')) define('FEED_FETCH_NO_CACHE_TIMEOUT', 15); - // How may seconds to wait for response when requesting feed from a - // site when that feed wasn't cached before - if (!defined('FILE_FETCH_TIMEOUT')) define('FILE_FETCH_TIMEOUT', 45); - // Default timeout when fetching files from remote sites - if (!defined('FILE_FETCH_CONNECT_TIMEOUT')) define('FILE_FETCH_CONNECT_TIMEOUT', 15); - // How many seconds to wait for initial response from website when - // fetching files from remote sites - if (!defined('DAEMON_UPDATE_LOGIN_LIMIT')) define('DAEMON_UPDATE_LOGIN_LIMIT', 30); - // stop updating feeds if users haven't logged in for X days - if (!defined('DAEMON_FEED_LIMIT')) define('DAEMON_FEED_LIMIT', 500); - // feed limit for one update batch - if (!defined('DAEMON_SLEEP_INTERVAL')) define('DAEMON_SLEEP_INTERVAL', 120); - // default sleep interval between feed updates (sec) - if (!defined('MAX_CACHE_FILE_SIZE')) define('MAX_CACHE_FILE_SIZE', 64*1024*1024); - // do not cache files larger than that (bytes) - if (!defined('MAX_DOWNLOAD_FILE_SIZE')) define('MAX_DOWNLOAD_FILE_SIZE', 16*1024*1024); - // do not download general files larger than that (bytes) - if (!defined('MAX_FAVICON_FILE_SIZE')) define('MAX_FAVICON_FILE_SIZE', 1*1024*1024); - // do not download favicon files larger than that (bytes) - if (!defined('CACHE_MAX_DAYS')) define('CACHE_MAX_DAYS', 7); - // max age in days for various automatically cached (temporary) files - if (!defined('MAX_CONDITIONAL_INTERVAL')) define('MAX_CONDITIONAL_INTERVAL', 3600*12); - // max interval between forced unconditional updates for servers - // not complying with http if-modified-since (seconds) - // if (!defined('MAX_FETCH_REQUESTS_PER_HOST')) define('MAX_FETCH_REQUESTS_PER_HOST', 25); - // a maximum amount of allowed HTTP requests per destination host - // during a single update (i.e. within PHP process lifetime) - // this is used to not cause excessive load on the origin server on - // e.g. feed subscription when all articles are being processes - // (not implemented) - if (!defined('DAEMON_UNSUCCESSFUL_DAYS_LIMIT')) define('DAEMON_UNSUCCESSFUL_DAYS_LIMIT', 30); - // automatically disable updates for feeds which failed to - // update for this amount of days; 0 disables - - /* tunables end here */ - + require_once "config.php"; require_once "autoload.php"; if (Config::get(Config::DB_TYPE) == "pgsql") { diff --git a/include/login_form.php b/include/login_form.php index 537c7f994..168fe50aa 100755 --- a/include/login_form.php +++ b/include/login_form.php @@ -16,8 +16,8 @@ } ?> - <?php if (theme_exists(LOCAL_OVERRIDE_STYLESHEET)) { - echo stylesheet_tag(get_theme_path(LOCAL_OVERRIDE_STYLESHEET)); + <?php if (theme_exists(Config::get(Config::LOCAL_OVERRIDE_STYLESHEET))) { + echo stylesheet_tag(get_theme_path(Config::get(Config::LOCAL_OVERRIDE_STYLESHEET))); } ?> <style type="text/css"> diff --git a/include/sanity_check.php b/include/sanity_check.php index 5efd23d98..4831209ba 100755 --- a/include/sanity_check.php +++ b/include/sanity_check.php @@ -103,8 +103,8 @@ } } - if (!is_writable(ICONS_DIR)) { - array_push($errors, "ICONS_DIR defined in config.php is not writable (chmod -R 777 ".ICONS_DIR.").\n"); + if (!is_writable(Config::get(Config::ICONS_DIR))) { + array_push($errors, "ICONS_DIR defined in config.php is not writable (chmod -R 777 ".Config::get(Config::ICONS_DIR).").\n"); } if (!is_writable(Config::get(Config::LOCK_DIRECTORY))) { |