Add 'hidden' flag to text descriptions of the 'pub' flag
authorNicolas Iooss <nicolas.iooss_git@polytechnique.org>
Mon, 9 Jun 2014 09:29:43 +0000 (11:29 +0200)
committerNicolas Iooss <nicolas.iooss_git@polytechnique.org>
Mon, 9 Jun 2014 16:33:38 +0000 (18:33 +0200)
classes/address.php
classes/phone.php
modules/profile/general.inc.php
modules/profile/jobs.inc.php
modules/profile/page.inc.php

index 2ebe8b5..cffa45b 100644 (file)
@@ -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) {
index da9de1d..c14a7b2 100644 (file)
@@ -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] . ')';
index c11abf4..f9da015 100644 (file)
@@ -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();
index 4786339..f2a245f 100644 (file)
@@ -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']] . ' ('
index fd13c93..608d3da 100644 (file)
@@ -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];
     }
 }