Merge branch 'master' of https://github.com/redmatrix/redmatrix
This commit is contained in:
commit
d63bcde6e2
@ -91,10 +91,11 @@ function impel_init(&$a) {
|
|||||||
dbesc($namespace),
|
dbesc($namespace),
|
||||||
intval(local_channel())
|
intval(local_channel())
|
||||||
);
|
);
|
||||||
$i = q("select id from item where mid = '%s' and uid = %d limit 1",
|
$i = q("select id, item_restrict from item where mid = '%s' and uid = %d limit 1",
|
||||||
dbesc($arr['mid']),
|
dbesc($arr['mid']),
|
||||||
intval(local_channel())
|
intval(local_channel())
|
||||||
);
|
);
|
||||||
|
|
||||||
if($z && $i) {
|
if($z && $i) {
|
||||||
$remote_id = $z[0]['id'];
|
$remote_id = $z[0]['id'];
|
||||||
$arr['id'] = $i[0]['id'];
|
$arr['id'] = $i[0]['id'];
|
||||||
@ -103,6 +104,13 @@ function impel_init(&$a) {
|
|||||||
$x = item_store_update($arr,$execflag);
|
$x = item_store_update($arr,$execflag);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
if(($i) && ($i[0]['item_restrict'] & ITEM_DELETED)) {
|
||||||
|
// was partially deleted already, finish it off
|
||||||
|
q("delete from item where mid = '%s' and uid = %d",
|
||||||
|
dbesc($arr['mid']),
|
||||||
|
intval(local_channel())
|
||||||
|
);
|
||||||
|
}
|
||||||
$x = item_store($arr,$execflag);
|
$x = item_store($arr,$execflag);
|
||||||
}
|
}
|
||||||
if($x['success'])
|
if($x['success'])
|
||||||
|
Reference in New Issue
Block a user