If there is no photo, default publicity is 'private'.
authorStéphane Jacob <sj@m4x.org>
Sat, 20 Nov 2010 14:20:11 +0000 (15:20 +0100)
committerStéphane Jacob <sj@m4x.org>
Sat, 20 Nov 2010 14:20:11 +0000 (15:20 +0100)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
modules/profile/general.inc.php

index 900c1c8..cd3b394 100644 (file)
@@ -574,7 +574,11 @@ class ProfilePageGeneral extends ProfilePage
         $res = XDB::query("SELECT  pub
                              FROM  profile_photos
                             WHERE  pid = {?}", $this->pid());
-        $this->values['photo_pub'] = $res->fetchOneCell();
+        if ($res->numRows() == 0) {
+            $this->values['photo_pub'] = 'private';
+        } else {
+            $this->values['photo_pub'] = $res->fetchOneCell();
+        }
 
         if ($this->owner) {
             $res = XDB::query("SELECT  COUNT(*)