add option to disable PUSH client support globally (closes #340

master
Andrew Dolgov 14 years ago
parent 3ff6298352
commit 65eebd13f4

@ -178,14 +178,18 @@
// http://twitter.com/oauth_clients to register your instance. // http://twitter.com/oauth_clients to register your instance.
define('PUBSUBHUBBUB_HUB', ''); define('PUBSUBHUBBUB_HUB', '');
// URL to a PubSubHubbub-compatible hub server. If defined, Published // URL to a PubSubHubbub-compatible hub server. If defined, "Published
// articles generated feeds would automatically become PUSH-enabled. // 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); define('ISCONFIGURED', false);
// Please set this to true if you have read everything above and // Please set this to true if you have read everything above and
// finished setting configuration options. // finished setting configuration options.
define('CONFIG_VERSION', 22); define('CONFIG_VERSION', 23);
// Expected config version. Please update this option in config.php // Expected config version. Please update this option in config.php
// if necessary (after migrating all new options from this file). // if necessary (after migrating all new options from this file).

@ -777,7 +777,7 @@
return; // no articles return; // no articles
} }
if ($pubsub_state != 2) { if ($pubsub_state != 2 && PUBSUBHUBBUB_ENABLED) {
if ($debug_enabled) _debug("update_rss_feed: checking for PUSH hub..."); if ($debug_enabled) _debug("update_rss_feed: checking for PUSH hub...");

@ -522,13 +522,14 @@
<button dojoType=\"dijit.form.Button\" onclick='return unsubscribeFeed($feed_id, \"$title\")'>". <button dojoType=\"dijit.form.Button\" onclick='return unsubscribeFeed($feed_id, \"$title\")'>".
__('Unsubscribe')."</button>"; __('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').
print "<button dojoType=\"dijit.form.Button\" id=\"pubsubReset_Btn\" $pubsub_btn_disabled "</button>";
onclick='return resetPubSub($feed_id, \"$title\")'>".__('Resubscribe to push updates'). }
"</button>";
print "</div>"; print "</div>";

@ -1,7 +1,7 @@
<?php <?php
require_once "functions.php"; require_once "functions.php";
define('EXPECTED_CONFIG_VERSION', 22); define('EXPECTED_CONFIG_VERSION', 23);
define('SCHEMA_VERSION', 85); define('SCHEMA_VERSION', 85);
if (!file_exists("config.php")) { if (!file_exists("config.php")) {

@ -1,3 +1,3 @@
<?php # This file has been generated at: Tue Apr 12 19:42:38 MSD 2011 <?php # This file has been generated at: Tue Apr 26 18:40:48 MSD 2011
define('GENERATED_CONFIG_CHECK', 22); 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', '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', 'PUBSUBHUBBUB_ENABLED', 'ISCONFIGURED', 'CONFIG_VERSION'); ?>

Loading…
Cancel
Save