aboutsummaryrefslogtreecommitdiffstats
path: root/include/poller.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-02-06 15:50:50 -0800
committerFriendika <info@friendika.com>2011-02-06 15:50:50 -0800
commit147d7f3bbf6c785f2c1eb7cdcfaa0a47e0ee43d3 (patch)
tree6509082047c27a2de2ab647d4def7051ab6dc813 /include/poller.php
parent8e988341d01de0b061a9d14846c660e7e76d80db (diff)
downloadvolse-hubzilla-147d7f3bbf6c785f2c1eb7cdcfaa0a47e0ee43d3.tar.gz
volse-hubzilla-147d7f3bbf6c785f2c1eb7cdcfaa0a47e0ee43d3.tar.bz2
volse-hubzilla-147d7f3bbf6c785f2c1eb7cdcfaa0a47e0ee43d3.zip
theme name cleanup - rename default to loozah, provide sane fallbacks and change system primary theme.
Provide indication on contact edit page of last update success/failure - can be extended later to show actual timestamp of last successful update.
Diffstat (limited to 'include/poller.php')
-rw-r--r--include/poller.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/include/poller.php b/include/poller.php
index 20c84990e..1d88fe447 100644
--- a/include/poller.php
+++ b/include/poller.php
@@ -239,6 +239,7 @@ function poller_run($argv, $argc){
$xml = post_url($contact['poll'],$postvars);
}
else {
+
// $contact['network'] !== 'dfrn'
$xml = fetch_url($contact['poll']);
@@ -246,8 +247,14 @@ function poller_run($argv, $argc){
logger('poller: received xml : ' . $xml, LOGGER_DATA);
- if(! strlen($xml))
+ if(! strstr($xml,'<?xml')) {
+ logger('poller: post_handshake: response from ' . $url . ' did not contain XML.');
+ $r = q("UPDATE `contact` SET `last-update` = '%s' WHERE `id` = %d LIMIT 1",
+ dbesc(datetime_convert()),
+ intval($contact['id'])
+ );
continue;
+ }
consume_feed($xml,$importer,$contact,$hub,1);
@@ -271,8 +278,11 @@ function poller_run($argv, $argc){
}
- $r = q("UPDATE `contact` SET `last-update` = '%s' WHERE `id` = %d LIMIT 1",
- dbesc(datetime_convert()),
+ $updated = datetime_convert();
+
+ $r = q("UPDATE `contact` SET `last-update` = '%s', `success_update` = '%s' WHERE `id` = %d LIMIT 1",
+ dbesc($updated),
+ dbesc($updated),
intval($contact['id'])
);