aboutsummaryrefslogtreecommitdiffstats
path: root/mod/starred.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-01-22 17:41:16 -0800
committerfriendica <info@friendica.com>2015-01-22 17:41:16 -0800
commite46eba125888704b4381aa8418495e91eeb565c8 (patch)
treed91e1e52560ea27be806f416485d32b831d03ebc /mod/starred.php
parent29436081a86650e7905a79eba4fdf7dc12f1c7c9 (diff)
downloadvolse-hubzilla-e46eba125888704b4381aa8418495e91eeb565c8.tar.gz
volse-hubzilla-e46eba125888704b4381aa8418495e91eeb565c8.tar.bz2
volse-hubzilla-e46eba125888704b4381aa8418495e91eeb565c8.zip
heavy lifting converting item flag bits
Diffstat (limited to 'mod/starred.php')
-rw-r--r--mod/starred.php8
1 files changed, 4 insertions, 4 deletions
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();
}