From: Nicolas Iooss Date: Mon, 9 Jun 2014 09:29:43 +0000 (+0200) Subject: Add 'hidden' flag to text descriptions of the 'pub' flag X-Git-Tag: xorg/1.1.13~9 X-Git-Url: http://git.polytechnique.org/?p=platal.git;a=commitdiff_plain;h=b49e98ca623b39dba085ad69e8a678ce5f6055e0 Add 'hidden' flag to text descriptions of the 'pub' flag --- diff --git a/classes/address.php b/classes/address.php index 2ebe8b5..cffa45b 100644 --- a/classes/address.php +++ b/classes/address.php @@ -650,7 +650,7 @@ class Address { $address = $this->text; if ($this->type == self::LINK_PROFILE || $this->type == self::LINK_JOB) { - static $pubs = array('public' => 'publique', 'ax' => 'annuaire AX', 'private' => 'privé'); + static $pubs = array('public' => 'publique', 'ax' => 'annuaire papier', 'private' => 'privé', 'hidden' => 'administrateurs'); $address .= ' (affichage ' . $pubs[$this->pub]; } if ($this->type == self::LINK_PROFILE) { diff --git a/classes/phone.php b/classes/phone.php index da9de1d..c14a7b2 100644 --- a/classes/phone.php +++ b/classes/phone.php @@ -263,7 +263,7 @@ class Phone private function toString() { - static $pubs = array('public' => 'publique', 'ax' => 'annuaire AX', 'private' => 'privé'); + static $pubs = array('public' => 'publique', 'ax' => 'annuaire papier', 'private' => 'privé', 'hidden' => 'administrateurs'); static $types = array('fax' => 'fax', 'fixed' => 'fixe', 'mobile' => 'mobile'); return $this->display . ' (' . $types[$this->type] . (($this->comment) ? ', commentaire : « ' . $this->comment . ' »' : '') . ', affichage ' . $pubs[$this->pub] . ')'; diff --git a/modules/profile/general.inc.php b/modules/profile/general.inc.php index c11abf4..f9da015 100644 --- a/modules/profile/general.inc.php +++ b/modules/profile/general.inc.php @@ -453,7 +453,7 @@ class ProfileSettingNetworking implements ProfileSetting } public function getText($value) { - static $pubs = array('public' => 'publique', 'ax' => 'annuaire AX', 'private' => 'privé'); + static $pubs = array('public' => 'publique', 'ax' => 'annuaire papier', 'private' => 'privé', 'hidden' => 'administrateurs'); $networkings = array(); foreach ($value as $network) { $networkings[] = $network['name'] . ' : ' . $network['address'] . ' (affichage ' . $pubs[$network['pub']] . ')'; @@ -516,7 +516,7 @@ class ProfileSettingHobby implements ProfileSetting } public function getText($value) { - static $pubs = array('public' => 'publique', 'private' => 'privé'); + static $pubs = array('public' => 'publique', 'ax' => 'annuaire papier', 'private' => 'privé', 'hidden' => 'administrateurs'); $hobbies = array(); foreach (self::$type as $type) { $hobbies[$type] = array(); diff --git a/modules/profile/jobs.inc.php b/modules/profile/jobs.inc.php index 4786339..f2a245f 100644 --- a/modules/profile/jobs.inc.php +++ b/modules/profile/jobs.inc.php @@ -322,7 +322,7 @@ class ProfileSettingJob implements ProfileSetting public function getText($value) { - static $pubs = array('public' => 'publique', 'ax' => 'annuaire AX', 'private' => 'privé'); + static $pubs = array('public' => 'publique', 'ax' => 'annuaire papier', 'private' => 'privé', 'hidden' => 'administrateurs'); $jobs = array(); foreach ($value as $id => $job) { $address = Address::formArrayToString(array($job['w_address'])); @@ -391,7 +391,7 @@ class ProfileSettingCorps implements ProfileSetting public function getText($value) { - static $pubs = array('public' => 'publique', 'ax' => 'annuaire AX', 'private' => 'privé'); + static $pubs = array('public' => 'publique', 'ax' => 'annuaire papier', 'private' => 'privé', 'hidden' => 'administrateurs'); $corpsList = DirEnum::getOptions(DirEnum::ORIGINCORPS); $rankList = DirEnum::getOptions(DirEnum::CORPSRANKS); return $corpsList[$value['current']] . ', ' . $corpsList[$value['rank']] . ' (' diff --git a/modules/profile/page.inc.php b/modules/profile/page.inc.php index fd13c93..608d3da 100644 --- a/modules/profile/page.inc.php +++ b/modules/profile/page.inc.php @@ -156,7 +156,7 @@ class ProfileSettingPub extends ProfileNoSave } public function getText($value) { - static $pubs = array('public' => 'publique', 'ax' => 'annuaire AX', 'private' => 'privé'); + static $pubs = array('public' => 'publique', 'ax' => 'annuaire papier', 'private' => 'privé', 'hidden' => 'administrateurs'); return $pubs[$value]; } }