diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-09-30 21:38:21 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-09-30 21:38:21 -0700 |
commit | 986244eeeadd1ca18daf8f9337424bc5e7410389 (patch) | |
tree | 4196acd988739fb9ef0d8b73e9caa7f85fd2d471 | |
parent | 526bc36b40abb5911f74228fa4445e11c68d4f9f (diff) | |
download | volse-hubzilla-986244eeeadd1ca18daf8f9337424bc5e7410389.tar.gz volse-hubzilla-986244eeeadd1ca18daf8f9337424bc5e7410389.tar.bz2 volse-hubzilla-986244eeeadd1ca18daf8f9337424bc5e7410389.zip |
issue #63 - missing table fields in db query
-rw-r--r-- | include/zot.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/zot.php b/include/zot.php index 2f04cca1b..942490551 100644 --- a/include/zot.php +++ b/include/zot.php @@ -1960,8 +1960,7 @@ function delete_imported_item($sender, $item, $uid, $relay) { $item_found = false; $post_id = 0; - - $r = q("select id, item_deleted from item where ( author_xchan = '%s' or owner_xchan = '%s' or source_xchan = '%s' ) + $r = q("select id, author_xchan, owner_xchan, source_xchan, item_deleted from item where ( author_xchan = '%s' or owner_xchan = '%s' or source_xchan = '%s' ) and mid = '%s' and uid = %d limit 1", dbesc($sender['hash']), dbesc($sender['hash']), @@ -1969,6 +1968,7 @@ function delete_imported_item($sender, $item, $uid, $relay) { dbesc($item['mid']), intval($uid) ); + if ($r) { if ($r[0]['author_xchan'] === $sender['hash'] || $r[0]['owner_xchan'] === $sender['hash'] || $r[0]['source_xchan'] === $sender['hash']) $ownership_valid = true; |