From: Raphaël Barrois Date: Mon, 13 Jun 2011 23:28:49 +0000 (+0200) Subject: Add some comments to Phone. X-Git-Tag: xorg/1.1.3~39 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=af56031899164e06d9f08c5591dea06f54cb5243;p=platal.git Add some comments to Phone. Signed-off-by: Raphaël Barrois --- diff --git a/classes/phone.php b/classes/phone.php index 29449e7..4a16ca9 100644 --- a/classes/phone.php +++ b/classes/phone.php @@ -332,6 +332,7 @@ class Phone $phone = new Phone($item); $success = (!$phone->error && ($phone->format() || $phone->isEmpty()) && $success); if (!$phone->isEmpty()) { + // Restrict phone visibility to $maxPublicity if (!is_null($maxPublicity) && $maxPublicity->isVisible($phone->pub)) { $phone->pub = $maxPublicity->level(); } @@ -341,6 +342,7 @@ class Phone if (count($phones) == 0 && $requiresEmptyPhone) { $phone = new Phone(); if (!is_null($maxPublicity) && $maxPublicity->isVisible($phone->pub)) { + // Restrict phone visibility to $maxPublicity $phone->pub = $maxPublicity->level(); } $phones[] = call_user_func(array($phone, $function));