aboutsummaryrefslogtreecommitdiffstats
path: root/include/api.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-06-23 19:45:39 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-06-23 19:45:39 -0700
commitcb76fb8b9b659c4ec06e359f375a35a534927b99 (patch)
treecb5a77aa95ea6e510e9e1ccb33238d6de0957ec7 /include/api.php
parent833098e3460e0a2c7fbffaa59163af815f419e68 (diff)
downloadvolse-hubzilla-cb76fb8b9b659c4ec06e359f375a35a534927b99.tar.gz
volse-hubzilla-cb76fb8b9b659c4ec06e359f375a35a534927b99.tar.bz2
volse-hubzilla-cb76fb8b9b659c4ec06e359f375a35a534927b99.zip
item flag fixes discovered after a few merges
Diffstat (limited to 'include/api.php')
-rw-r--r--include/api.php17
1 files changed, 7 insertions, 10 deletions
diff --git a/include/api.php b/include/api.php
index effaa4484..e72344ff7 100644
--- a/include/api.php
+++ b/include/api.php
@@ -1547,8 +1547,8 @@ require_once('include/items.php');
}
$item = q("SELECT * FROM item WHERE id = %d AND uid = %d",
- intval($itemid),
- intval(api_user())
+ intval($itemid),
+ intval(api_user())
);
if (! $item)
@@ -1556,19 +1556,16 @@ require_once('include/items.php');
switch($action){
case "create":
-
- $flags = $item[0]['item_flags'] | ITEM_STARRED;
-
+ $flags = $item[0]['item_starred'] = 1;
break;
case "destroy":
-
- $flags = $item[0]['item_flags'] | (~ ITEM_STARRED);
+ $flags = $item[0]['item_starred'] = 0;
break;
default:
return false;
}
- $r = q("UPDATE item SET item_flags = %d where id = %d and uid = %d",
+ $r = q("UPDATE item SET item_starred = %d where id = %d and uid = %d",
intval($flags),
intval($itemid),
intval(api_user())
@@ -1577,8 +1574,8 @@ require_once('include/items.php');
return false;
$item = q("SELECT * FROM item WHERE id = %d AND uid = %d",
- intval($itemid),
- intval(api_user())
+ intval($itemid),
+ intval(api_user())
);
xchan_query($item,true);