From: Andrew Dolgov Date: Tue, 3 Feb 2015 11:46:51 +0000 (+0300) Subject: add config option CHECK_FOR_UPDATES X-Git-Tag: 16.3~362 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=4ca621a36016de1fbb5447e1c1de0b607ba94a7c;p=tt-rss.git add config option CHECK_FOR_UPDATES --- diff --git a/config.php-dist b/config.php-dist index d821329d..c0729b61 100644 --- a/config.php-dist +++ b/config.php-dist @@ -177,6 +177,9 @@ // *** Other settings (less important) *** // *************************************** + define('CHECK_FOR_UPDATES', true); + // Check for updates automatically if running Git version + define('DETECT_ARTICLE_LANGUAGE', false); // Detect article language when updating feeds, presently this is only // used for hyphenation. This may increase amount of CPU time used by diff --git a/include/functions2.php b/include/functions2.php index 75f9bebd..17d8acb3 100644 --- a/include/functions2.php +++ b/include/functions2.php @@ -242,7 +242,7 @@ $data['reload_on_ts_change'] = !defined('_NO_RELOAD_ON_TS_CHANGE'); - if ($_SESSION["last_version_check"] + 86400 + rand(-1000, 1000) < time()) { + if (CHECK_FOR_UPDATES && $_SESSION["last_version_check"] + 86400 + rand(-1000, 1000) < time()) { $update_result = @check_for_update(); $data["update_result"] = $update_result; diff --git a/include/sanity_config.php b/include/sanity_config.php index 890c0c05..6120e5fe 100644 --- a/include/sanity_config.php +++ b/include/sanity_config.php @@ -1,3 +1,3 @@ - +$requred_defines = array( 'DB_TYPE', 'DB_HOST', 'DB_USER', 'DB_NAME', 'DB_PASS', 'MYSQL_CHARSET', 'SELF_URL_PATH', 'FEED_CRYPT_KEY', 'SINGLE_USER_MODE', 'SIMPLE_UPDATE_MODE', 'PHP_EXECUTABLE', 'LOCK_DIRECTORY', 'CACHE_DIR', 'ICONS_DIR', 'ICONS_URL', 'AUTH_AUTO_CREATE', 'AUTH_AUTO_LOGIN', 'FORCE_ARTICLE_PURGE', 'PUBSUBHUBBUB_HUB', 'PUBSUBHUBBUB_ENABLED', 'SPHINX_SERVER', 'SPHINX_INDEX', 'ENABLE_REGISTRATION', 'REG_NOTIFY_ADDRESS', 'REG_MAX_USERS', 'SESSION_COOKIE_LIFETIME', 'SESSION_CHECK_ADDRESS', 'SMTP_FROM_NAME', 'SMTP_FROM_ADDRESS', 'DIGEST_SUBJECT', 'SMTP_SERVER', 'SMTP_LOGIN', 'SMTP_PASSWORD', 'SMTP_SECURE', 'CHECK_FOR_UPDATES', 'DETECT_ARTICLE_LANGUAGE', 'ENABLE_GZIP_OUTPUT', 'PLUGINS', 'LOG_DESTINATION', 'CONFIG_VERSION'); ?>