aboutsummaryrefslogtreecommitdiffstats
path: root/mod/item.php
diff options
context:
space:
mode:
authorRedMatrix <info@friendica.com>2014-11-14 08:52:38 +1100
committerRedMatrix <info@friendica.com>2014-11-14 08:52:38 +1100
commit9132a1c1954bcdeb3a7356212e2c8982e5878bbd (patch)
treeaa7002d73dbcd4136033589f1cb135184f4126c1 /mod/item.php
parent109cb936632c693d3f24afb9e2ce533797ad1a7f (diff)
parentac27db22c18ee7a82a52cbadb3efe2760b910499 (diff)
downloadvolse-hubzilla-9132a1c1954bcdeb3a7356212e2c8982e5878bbd.tar.gz
volse-hubzilla-9132a1c1954bcdeb3a7356212e2c8982e5878bbd.tar.bz2
volse-hubzilla-9132a1c1954bcdeb3a7356212e2c8982e5878bbd.zip
Merge pull request #690 from habeascodice/master
Initial postgres support
Diffstat (limited to 'mod/item.php')
-rw-r--r--mod/item.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/mod/item.php b/mod/item.php
index fdfc43bf2..94ff32750 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -887,7 +887,7 @@ function item_post(&$a) {
// They will show up as people comment on them.
if($parent_item['item_restrict'] & ITEM_HIDDEN) {
- $r = q("UPDATE `item` SET `item_restrict` = %d WHERE `id` = %d LIMIT 1",
+ $r = q("UPDATE `item` SET `item_restrict` = %d WHERE `id` = %d",
intval($parent_item['item_restrict'] - ITEM_HIDDEN),
intval($parent_item['id'])
);
@@ -1301,7 +1301,7 @@ function fix_attached_photo_permissions($uid,$xchan_hash,$body,
$private = (($str_contact_allow || $str_group_allow || $str_contact_deny || $str_group_deny) ? true : false);
$r = q("UPDATE item SET allow_cid = '%s', allow_gid = '%s', deny_cid = '%s', deny_gid = '%s', item_private = %d
- WHERE id = %d AND uid = %d limit 1",
+ WHERE id = %d AND uid = %d",
dbesc($str_contact_allow),
dbesc($str_group_allow),
dbesc($str_contact_deny),
@@ -1351,7 +1351,7 @@ function item_check_service_class($channel_id,$iswebpage) {
if ($iswebpage) {
$r = q("select count(i.id) as total from item i
right join channel c on (i.author_xchan=c.channel_hash and i.uid=c.channel_id )
- and i.parent=i.id and (i.item_restrict & %d) and not (i.item_restrict & %d) and i.uid= %d ",
+ and i.parent=i.id and (i.item_restrict & %d)>0 and not (i.item_restrict & %d)>0 and i.uid= %d ",
intval(ITEM_WEBPAGE),
intval(ITEM_DELETED),
intval($channel_id)