Some reverted stuff

This commit is contained in:
Michael Vogel 2016-04-03 16:38:32 +02:00 committed by Roland Haeder
parent 4b0506879a
commit c588edd49b
No known key found for this signature in database
GPG key ID: B72F8185C6C7BD78

View file

@ -65,19 +65,13 @@ function add_thread($itemid, $onlyshadow = false) {
require_once("include/Contact.php"); require_once("include/Contact.php");
unset($item[0]['id']); unset($item[0]['id']);
unset($item[0]['shadow']);
$item[0]['uid'] = 0; $item[0]['uid'] = 0;
$item[0]['origin'] = 0; $item[0]['origin'] = 0;
$item[0]['contact-id'] = get_contact($item[0]['author-link'], 0); $item[0]['contact-id'] = get_contact($item[0]['author-link'], 0);
$public_shadow = item_store($item[0], false, false, true); $public_shadow = item_store($item[0], false, false, true);
logger("add_thread: Stored public shadow for post ".$itemid." under id ".$public_shadow, LOGGER_DEBUG); logger("add_thread: Stored public shadow for post ".$itemid." under id ".$public_shadow, LOGGER_DEBUG);
} else }
$public_shadow = $r[0]["id"];
if ($public_shadow > 0)
q("UPDATE `item` SET `shadow` = %d WHERE `id` = %d", intval($public_shadow), intval($itemid));
} }
} }