Merge commit 'origin/master' into fusionax
[platal.git] / modules / profile / page.inc.php
index b380c3e..7c60a6d 100644 (file)
@@ -86,8 +86,7 @@ class ProfileNumber extends ProfileNoSave
         $value = trim($value);
         $success = empty($value) || is_numeric($value);
         if (!$success) {
-            global $page;
-            $page->trigError('Numéro invalide');
+            Platal::page()->trigError('Numéro invalide');
         }
         return $value;
     }
@@ -110,8 +109,7 @@ class ProfileTel extends ProfileNoSave
         $value = format_display_number($value,$error);
         $success = !$error;
         if (!$success) {
-            global $page;
-            $page->trigError('Le préfixe international du numéro de téléphone est inconnu. ');
+            Platal::page()->trigError('Le préfixe international du numéro de téléphone est inconnu. ');
         }
         return $value;
     }
@@ -145,6 +143,7 @@ class ProfilePhones implements ProfileSetting
             if (@$phone['removed']) {
                 unset($value[$key]);
             } else {
+                unset($phone['removed']);
                 $phone['pub'] = $this->pub->value($page, 'pub', $phone['pub'], $s);
                 $phone['tel'] = $this->tel->value($page, 'tel', $phone['tel'], $s);
                 if(!isset($phone['type']) || ($phone['type'] != 'fixed' && $phone['type'] != 'mobile' && $phone['type'] != 'fax')) {