diff options
-rw-r--r-- | config.php-dist | 10 | ||||
-rw-r--r-- | functions.php | 2 | ||||
-rw-r--r-- | modules/pref-feeds.php | 13 | ||||
-rw-r--r-- | sanity_check.php | 2 | ||||
-rw-r--r-- | sanity_config.php | 6 |
5 files changed, 19 insertions, 14 deletions
diff --git a/config.php-dist b/config.php-dist index 301b8856c..6ebcc1a11 100644 --- a/config.php-dist +++ b/config.php-dist @@ -178,14 +178,18 @@ // http://twitter.com/oauth_clients to register your instance. define('PUBSUBHUBBUB_HUB', ''); - // URL to a PubSubHubbub-compatible hub server. If defined, Published - // articles generated feeds would automatically become PUSH-enabled. + // URL to a PubSubHubbub-compatible hub server. If defined, "Published + // articles" generated feed would automatically become PUSH-enabled. + + define('PUBSUBHUBBUB_ENABLED', true); + // Enable client PubSubHubbub support in tt-rss. When disabled, tt-rss + // won't try to subscribe to PUSH feed updates. define('ISCONFIGURED', false); // Please set this to true if you have read everything above and // finished setting configuration options. - define('CONFIG_VERSION', 22); + define('CONFIG_VERSION', 23); // Expected config version. Please update this option in config.php // if necessary (after migrating all new options from this file). diff --git a/functions.php b/functions.php index aa50433e3..79318dc68 100644 --- a/functions.php +++ b/functions.php @@ -777,7 +777,7 @@ return; // no articles } - if ($pubsub_state != 2) { + if ($pubsub_state != 2 && PUBSUBHUBBUB_ENABLED) { if ($debug_enabled) _debug("update_rss_feed: checking for PUSH hub..."); diff --git a/modules/pref-feeds.php b/modules/pref-feeds.php index 794916c87..5a65b0dd5 100644 --- a/modules/pref-feeds.php +++ b/modules/pref-feeds.php @@ -522,13 +522,14 @@ <button dojoType=\"dijit.form.Button\" onclick='return unsubscribeFeed($feed_id, \"$title\")'>". __('Unsubscribe')."</button>"; - $pubsub_state = db_fetch_result($result, 0, "pubsub_state"); + if (PUBSUBHUBBUB_ENABLED) { + $pubsub_state = db_fetch_result($result, 0, "pubsub_state"); + $pubsub_btn_disabled = ($pubsub_state == 2) ? "" : "disabled=\"1\""; - $pubsub_btn_disabled = ($pubsub_state == 2) ? "" : "disabled=\"1\""; - - print "<button dojoType=\"dijit.form.Button\" id=\"pubsubReset_Btn\" $pubsub_btn_disabled - onclick='return resetPubSub($feed_id, \"$title\")'>".__('Resubscribe to push updates'). - "</button>"; + print "<button dojoType=\"dijit.form.Button\" id=\"pubsubReset_Btn\" $pubsub_btn_disabled + onclick='return resetPubSub($feed_id, \"$title\")'>".__('Resubscribe to push updates'). + "</button>"; + } print "</div>"; diff --git a/sanity_check.php b/sanity_check.php index 89f1b3459..930d68e00 100644 --- a/sanity_check.php +++ b/sanity_check.php @@ -1,7 +1,7 @@ <?php require_once "functions.php"; - define('EXPECTED_CONFIG_VERSION', 22); + define('EXPECTED_CONFIG_VERSION', 23); define('SCHEMA_VERSION', 85); if (!file_exists("config.php")) { diff --git a/sanity_config.php b/sanity_config.php index dcc3f6e73..51c9d52be 100644 --- a/sanity_config.php +++ b/sanity_config.php @@ -1,3 +1,3 @@ -<?php # This file has been generated at: Tue Apr 12 19:42:38 MSD 2011 -define('GENERATED_CONFIG_CHECK', 22); -$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'); ?> +<?php # This file has been generated at: Tue Apr 26 18:40:48 MSD 2011 +define('GENERATED_CONFIG_CHECK', 23); +$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', 'PUBSUBHUBBUB_ENABLED', 'ISCONFIGURED', 'CONFIG_VERSION'); ?> |