aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-03-24 04:16:27 -0700
committerfriendica <info@friendica.com>2012-03-24 04:16:27 -0700
commit3aacc119a1d25f7ab4089482bbba7419c1357524 (patch)
treef915e4e6195aa88073352f50f79cf1c1d676b08b /include
parent8c4fbc3b4d4c578485e7aeb5d7da4b2446002c3a (diff)
downloadvolse-hubzilla-3aacc119a1d25f7ab4089482bbba7419c1357524.tar.gz
volse-hubzilla-3aacc119a1d25f7ab4089482bbba7419c1357524.tar.bz2
volse-hubzilla-3aacc119a1d25f7ab4089482bbba7419c1357524.zip
block filed items from deletion
Diffstat (limited to 'include')
-rwxr-xr-xinclude/diaspora.php4
-rwxr-xr-xinclude/items.php4
2 files changed, 4 insertions, 4 deletions
diff --git a/include/diaspora.php b/include/diaspora.php
index 1b5af42cd..84d28a7ec 100755
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -1737,7 +1737,7 @@ function diaspora_retraction($importer,$xml) {
contact_remove($contact['id']);
}
elseif($type === 'Post') {
- $r = q("select * from item where guid = '%s' and uid = %d limit 1",
+ $r = q("select * from item where guid = '%s' and uid = %d and not file like '%%[%%' limit 1",
dbesc('guid'),
intval($importer['uid'])
);
@@ -1785,7 +1785,7 @@ function diaspora_signed_retraction($importer,$xml,$msg) {
}
if($type === 'StatusMessage') {
- $r = q("select * from item where guid = '%s' and uid = %d limit 1",
+ $r = q("select * from item where guid = '%s' and uid = %d and not file like '%%[%%' limit 1",
dbesc($guid),
intval($importer['uid'])
);
diff --git a/include/items.php b/include/items.php
index b96f88566..49e1ba97a 100755
--- a/include/items.php
+++ b/include/items.php
@@ -1437,7 +1437,7 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
}
if($deleted && is_array($contact)) {
$r = q("SELECT `item`.*, `contact`.`self` FROM `item` left join `contact` on `item`.`contact-id` = `contact`.`id`
- WHERE `uri` = '%s' AND `item`.`uid` = %d AND `contact-id` = %d LIMIT 1",
+ WHERE `uri` = '%s' AND `item`.`uid` = %d AND `contact-id` = %d AND NOT `item`.`file` LIKE '%%[%%' LIMIT 1",
dbesc($uri),
intval($importer['uid']),
intval($contact['id'])
@@ -2038,7 +2038,7 @@ function local_delivery($importer,$data) {
if($deleted) {
$r = q("SELECT `item`.*, `contact`.`self` FROM `item` left join contact on `item`.`contact-id` = `contact`.`id`
- WHERE `uri` = '%s' AND `item`.`uid` = %d AND `contact-id` = %d LIMIT 1",
+ WHERE `uri` = '%s' AND `item`.`uid` = %d AND `contact-id` = %d AND NOT `item`.`file` LIKE '%%[%%' LIMIT 1",
dbesc($uri),
intval($importer['importer_uid']),
intval($importer['id'])