aboutsummaryrefslogtreecommitdiffstats
path: root/include/api.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/api.php')
-rw-r--r--include/api.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/api.php b/include/api.php
index a99ec8c0d..01518bea8 100644
--- a/include/api.php
+++ b/include/api.php
@@ -370,9 +370,8 @@ require_once('include/items.php');
$countfollowers = $r[0]['count'];
}
- $r = q("SELECT count(`id`) as `count` FROM item where ( item_flags & %d )>0 and uid = %d and item_restrict = 0",
- intval($uinfo[0]['channel_id']),
- intval(ITEM_STARRED)
+ $r = q("SELECT count(`id`) as `count` FROM item where item_starred = 1 and uid = %d and item_restrict = 0",
+ intval($uinfo[0]['channel_id'])
);
$starred = $r[0]['count'];
@@ -1080,7 +1079,7 @@ require_once('include/items.php');
// at the network timeline just mark everything seen.
if (api_user() == $user_info['uid']) {
- $r = q("UPDATE `item` SET item_unseen = 0 where item_unseen = 1 and uid = %d",
+ $r = q("UPDATE item SET item_unseen = 0 WHERE item_unseen = 1 and uid = %d",
intval($user_info['uid'])
);
}
@@ -1787,7 +1786,7 @@ require_once('include/items.php');
'in_reply_to_user_id' => $in_reply_to_user_id,
'in_reply_to_screen_name' => $in_reply_to_screen_name,
'geo' => '',
- 'favorited' => (($item['item_flags'] & ITEM_STARRED) ? true : false),
+ 'favorited' => (intval($item['item_starred']) ? true : false),
'user' => $status_user ,
'statusnet_html' => trim(prepare_text($item['body'],$item['mimetype'])),