X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fstarred.php;h=ce0c8fc09c658652234aac744d325cfe1edb6d3b;hb=ab5669e09190d05be8bfa62f2b82846631c2409d;hp=5338b6c1decc234e92b78ca4a099c7db06005621;hpb=99aa9bedd04c71f83074bcc2c28be76ab8d90f90;p=friendica.git diff --git a/mod/starred.php b/mod/starred.php index 5338b6c1de..ce0c8fc09c 100644 --- a/mod/starred.php +++ b/mod/starred.php @@ -9,6 +9,7 @@ use Friendica\Model\Item; function starred_init(App $a) { $starred = 0; + $message_id = null; if (! local_user()) { killme(); @@ -32,13 +33,7 @@ function starred_init(App $a) { $starred = 1; } - $r = q("UPDATE `item` SET `starred` = %d WHERE `uid` = %d AND `id` = %d", - intval($starred), - intval(local_user()), - intval($message_id) - ); - - Item::updateThread($message_id); + Item::update(['starred' => $starred], ['id' => $message_id]); // See if we've been passed a return path to redirect to $return_path = ((x($_REQUEST,'return')) ? $_REQUEST['return'] : '');