aboutsummaryrefslogtreecommitdiffstats
path: root/mod/photo.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/photo.php')
-rw-r--r--mod/photo.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/mod/photo.php b/mod/photo.php
index f757372bf..e6d21562d 100644
--- a/mod/photo.php
+++ b/mod/photo.php
@@ -61,9 +61,10 @@ function photo_init(&$a) {
$uid = $person;
- $r = q("SELECT * FROM photo WHERE scale = %d AND uid = %d AND profile = 1 LIMIT 1",
+ $r = q("SELECT * FROM photo WHERE scale = %d AND uid = %d AND photo_usage = %d LIMIT 1",
intval($resolution),
- intval($uid)
+ intval($uid),
+ intval(PHOTO_PROFILE)
);
if(count($r)) {
$data = dbunescbin($r[0]['data']);