aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-05-20 19:18:32 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-05-20 19:18:32 -0700
commit0826c5fd96dfc371620eb0ca6d0781d9539b3b0c (patch)
treea80dcd5974335709273ced29809c07d42a3ad2eb /include/items.php
parentc55d13a836c9f62f6beac97899bc2b3f788c7bcc (diff)
downloadvolse-hubzilla-0826c5fd96dfc371620eb0ca6d0781d9539b3b0c.tar.gz
volse-hubzilla-0826c5fd96dfc371620eb0ca6d0781d9539b3b0c.tar.bz2
volse-hubzilla-0826c5fd96dfc371620eb0ca6d0781d9539b3b0c.zip
don't allow item_id to update without a valid post id
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php
index 245259e38..d0b647a92 100755
--- a/include/items.php
+++ b/include/items.php
@@ -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)