From 84d12c3e08ae4b6fe228ce881b0c1570175d1667 Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 5 Jul 2011 23:23:43 -0700 Subject: move hidewall to user table - queries are getting too complicated and servers falling over --- mod/photos.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'mod/photos.php') diff --git a/mod/photos.php b/mod/photos.php index 3e0ec5802..4a72bb680 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -816,11 +816,7 @@ function photos_content(&$a) { } } - $r = q("SELECT `hidewall` FROM `profile` WHERE `uid` = %d AND `is-default` = 1 LIMIT 1", - intval($owner_uid) - ); - - if(count($r) && $r[0]['hidewall'] && (local_user() != $owner_uid) && (! $remote_contact)) { + if($a->data['user']['hidewall'] && (local_user() != $owner_uid) && (! $remote_contact)) { notice( t('Access to this item is restricted.') . EOL); return; } -- cgit v1.2.3