diff --git a/include/items.php b/include/items.php index 0c9d4cfc2e..bbd9fbb7c9 100644 --- a/include/items.php +++ b/include/items.php @@ -740,10 +740,10 @@ function item_store($arr,$force_parent = false) { return 0; } - if($arr['parent-uri'] === $arr['uri']) + if((! $parent_id) || ($arr['parent-uri'] === $arr['uri'])) $parent_id = $current_post; - - if(strlen($allow_cid) || strlen($allow_gid) || strlen($deny_cid) || strlen($deny_gid)) + + if(strlen($allow_cid) || strlen($allow_gid) || strlen($deny_cid) || strlen($deny_gid)) $private = 1; else $private = $arr['private']; diff --git a/mod/item.php b/mod/item.php index 7125ae1f49..38ef580af7 100644 --- a/mod/item.php +++ b/mod/item.php @@ -1,11 +1,17 @@ get_baseurl() . "/" . $_POST['return'] ); + // NOTREACHED + } $php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php'); @@ -454,10 +466,8 @@ function item_post(&$a) { } } - - goaway($a->get_baseurl() . "/" . $_POST['return'] ); - return; // NOTREACHED + // NOTREACHED } @@ -551,7 +561,7 @@ function item_content(&$a) { proc_run($php_path,"include/notifier.php","drop","$drop_id"); goaway($a->get_baseurl() . '/' . $_SESSION['return_url']); - return; //NOTREACHED + //NOTREACHED } else { notice( t('Permission denied.') . EOL);