move hidewall to user table - queries are getting too complicated and servers falling over

This commit is contained in:
Friendika 2011-07-05 23:23:43 -07:00
commit 84d12c3e08
9 changed files with 34 additions and 30 deletions

View file

@ -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;
}