aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-06-28 16:04:00 -0700
committerfriendica <info@friendica.com>2012-06-28 16:04:00 -0700
commitde93c61e0de2c4bd9c48ba15aae4855ddfabd0d5 (patch)
tree193a75b427bb1aa4985c973ca1426849b0163edb /include
parent04397865f93a65555a30d57339b6d2853b5c2bfd (diff)
downloadvolse-hubzilla-de93c61e0de2c4bd9c48ba15aae4855ddfabd0d5.tar.gz
volse-hubzilla-de93c61e0de2c4bd9c48ba15aae4855ddfabd0d5.tar.bz2
volse-hubzilla-de93c61e0de2c4bd9c48ba15aae4855ddfabd0d5.zip
remove titles in ostatus even when edited date differs from created date
Diffstat (limited to 'include')
-rwxr-xr-xinclude/items.php40
1 files changed, 22 insertions, 18 deletions
diff --git a/include/items.php b/include/items.php
index 1f0571968..7d3ed4fa9 100755
--- a/include/items.php
+++ b/include/items.php
@@ -1660,6 +1660,21 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
continue;
}
+ $force_parent = false;
+ if($contact['network'] === NETWORK_OSTATUS || stristr($contact['url'],'twitter.com')) {
+ if($contact['network'] === NETWORK_OSTATUS)
+ $force_parent = true;
+ if(strlen($datarray['title']))
+ unset($datarray['title']);
+ $r = q("UPDATE `item` SET `last-child` = 0, `changed` = '%s' WHERE `parent-uri` = '%s' AND `uid` = %d",
+ dbesc(datetime_convert()),
+ dbesc($parent_uri),
+ intval($importer['uid'])
+ );
+ $datarray['last-child'] = 1;
+ }
+
+
$r = q("SELECT `uid`, `last-child`, `edited`, `body` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
dbesc($item_id),
intval($importer['uid'])
@@ -1703,19 +1718,6 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
continue;
}
- $force_parent = false;
- if($contact['network'] === NETWORK_OSTATUS || stristr($contact['url'],'twitter.com')) {
- if($contact['network'] === NETWORK_OSTATUS)
- $force_parent = true;
- if(strlen($datarray['title']))
- unset($datarray['title']);
- $r = q("UPDATE `item` SET `last-child` = 0, `changed` = '%s' WHERE `parent-uri` = '%s' AND `uid` = %d",
- dbesc(datetime_convert()),
- dbesc($parent_uri),
- intval($importer['uid'])
- );
- $datarray['last-child'] = 1;
- }
if(($contact['network'] === NETWORK_FEED) || (! strlen($contact['notify']))) {
// one way feed - no remote comment ability
@@ -1813,6 +1815,13 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
}
}
+ if($contact['network'] === NETWORK_OSTATUS || stristr($contact['url'],'twitter.com')) {
+ if(strlen($datarray['title']))
+ unset($datarray['title']);
+ $datarray['last-child'] = 1;
+ }
+
+
$r = q("SELECT `uid`, `last-child`, `edited`, `body` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
dbesc($item_id),
intval($importer['uid'])
@@ -1875,11 +1884,6 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
if(! is_array($contact))
return;
- if($contact['network'] === NETWORK_OSTATUS || stristr($contact['url'],'twitter.com')) {
- if(strlen($datarray['title']))
- unset($datarray['title']);
- $datarray['last-child'] = 1;
- }
if(($contact['network'] === NETWORK_FEED) || (! strlen($contact['notify']))) {
// one way feed - no remote comment ability