Revert "subscribe_to_feed: use already fetched data when updating initially"
This reverts commit 23923fb29b
.
This commit is contained in:
parent
74a8b2f6f1
commit
fd687300bf
|
@ -1661,7 +1661,7 @@
|
||||||
$feed_id = db_fetch_result($result, 0, "id");
|
$feed_id = db_fetch_result($result, 0, "id");
|
||||||
|
|
||||||
if ($feed_id) {
|
if ($feed_id) {
|
||||||
update_rss_feed($feed_id, false, false, false, $contents);
|
update_rss_feed($feed_id, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return array("code" => 1);
|
return array("code" => 1);
|
||||||
|
|
|
@ -191,7 +191,7 @@
|
||||||
|
|
||||||
// ignore_daemon is not used
|
// ignore_daemon is not used
|
||||||
function update_rss_feed($feed, $ignore_daemon = false, $no_cache = false,
|
function update_rss_feed($feed, $ignore_daemon = false, $no_cache = false,
|
||||||
$override_url = false, $override_data = false) {
|
$override_url = false) {
|
||||||
|
|
||||||
$debug_enabled = defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug'];
|
$debug_enabled = defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug'];
|
||||||
|
|
||||||
|
@ -251,11 +251,7 @@
|
||||||
|
|
||||||
$force_refetch = isset($_REQUEST["force_refetch"]);
|
$force_refetch = isset($_REQUEST["force_refetch"]);
|
||||||
|
|
||||||
if ($override_data) {
|
if (file_exists($cache_filename) &&
|
||||||
$feed_data = $override_data;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$feed_data && file_exists($cache_filename) &&
|
|
||||||
is_readable($cache_filename) &&
|
is_readable($cache_filename) &&
|
||||||
!$auth_login && !$auth_pass &&
|
!$auth_login && !$auth_pass &&
|
||||||
filemtime($cache_filename) > time() - 30) {
|
filemtime($cache_filename) > time() - 30) {
|
||||||
|
@ -272,6 +268,8 @@
|
||||||
_debug("local cache will not be used for this feed", $debug_enabled);
|
_debug("local cache will not be used for this feed", $debug_enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$rss) {
|
||||||
|
|
||||||
if (!$feed_data) {
|
if (!$feed_data) {
|
||||||
_debug("fetching [$fetch_url]...", $debug_enabled);
|
_debug("fetching [$fetch_url]...", $debug_enabled);
|
||||||
_debug("If-Modified-Since: ".gmdate('D, d M Y H:i:s \G\M\T', $last_article_timestamp), $debug_enabled);
|
_debug("If-Modified-Since: ".gmdate('D, d M Y H:i:s \G\M\T', $last_article_timestamp), $debug_enabled);
|
||||||
|
@ -333,6 +331,7 @@
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$pluginhost = new PluginHost();
|
$pluginhost = new PluginHost();
|
||||||
$pluginhost->set_debug($debug_enabled);
|
$pluginhost->set_debug($debug_enabled);
|
||||||
|
|
Loading…
Reference in New Issue