mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 01:35:12 +00:00
don't allow item_id to update without a valid post id
This commit is contained in:
parent
c55d13a836
commit
0826c5fd96
1 changed files with 5 additions and 0 deletions
|
@ -4142,6 +4142,8 @@ function delete_item_lowlevel($item, $stage = DROPITEM_NORMAL, $force = false) {
|
|||
|
||||
$linked_item = (($item['resource_id']) ? true : false);
|
||||
|
||||
logger('item: ' . $item . ' stage: ' . $stage . ' force: ' . $force, LOGGER_DATA);
|
||||
|
||||
switch($stage) {
|
||||
case DROPITEM_PHASE2:
|
||||
$r = q("UPDATE item SET item_restrict = ( item_restrict | %d ), body = '', title = '',
|
||||
|
@ -4742,6 +4744,9 @@ function update_remote_id($channel,$post_id,$webpage,$pagetitle,$namespace,$remo
|
|||
|
||||
$page_type = '';
|
||||
|
||||
if(! $post_id)
|
||||
return;
|
||||
|
||||
if($webpage & ITEM_WEBPAGE)
|
||||
$page_type = 'WEBPAGE';
|
||||
elseif($webpage & ITEM_BUILDBLOCK)
|
||||
|
|
Loading…
Reference in a new issue