From bf9202eda9d81179f0e575aee7a33e71434dd82f Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Sat, 20 Nov 2010 15:20:11 +0100 Subject: [PATCH] If there is no photo, default publicity is 'private'. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- modules/profile/general.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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(*) -- 2.1.4