aboutsummaryrefslogtreecommitdiffstats
path: root/mod/like.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-01-29 14:51:41 -0800
committerfriendica <info@friendica.com>2015-01-29 14:51:41 -0800
commitff68ea608786a698ad46637ef13854ac1b1e6beb (patch)
tree5e9bec7525754dda60c8c08bc00802160efa202c /mod/like.php
parenta2cdd1499c968c31ae1b95933231f80be5fc639b (diff)
downloadvolse-hubzilla-ff68ea608786a698ad46637ef13854ac1b1e6beb.tar.gz
volse-hubzilla-ff68ea608786a698ad46637ef13854ac1b1e6beb.tar.bz2
volse-hubzilla-ff68ea608786a698ad46637ef13854ac1b1e6beb.zip
more message restrict conversions
Diffstat (limited to 'mod/like.php')
-rwxr-xr-xmod/like.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/mod/like.php b/mod/like.php
index 968f9c81e..6316b38f9 100755
--- a/mod/like.php
+++ b/mod/like.php
@@ -229,9 +229,10 @@ function like_content(&$a) {
// get the item. Allow linked photos (which are normally hidden) to be liked
- $r = q("SELECT * FROM item WHERE id = %d and (item_restrict = 0 or item_restrict = %d) LIMIT 1",
- intval($item_id),
- intval(ITEM_HIDDEN)
+ $r = q("SELECT * FROM item WHERE id = %d
+ and item_blocked = 0 and item_moderated = 0 and item_spam = 0
+ and item_deleted = 0 and item_unpublished = 0 and item_delayed_publish = 0 LIMIT 1",
+ intval($item_id)
);
if(! $item_id || (! $r)) {
@@ -339,9 +340,8 @@ function like_content(&$a) {
// if this was a linked photo and was hidden, unhide it.
- if($item['item_restrict'] & ITEM_HIDDEN) {
- $r = q("update item set item_restrict = (item_restrict ^ %d) where id = %d",
- intval(ITEM_HIDDEN),
+ if(intval($item['item_hidden'])) {
+ $r = q("update item set item_hidden = 0 where id = %d",
intval($item['id'])
);
}