Fix visibility levels
authorRaphaël Barrois <raphael.barrois@polytechnique.org>
Tue, 16 Mar 2010 14:09:09 +0000 (15:09 +0100)
committerRaphaël Barrois <raphael.barrois@polytechnique.org>
Mon, 22 Mar 2010 12:47:18 +0000 (13:47 +0100)
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
classes/profile.php

index ac6223e..22d08e8 100644 (file)
@@ -131,13 +131,14 @@ class Profile
             $minvis = self::VISIBILITY_PUBLIC;
         }
         if ($visibility == null) {
-            $visibility = array($minvis);
+            $visibility = $minvis;
         }
 
         if ($minvis == self::VISIBILITY_PUBLIC) {
-            $visibility = array(self::VISIBILITY_PUBLIC);
+            $visibility = self::VISIBILITY_PUBLIC;
         }
 
+        $visibility = self::$v_values[$visibility];
         self::$contexts[$asked_vis] = $visibility;
 
         return $visibility;