Code

Some changes
[gosa.git] / gosa-core / plugins / addons / addressbook / class_addressbook.inc
index 0f41b3097999d4af5764805bd9fdf60d91c4e35f..b1821bcd08f480413ca9f0315f59d2cb9d15baee 100644 (file)
@@ -68,7 +68,7 @@ class addressbook extends plugin
     }
 
     /* Get global filter config */
-    if (!is_global("phonefilter")){
+    if (!session::is_set("phonefilter")){
       $ui         = get_userinfo();
       $base       = get_base_from_people($ui->dn);
       $phonefilter= array(
@@ -77,7 +77,7 @@ class addressbook extends plugin
           "global"            => "checked",
           "search_for"        => "*",
           "object_type"       => "*");
-      register_global("phonefilter", $phonefilter);
+      session::set("phonefilter", $phonefilter);
     }
      
     $this->ui = get_userinfo();
@@ -96,7 +96,7 @@ class addressbook extends plugin
     }
 
     /* Save formular information */
-    $phonefilter= get_global("phonefilter");
+    $phonefilter= session::get("phonefilter");
     foreach( array("search_for", "search_base", "object_type") as $type){
       if (isset($_POST[$type])){
         $phonefilter[$type]= $_POST[$type];
@@ -126,7 +126,7 @@ class addressbook extends plugin
       $this->search_for= $s;
       $phonefilter['search_for']= $s;
     }
-    register_global("phonefilter", $phonefilter);
+    session::set("phonefilter", $phonefilter);
 
     /* Assign create acl */
     $acl = $this->get_entry_acls($this->abobjectclass.",".$phonefilter['search_base']);
@@ -680,19 +680,19 @@ class addressbook extends plugin
     }
 
     /* Check phone numbers */
-    if (!is_phone_nr($this->homePhone)){
+    if (!tests::is_phone_nr($this->homePhone)){
       $message[]= _("The field 'Phone' contains an invalid phone number.");
     }
-    if (!is_phone_nr($this->telephoneNumber)){
+    if (!tests::is_phone_nr($this->telephoneNumber)){
       $message[]= _("The field 'Phone' contains an invalid phone number.");
     }
-    if (!is_phone_nr($this->facsimileTelephoneNumber)){
+    if (!tests::is_phone_nr($this->facsimileTelephoneNumber)){
       $message[]= _("The field 'Fax' contains an invalid phone number.");
     }
-    if (!is_phone_nr($this->mobile)){
+    if (!tests::is_phone_nr($this->mobile)){
       $message[]= _("The field 'Mobile' contains an invalid phone number.");
     }
-    if (!is_phone_nr($this->pager)){
+    if (!tests::is_phone_nr($this->pager)){
       $message[]= _("The field 'Pager' contains an invalid phone number.");
     }
 
@@ -705,7 +705,7 @@ class addressbook extends plugin
   }
 
   /* Check mail */
-  if (!is_email($this->mail)){
+  if (!tests::is_email($this->mail)){
     $message[]= _("Please enter a valid email address in 'Primary address' field.");
   }