1
0
Fork 0

Standards

This commit is contained in:
Michael 2018-01-16 23:20:07 +00:00
parent f30275f6db
commit 3ecdbb6a59

View file

@ -14,6 +14,7 @@ use dba;
require_once 'include/tags.php';
require_once 'include/threads.php';
require_once 'include/items.php';
class Item
{
@ -122,13 +123,11 @@ class Item
$item = dba::selectFirst('item', [], ['id' => $itemid]);
if (count($item) && ($item["allow_cid"] == '') && ($item["allow_gid"] == '') &&
if (DBM::is_result($item) && ($item["allow_cid"] == '') && ($item["allow_gid"] == '') &&
($item["deny_cid"] == '') && ($item["deny_gid"] == '')) {
if (!dba::exists('item', ['uri' => $item['uri'], 'uid' => 0])) {
// Preparing public shadow (removing user specific data)
require_once("include/items.php");
unset($item['id']);
$item['uid'] = 0;
$item['origin'] = 0;
@ -183,8 +182,6 @@ class Item
}
// Preparing public shadow (removing user specific data)
require_once("include/items.php");
unset($item['id']);
$item['uid'] = 0;
$item['origin'] = 0;