Many item calls are now isolated in a single function

This commit is contained in:
Michael 2018-02-06 12:40:22 +00:00
commit e609de2957
23 changed files with 161 additions and 387 deletions

View file

@ -32,13 +32,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'] : '');