From: Stéphane Jacob Date: Sat, 20 Nov 2010 14:20:11 +0000 (+0100) Subject: If there is no photo, default publicity is 'private'. X-Git-Tag: xorg/1.0.2~141 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=bf9202eda9d81179f0e575aee7a33e71434dd82f;p=platal.git If there is no photo, default publicity is 'private'. Signed-off-by: Stéphane Jacob --- diff --git a/modules/profile/general.inc.php b/modules/profile/general.inc.php index 900c1c8..cd3b394 100644 --- a/modules/profile/general.inc.php +++ b/modules/profile/general.inc.php @@ -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(*)