From af56031899164e06d9f08c5591dea06f54cb5243 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Barrois?= Date: Tue, 14 Jun 2011 01:28:49 +0200 Subject: [PATCH] Add some comments to Phone. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Raphaël Barrois --- classes/phone.php | 2 ++ 1 file changed, 2 insertions(+) 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)); -- 2.1.4