From e46eba125888704b4381aa8418495e91eeb565c8 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 22 Jan 2015 17:41:16 -0800 Subject: heavy lifting converting item flag bits --- mod/starred.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mod/starred.php') diff --git a/mod/starred.php b/mod/starred.php index 05b45bea3..931b24a71 100644 --- a/mod/starred.php +++ b/mod/starred.php @@ -19,15 +19,15 @@ function starred_init(&$a) { if(! count($r)) killme(); - $item_flags = ( $r[0]['item_flags'] ^ ITEM_STARRED ); + $item_starred = (intval($r[0]['item_starred']) ? 0 : 1); - $r = q("UPDATE item SET item_flags = %d WHERE uid = %d and id = %d", - intval($item_flags), + $r = q("UPDATE item SET item_starred = %d WHERE uid = %d and id = %d", + intval($item_starred), intval(local_user()), intval($message_id) ); header('Content-type: application/json'); - echo json_encode(array('result' => (($item_flags & ITEM_STARRED) ? 1 : 0))); + echo json_encode(array('result' => $item_starred)); killme(); } -- cgit v1.2.3