config: cleanup

This commit is contained in:
Andrew Dolgov 2011-04-12 19:44:39 +04:00
parent 1849a788cc
commit 61e420e964
3 changed files with 22 additions and 26 deletions

View File

@ -13,14 +13,18 @@
// Full URL of your tt-rss installation. You need to set this option // Full URL of your tt-rss installation. You need to set this option
// correctly for tt-rss to function properly. // correctly for tt-rss to function properly.
define('MAGPIE_FETCH_TIME_OUT', 60); define('SINGLE_USER_MODE', true);
// Magpie's default timeout is 5 seconds. Some RSS feeds, // Operate in single user mode, disables all functionality related to
// such as from large Trac installs, can take significantly // multiple users.
// longer than 5 seconds to generate. To prevent failed
// updates, increase this. define('CACHE_DIR', 'cache');
// Local cache directory for RSS feed content.
define('MAGPIE_CACHE_DIR', 'cache/magpie'); define('SIMPLEPIE_CACHE_IMAGES', false);
// Local cache directory for RSS feeds // Allow caching feed images when using SimplePie, to bypass hotlink
// prevention and such at expense of local disk space and bandwidth.
// Note that you (or your users) also have to enable image caching
// in feed editor.
define('ICONS_DIR', "icons"); define('ICONS_DIR', "icons");
define('ICONS_URL', "icons"); define('ICONS_URL', "icons");
@ -31,10 +35,6 @@
// need to change this and rename icons/ directory if you install tt-rss // need to change this and rename icons/ directory if you install tt-rss
// into website root. // into website root.
define('SINGLE_USER_MODE', true);
// Operate in single user mode, disables all functionality related to
// multiple users.
define('TMP_DIRECTORY', '/tmp'); define('TMP_DIRECTORY', '/tmp');
// Directory for temporary files // Directory for temporary files
@ -88,15 +88,6 @@
// 0 - Magpie // 0 - Magpie
// 1 - SimplePie // 1 - SimplePie
define('SIMPLEPIE_CACHE_DIR', 'cache/simplepie');
// Cache directory for RSS feeds when using SimplePie
define('SIMPLEPIE_CACHE_IMAGES', false);
// Allow caching feed images when using SimplePie, to bypass hotlink
// prevention and such at expense of local disk space and bandwidth.
// Note that you (or your users) also have to enable image caching
// in feed editor.
define('COUNTERS_MAX_AGE', 365); define('COUNTERS_MAX_AGE', 365);
// Hard limit for unread counters calculation. Try tweaking this // Hard limit for unread counters calculation. Try tweaking this
// parameter to speed up tt-rss when having a huge number of articles // parameter to speed up tt-rss when having a huge number of articles
@ -177,7 +168,8 @@
// Please see http://tt-rss.org/wiki/SphinxSearch for more information. // Please see http://tt-rss.org/wiki/SphinxSearch for more information.
define('SPHINX_INDEX', 'ttrss'); define('SPHINX_INDEX', 'ttrss');
// Index name in Sphinx configuration // Index name in Sphinx configuration. You can specify multiple indexes
// as a comma-separated string.
define('ENABLE_TWEET_BUTTON', false); define('ENABLE_TWEET_BUTTON', false);
// Enable 'tweet this' button for articles // Enable 'tweet this' button for articles

View File

@ -611,11 +611,15 @@
define('MAGPIE_CACHE_AGE', get_feed_update_interval($link, $feed) * 60); define('MAGPIE_CACHE_AGE', get_feed_update_interval($link, $feed) * 60);
define('MAGPIE_CACHE_ON', !$no_cache); define('MAGPIE_CACHE_ON', !$no_cache);
define('MAGPIE_FETCH_TIME_OUT', 60);
define('MAGPIE_CACHE_DIR', CACHE_DIR . "/magpie");
$rss = @fetch_rss($fetch_url); $rss = @fetch_rss($fetch_url);
} else { } else {
if (!is_dir(SIMPLEPIE_CACHE_DIR)) { $simplepie_cache_dir = CACHE_DIR . "/simplepie";
mkdir(SIMPLEPIE_CACHE_DIR);
if (!is_dir($simplepie_cache_dir)) {
mkdir($simplepie_cache_dir);
} }
$rss = new SimplePie(); $rss = new SimplePie();
@ -641,7 +645,7 @@
$rss->enable_cache(!$no_cache); $rss->enable_cache(!$no_cache);
if (!$no_cache) { if (!$no_cache) {
$rss->set_cache_location(SIMPLEPIE_CACHE_DIR); $rss->set_cache_location($simplepie_cache_dir);
$rss->set_cache_duration(get_feed_update_interval($link, $feed) * 60); $rss->set_cache_duration(get_feed_update_interval($link, $feed) * 60);
} }

View File

@ -1,3 +1,3 @@
<?php # This file has been generated at: Tue Apr 12 19:32:50 MSD 2011 <?php # This file has been generated at: Tue Apr 12 19:42:38 MSD 2011
define('GENERATED_CONFIG_CHECK', 22); define('GENERATED_CONFIG_CHECK', 22);
$requred_defines = array( 'DB_TYPE', 'DB_HOST', 'DB_USER', 'DB_NAME', 'DB_PASS', 'SELF_URL_PATH', 'MAGPIE_FETCH_TIME_OUT', 'MAGPIE_CACHE_DIR', 'ICONS_DIR', 'ICONS_URL', 'SINGLE_USER_MODE', 'TMP_DIRECTORY', 'DAEMON_SLEEP_INTERVAL', 'DATABASE_BACKED_SESSIONS', 'SESSION_CHECK_ADDRESS', 'SESSION_COOKIE_LIFETIME', 'SESSION_EXPIRE_TIME', 'DAEMON_UPDATE_LOGIN_LIMIT', 'CHECK_FOR_NEW_VERSION', 'DIGEST_ENABLE', 'DIGEST_EMAIL_LIMIT', 'DAEMON_SENDS_DIGESTS', 'MYSQL_CHARSET', 'DEFAULT_UPDATE_METHOD', 'SIMPLEPIE_CACHE_DIR', 'SIMPLEPIE_CACHE_IMAGES', 'COUNTERS_MAX_AGE', 'DIGEST_FROM_NAME', 'DIGEST_FROM_ADDRESS', 'DIGEST_SUBJECT', 'DIGEST_SMTP_HOST', 'DIGEST_SMTP_LOGIN', 'DIGEST_SMTP_PASSWORD', 'DAEMON_FEED_LIMIT', 'ALLOW_REMOTE_USER_AUTH', 'AUTO_LOGIN', 'AUTO_CREATE_USER', 'LOCK_DIRECTORY', 'ENABLE_GZIP_OUTPUT', 'PHP_EXECUTABLE', 'ENABLE_REGISTRATION', 'REG_NOTIFY_ADDRESS', 'REG_MAX_USERS', 'FEEDBACK_URL', 'FORCE_ARTICLE_PURGE', 'SPHINX_ENABLED', 'SPHINX_INDEX', 'ENABLE_TWEET_BUTTON', 'CONSUMER_KEY', 'CONSUMER_SECRET', 'PUBSUBHUBBUB_HUB', 'ISCONFIGURED', 'CONFIG_VERSION'); ?> $requred_defines = array( 'DB_TYPE', 'DB_HOST', 'DB_USER', 'DB_NAME', 'DB_PASS', 'SELF_URL_PATH', 'SINGLE_USER_MODE', 'CACHE_DIR', 'SIMPLEPIE_CACHE_IMAGES', 'ICONS_DIR', 'ICONS_URL', 'TMP_DIRECTORY', 'DAEMON_SLEEP_INTERVAL', 'DATABASE_BACKED_SESSIONS', 'SESSION_CHECK_ADDRESS', 'SESSION_COOKIE_LIFETIME', 'SESSION_EXPIRE_TIME', 'DAEMON_UPDATE_LOGIN_LIMIT', 'CHECK_FOR_NEW_VERSION', 'DIGEST_ENABLE', 'DIGEST_EMAIL_LIMIT', 'DAEMON_SENDS_DIGESTS', 'MYSQL_CHARSET', 'DEFAULT_UPDATE_METHOD', 'COUNTERS_MAX_AGE', 'DIGEST_FROM_NAME', 'DIGEST_FROM_ADDRESS', 'DIGEST_SUBJECT', 'DIGEST_SMTP_HOST', 'DIGEST_SMTP_LOGIN', 'DIGEST_SMTP_PASSWORD', 'DAEMON_FEED_LIMIT', 'ALLOW_REMOTE_USER_AUTH', 'AUTO_LOGIN', 'AUTO_CREATE_USER', 'LOCK_DIRECTORY', 'ENABLE_GZIP_OUTPUT', 'PHP_EXECUTABLE', 'ENABLE_REGISTRATION', 'REG_NOTIFY_ADDRESS', 'REG_MAX_USERS', 'FEEDBACK_URL', 'FORCE_ARTICLE_PURGE', 'SPHINX_ENABLED', 'SPHINX_INDEX', 'ENABLE_TWEET_BUTTON', 'CONSUMER_KEY', 'CONSUMER_SECRET', 'PUBSUBHUBBUB_HUB', 'ISCONFIGURED', 'CONFIG_VERSION'); ?>