fix multiple vote issues
This commit is contained in:
parent
b298bc8834
commit
1b17b0193e
@ -303,7 +303,6 @@ function like_content(&$a) {
|
|||||||
$multi_undo = 1;
|
$multi_undo = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$r = q("SELECT id FROM item WHERE verb in ( $verbs ) AND item_restrict = 0
|
$r = q("SELECT id FROM item WHERE verb in ( $verbs ) AND item_restrict = 0
|
||||||
AND author_xchan = '%s' AND ( parent = %d OR thr_parent = '%s') and uid = %d ",
|
AND author_xchan = '%s' AND ( parent = %d OR thr_parent = '%s') and uid = %d ",
|
||||||
dbesc($observer['xchan_hash']),
|
dbesc($observer['xchan_hash']),
|
||||||
@ -316,10 +315,12 @@ function like_content(&$a) {
|
|||||||
// already liked it. Drop that item.
|
// already liked it. Drop that item.
|
||||||
require_once('include/items.php');
|
require_once('include/items.php');
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
drop_item($rr['id'],true,DROPITEM_PHASE1);
|
drop_item($rr['id'],false,DROPITEM_PHASE1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($interactive)
|
if($interactive)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(! $multi_undo)
|
if(! $multi_undo)
|
||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user