Code

Added delimiter to preg_quote
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 31 Oct 2008 16:19:40 +0000 (16:19 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 31 Oct 2008 16:19:40 +0000 (16:19 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12852 594d385d-05f5-0310-b6e9-bd551577e9d8

94 files changed:
gosa-core/include/class_SnapShotDialog.inc
gosa-core/include/class_config.inc
gosa-core/include/class_plugin.inc
gosa-core/include/class_userinfo.inc
gosa-core/include/functions.inc
gosa-core/plugins/admin/acl/main.inc
gosa-core/plugins/admin/departments/class_departmentGeneric.inc
gosa-core/plugins/admin/departments/class_departmentManagement.inc
gosa-core/plugins/admin/departments/class_divListDepartment.inc
gosa-core/plugins/admin/departments/main.inc
gosa-core/plugins/admin/groups/class_divListGroup.inc
gosa-core/plugins/admin/groups/class_groupGeneric.inc
gosa-core/plugins/admin/groups/class_groupManagement.inc
gosa-core/plugins/admin/groups/main.inc
gosa-core/plugins/admin/ogroups/class_divListOGroup.inc
gosa-core/plugins/admin/ogroups/class_ogroup.inc
gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc
gosa-core/plugins/admin/ogroups/main.inc
gosa-core/plugins/admin/users/class_divListUsers.inc
gosa-core/plugins/admin/users/class_userManagement.inc
gosa-core/plugins/admin/users/main.inc
gosa-core/setup/class_setupStep_Ldap.inc
gosa-core/setup/class_setupStep_Migrate.inc
gosa-plugins/addressbook/addons/addressbook/class_addressbook.inc
gosa-plugins/dhcp/admin/systems/services/dhcp/class_servDHCP.inc
gosa-plugins/dns/admin/systems/services/dns/class_DNS.inc
gosa-plugins/dns/admin/systems/services/dns/class_servDNS.inc
gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZone.inc
gosa-plugins/fai/admin/fai/class_FAI.inc
gosa-plugins/fai/admin/fai/class_divListFai.inc
gosa-plugins/fai/admin/fai/class_faiHook.inc
gosa-plugins/fai/admin/fai/class_faiManagement.inc
gosa-plugins/fai/admin/fai/class_faiPackage.inc
gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc
gosa-plugins/fai/admin/fai/class_faiProfile.inc
gosa-plugins/fai/admin/fai/class_faiScript.inc
gosa-plugins/fai/admin/fai/class_faiSummaryTab.inc
gosa-plugins/fai/admin/fai/class_faiTemplate.inc
gosa-plugins/fai/admin/fai/class_faiVariable.inc
gosa-plugins/fai/admin/fai/main.inc
gosa-plugins/gofax/gofax/blocklists/class_blocklistManagement.inc
gosa-plugins/gofax/gofax/blocklists/class_divListBlocklists.inc
gosa-plugins/gofax/gofax/blocklists/main.inc
gosa-plugins/gofax/gofax/faxaccount/class_gofaxAccount.inc
gosa-plugins/gofon/admin/systems/gofon/class_phoneGeneric.inc
gosa-plugins/gofon/gofon/conference/class_divListConferences.inc
gosa-plugins/gofon/gofon/conference/class_phoneConferenceGeneric.inc
gosa-plugins/gofon/gofon/conference/class_phoneConferenceManagment.inc
gosa-plugins/gofon/gofon/conference/main.inc
gosa-plugins/gofon/gofon/macro/class_divListMacros.inc
gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc
gosa-plugins/gofon/gofon/macro/class_gofonMacroManagement.inc
gosa-plugins/gofon/gofon/macro/main.inc
gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc
gosa-plugins/goto/addons/goto/class_target_list.inc
gosa-plugins/goto/admin/applications/class_applicationGeneric.inc
gosa-plugins/goto/admin/applications/class_applicationManagement.inc
gosa-plugins/goto/admin/applications/class_divListApplication.inc
gosa-plugins/goto/admin/applications/main.inc
gosa-plugins/goto/admin/devices/class_deviceManagement.inc
gosa-plugins/goto/admin/devices/class_divListDevices.inc
gosa-plugins/goto/admin/devices/main.inc
gosa-plugins/goto/admin/groups/apps/class_groupApplication.inc
gosa-plugins/goto/admin/mimetypes/class_divListMimeTypes.inc
gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc
gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc
gosa-plugins/goto/admin/mimetypes/main.inc
gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc
gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc
gosa-plugins/goto/admin/systems/goto/class_terminalService.inc
gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc
gosa-plugins/goto/admin/systems/goto/class_workstationService.inc
gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc
gosa-plugins/goto/admin/systems/services/ldap/class_goLdapServer.inc
gosa-plugins/ldapmanager/addons/ldapmanager/class_export.inc
gosa-plugins/ldapmanager/addons/ldapmanager/class_exportxls.inc
gosa-plugins/log/addons/logview/class_gosa_logview.inc
gosa-plugins/mail/addons/mailqueue/class_mailqueue.inc
gosa-plugins/mail/addons/mailqueue/class_si_mailqueue.inc
gosa-plugins/mail/personal/mail/class_mail-methods-cyrus.inc
gosa-plugins/mit-krb5/admin/systems/services/kerberos/class_krb_host_keys.inc
gosa-plugins/netatalk/personal/netatalk/class_netatalk.inc
gosa-plugins/opsi/admin/opsi/class_opsigeneric.inc
gosa-plugins/samba/admin/systems/samba/class_winGeneric.inc
gosa-plugins/sudo/admin/sudo/class_divListSudo.inc
gosa-plugins/sudo/admin/sudo/class_target_list_systems.inc
gosa-plugins/sudo/admin/sudo/class_target_list_users.inc
gosa-plugins/sudo/admin/sudo/main.inc
gosa-plugins/systems/admin/systems/class_componentGeneric.inc
gosa-plugins/systems/admin/systems/class_divListSystem.inc
gosa-plugins/systems/admin/systems/class_servGeneric.inc
gosa-plugins/systems/admin/systems/class_systemManagement.inc
gosa-plugins/systems/admin/systems/class_termDNS.inc
gosa-plugins/systems/admin/systems/main.inc

index 56d3580bef4af48a4426401dc5ab8de75a1d4660..af18ab6ce8669a526b0da76f2909a466cdb5c345 100644 (file)
@@ -87,7 +87,7 @@ class SnapShotDialog extends plugin
         if($found){
           $this->del_dn        = $entry;
           $smarty= get_smarty();
-          $smarty->assign("intro", sprintf(_("You're about to delete the snapshot '%s'."), @LDAP::fix($this->del_dn)));
+          $smarty->assign("intro", sprintf(_("You're about to delete the snapshot '%s'."), LDAP::fix($this->del_dn)));
           return($smarty->fetch (get_template_path('remove.tpl')));
         }
       }
index d1afed386eaee1ae4319104569f692d151482f95..ddb15d47c7c5854e15900c0aab028212f67ebfb8 100644 (file)
@@ -740,7 +740,7 @@ class config  {
 
       /* Split dn into single department pieces.
        */
-      $elements = array_reverse(split(",",preg_replace("/".preg_quote($base)."$/","",$val)));          
+      $elements = array_reverse(split(",",preg_replace("/".preg_quote($base, '/')."$/","",$val)));             
 
       /* Add last ou element of current dn to our array */
       $last = &$arr;
@@ -794,7 +794,7 @@ class config  {
       }
 
       /* Fix name, if it contains a replace tag */
-      $name= preg_replace('/\\\\,/', ',', @LDAP::fix($name));
+      $name= preg_replace('/\\\\,/', ',', LDAP::fix($name));
 
       /* Check if current name is too long, then cut it */
       if(mb_strlen($name, 'UTF-8')> $max_size){
index baafda8721f6a373c6e5ff0db84bfe0f035ef931..dc208f2a8dd41b4712d2f3dd90682389aa7e9ce7 100644 (file)
@@ -791,7 +791,7 @@ class plugin
     }
 
     $r=ldap_bind($ds,$this->config->current['ADMINDN'], $this->config->current['ADMINPASSWORD']);
-    $sr=ldap_read($ds, @LDAP::fix($src_dn), "objectClass=*");
+    $sr=ldap_read($ds, LDAP::fix($src_dn), "objectClass=*");
 
     /* Fill data from LDAP */
     $new= array();
@@ -818,7 +818,7 @@ class plugin
     /* Adapt naming attribute */
     $dst_name= preg_replace("/^([^=]+)=.*$/", "\\1", $dst_dn);
     $dst_val = preg_replace("/^[^=]+=([^,+]+).*,.*$/", "\\1", $dst_dn);
-    $new[$dst_name]= @LDAP::fix($dst_val);
+    $new[$dst_name]= LDAP::fix($dst_val);
 
     /* Check if this is a department.
      * If it is a dep. && there is a , override in his ou 
@@ -869,7 +869,7 @@ class plugin
     $ldap->cat($dst_dn);
     $attrs= $ldap->fetch();
     if (count($attrs)){
-      trigger_error("Trying to overwrite ".@LDAP::fix($dst_dn).", which already exists.",
+      trigger_error("Trying to overwrite ".LDAP::fix($dst_dn).", which already exists.",
           E_USER_WARNING);
       return (FALSE);
     }
@@ -877,7 +877,7 @@ class plugin
     $ldap->cat($src_dn);
     $attrs= $ldap->fetch();
     if (!count($attrs)){
-      trigger_error("Trying to move ".@LDAP::fix($src_dn).", which does not seem to exist.",
+      trigger_error("Trying to move ".LDAP::fix($src_dn).", which does not seem to exist.",
           E_USER_WARNING);
       return (FALSE);
     }
@@ -886,7 +886,7 @@ class plugin
     $ldap->search("objectClass=*",array("dn"));
     while($attrs = $ldap->fetch()){
       $src = $attrs['dn'];
-      $dst = preg_replace("/".preg_quote($src_dn)."$/",$dst_dn,$attrs['dn']);
+      $dst = preg_replace("/".preg_quote($src_dn, '/')."$/",$dst_dn,$attrs['dn']);
       $this->_copy($src,$dst);
     }
     return (TRUE);
@@ -933,14 +933,14 @@ class plugin
     /* Updated acls set for this groups */
     foreach($leaf_groups as $group){
       $new_dn = $group['dn'];
-      $old_dn = preg_replace("/".preg_quote($dst_dn)."$/i",$src_dn,$new_dn);
+      $old_dn = preg_replace("/".preg_quote($dst_dn, '/')."$/i",$src_dn,$new_dn);
       $this->update_acls($old_dn,$new_dn); 
     }
 
     /* Updated acls set for this users */
     foreach($leaf_users as $user){
       $new_dn = $user['dn'];
-      $old_dn = preg_replace("/".preg_quote($dst_dn)."$/i",$src_dn,$new_dn);
+      $old_dn = preg_replace("/".preg_quote($dst_dn, '/')."$/i",$src_dn,$new_dn);
       $this->update_acls($old_dn,$new_dn); 
     }
 
@@ -965,9 +965,9 @@ class plugin
 
           $c_mem = $ogroup['member'][$i];
   
-          if(preg_match("/".preg_quote($src_dn)."$/i",$c_mem)){
+          if(preg_match("/".preg_quote($src_dn, '/')."$/i",$c_mem)){
  
-            $d_mem = preg_replace("/".preg_quote($src_dn)."$/i",$dst_dn,$ogroup['member'][$i]);
+            $d_mem = preg_replace("/".preg_quote($src_dn, '/')."$/i",$dst_dn,$ogroup['member'][$i]);
 
             if($o_ogroup == NULL){
               $o_ogroup = new ogroup($this->config,$ogroup['dn']);
@@ -1158,7 +1158,7 @@ class plugin
           }
 
           /* This one matches with the latter part. Break and don't fix this entry */
-          if (preg_match('/(^|,)'.preg_quote($key).'$/', $dn)){
+          if (preg_match('/(^|,)'.preg_quote($key, '/').'$/', $dn)){
             @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, "DEBUG: Possibly relevant: $key", "Tagging");
             $relevant[strlen($key)]= $ntag;
             continue;
@@ -1256,7 +1256,7 @@ class plugin
       $base           = $this->config->current['BASE'];
       $snap_base      = $config->get_cfg_value("snapshotBase");
       $base_of_object = preg_replace ('/^[^,]+,/i', '', $this->dn);
-      $new_base       = preg_replace("/".preg_quote($base)."$/","",$base_of_object).$snap_base;
+      $new_base       = preg_replace("/".preg_quote($base, '/')."$/","",$base_of_object).$snap_base;
 
       /* Create object */
 #$data             = preg_replace('/^dn:.*\n/', '', $ldap->gen_ldif($this->dn,"(!(objectClass=gosaDepartment))"));
@@ -1374,7 +1374,7 @@ class plugin
     $base           = $this->config->current['BASE'];
     $snap_base      = $this->config->get_cfg_value("snapshotBase");
     $base_of_object = preg_replace ('/^[^,]+,/i', '', $dn);
-    $new_base       = preg_replace("/".preg_quote($base)."$/","",$base_of_object).$snap_base;
+    $new_base       = preg_replace("/".preg_quote($base, '/')."$/","",$base_of_object).$snap_base;
     $tmp            = array(); 
 
     /* Fetch all objects with  gosaSnapshotDN=$dn */
@@ -1431,7 +1431,7 @@ class plugin
     /* Prepare bases */ 
     $base           = $this->config->current['BASE'];
     $snap_base      = $this->config->get_cfg_value("snapshotBase");
-    $new_base       = preg_replace("/".preg_quote($base)."$/","",$base_of_object).$snap_base;
+    $new_base       = preg_replace("/".preg_quote($base, '/')."$/","",$base_of_object).$snap_base;
 
     /* Fetch all objects and check if they do not exist anymore */
     $ui = get_userinfo();
index cf36489cfbd0bbee642a1eed64826405f9500a14..65538578d61c88bcbd0f53ef66646db9e6b0981a 100644 (file)
@@ -498,7 +498,7 @@ class userinfo
 
             /* Skip self acls? */
             if($skip_self_acls && isset($data['0']) && strpos($data['0'], "s")) continue;
-            if(preg_match("/^".preg_quote($mod)."/",$cat)){
+            if(preg_match("/^".preg_quote($mod, '/')."/",$cat)){
               $found =TRUE;
               break;
             }
index ea81f1ce68c1bbb6a79c6b4c48953f95fff6038f..3a0263a41f811bfff321c57a77b853671fddecdf 100644 (file)
@@ -870,7 +870,7 @@ function get_sub_list($filter, $category,$sub_deps, $base= "", $attributes= arra
        *  departments like this "ou=servers,ou=blafasel,..."
        * Here we filter out those blafasel departments.
        */
-      if(preg_match("/".preg_quote($sub_dep)."/",$attrs['dn'])){
+      if(preg_match("/".preg_quote($sub_dep, '/')."/",$attrs['dn'])){
         $departments[$attrs['dn']] = $attrs['dn'];
         break;
       }
@@ -1124,7 +1124,7 @@ function convert_department_dn($dn, $base = NULL)
 
   /* Build a sub-directory style list of the tree level
      specified in $dn */
-  $dn = preg_replace("/".preg_quote($base)."$/i","",$dn);
+  $dn = preg_replace("/".preg_quote($base, '/')."$/i","",$dn);
   if(empty($dn)) return("/");
 
 
@@ -1142,7 +1142,7 @@ function convert_department_dn($dn, $base = NULL)
  * style value. It removes the trailing '/', too. */
 function get_sub_department($value)
 {
-  return (@LDAP::fix(preg_replace("%^.*/([^/]+)/?$%", "\\1", $value)));
+  return (LDAP::fix(preg_replace("%^.*/([^/]+)/?$%", "\\1", $value)));
 }
 
 
@@ -1201,7 +1201,7 @@ function get_ou($name)
       $ou = @LDAP::convert("$ou");
     }
 
-    if(preg_match("/".preg_quote($config->current['BASE'])."$/",$ou)){
+    if(preg_match("/".preg_quote($config->current['BASE'], '/')."$/",$ou)){
       return($ou);
     }else{
       return("$ou,");
@@ -1235,7 +1235,7 @@ function get_base_from_people($dn)
 {
   global $config;
 
-  $pattern= "/^[^,]+,".preg_quote(get_people_ou())."/i";
+  $pattern= "/^[^,]+,".preg_quote(get_people_ou(), '/')."/i";
   $base= preg_replace($pattern, '', $dn);
 
   /* Set to base, if we're not on a correct subtree */
index f9dddcc165e6a2132006f2f2ab9191ba753bec73..7e4bce0e460d469d9f931a582482c4204124732b 100644 (file)
@@ -42,7 +42,7 @@ if (!session::is_set('macl') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
 
        /* Page header*/
        if (session::is_set('objectinfo')){
-               $display= print_header(get_template_path('plugins/acl/images/plugin.png'), _("ACL management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".@LDAP::fix(session::get('objectinfo')));
+               $display= print_header(get_template_path('plugins/acl/images/plugin.png'), _("ACL management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".LDAP::fix(session::get('objectinfo')));
        } else {
                $display= print_header(get_template_path('plugins/acl/images/plugin.png'), _("ACL management"));
        }
index 27ad5c002bd9f29a56a6d8104ad5d8a94aec92b6..4be01cddebe02cf5eb6f97a5aa7a9a312a647b00 100644 (file)
@@ -433,7 +433,7 @@ class department extends plugin
         </head>
         <body style="background: none; margin:4px;" id="body" >
         ';
-      echo "<h3>".sprintf(_("Tagging '%s'."),"<i>".@LDAP::fix($this->dn)."</i>")."</h3>";
+      echo "<h3>".sprintf(_("Tagging '%s'."),"<i>".LDAP::fix($this->dn)."</i>")."</h3>";
     }
 
     $add= $this->is_administrational_unit;
@@ -467,7 +467,7 @@ class department extends plugin
                    }
 
                    /* This one matches with the latter part. Break and don't fix this entry */
-                   if (preg_match('/(^|,)'.preg_quote($key).'$/', $attrs['dn'])){
+                   if (preg_match('/(^|,)'.preg_quote($key, '/').'$/', $attrs['dn'])){
                            $fix= false;
                            break;
                    }
@@ -514,7 +514,7 @@ class department extends plugin
       </head>
       <body style="background: none; margin:4px;" id="body" >
       ';
-    echo "<h3>".sprintf(_("Moving '%s' to '%s'"),"<i>".@LDAP::fix($src_dn)."</i>","<i>".@LDAP::fix($dst_dn)."</i>")."</h3>";
+    echo "<h3>".sprintf(_("Moving '%s' to '%s'"),"<i>".LDAP::fix($src_dn)."</i>","<i>".LDAP::fix($dst_dn)."</i>")."</h3>";
 
 
     /* Check if the destination entry exists */
@@ -523,9 +523,9 @@ class department extends plugin
     /* Check if destination exists - abort */
     $ldap->cat($dst_dn, array('dn'));
     if ($ldap->fetch()){
-      trigger_error("Recursive_move ".@LDAP::fix($dst_dn)." already exists.",
+      trigger_error("Recursive_move ".LDAP::fix($dst_dn)." already exists.",
           E_USER_WARNING);
-      echo sprintf("Recursive_move: '%s' already exists", @LDAP::fix($dst_dn))."<br>"; 
+      echo sprintf("Recursive_move: '%s' already exists", LDAP::fix($dst_dn))."<br>"; 
       return (FALSE);
     }
 
@@ -550,12 +550,12 @@ class department extends plugin
       $dst= preg_replace("/".str_replace("\\","\\\\",$src_dn)."$/", "$dst_dn", $object);
       $dst= str_replace($src_dn,$dst_dn,$object);
 
-      echo "<b>"._("Object").":</b> ".@LDAP::fix($src)."<br>";
+      echo "<b>"._("Object").":</b> ".LDAP::fix($src)."<br>";
 
       $this->update_acls($object, $dst,TRUE);
 
       if (!$this->copy($src, $dst)){
-        echo "<font color='#FF0000'><br>".sprintf(_("FAILED to copy %s, aborting operation"),@LDAP::fix($src))."</font>";
+        echo "<font color='#FF0000'><br>".sprintf(_("FAILED to copy %s, aborting operation"),LDAP::fix($src))."</font>";
         return (FALSE);
       }
       echo "<script language=\"javascript\" type=\"text/javascript\">scrollDown2();</script>" ;
@@ -629,7 +629,7 @@ class department extends plugin
           }
 
           /* This one matches with the latter part. Break and don't fix this entry */
-          if (preg_match('/(^|,)'.preg_quote($key).'$/', $dn)){
+          if (preg_match('/(^|,)'.preg_quote($key, '/').'$/', $dn)){
             @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, "DEBUG: Possibly relevant: $key", "Tagging");
             $relevant[strlen($key)]= $ntag;
             continue;
@@ -656,14 +656,14 @@ class department extends plugin
       $attrs= $ldap->fetch();
       if(isset($attrs['gosaUnitTag'][0]) && $attrs['gosaUnitTag'][0] == $tag){
         if ($show) {
-          echo sprintf(_("Object '%s' is already tagged"), @LDAP::fix($dn))."<br>";
+          echo sprintf(_("Object '%s' is already tagged"), LDAP::fix($dn))."<br>";
           flush();
         }
         return;
       }
       if (count($attrs)){
         if ($show){
-          echo sprintf(_("Adding tag (%s) to object '%s'"), $tag, @LDAP::fix($dn))."<br>";
+          echo sprintf(_("Adding tag (%s) to object '%s'"), $tag, LDAP::fix($dn))."<br>";
           flush();
         }
         $nattrs= array("gosaUnitTag" => $tag);
@@ -695,7 +695,7 @@ class department extends plugin
       }
       if (count($attrs)){
         if ($show){
-          echo sprintf(_("Removing tag from object '%s'"), @LDAP::fix($dn))."<br>";
+          echo sprintf(_("Removing tag from object '%s'"), LDAP::fix($dn))."<br>";
           flush();
         }
         $nattrs= array("gosaUnitTag" => array());
index dc4574dd069282fe1294ee4dc88567889d7fb66d..0637be02a0ef01bf45fb7634f148f776ed3dc0ff 100644 (file)
@@ -206,7 +206,7 @@ class departmentManagement extends plugin
 
         $dns_names = array();
         foreach($this->dns as $dn){
-          $dns_names[] = @LDAP::fix($dn);
+          $dns_names[] = LDAP::fix($dn);
         }
         add_lock ($this->dns, $this->ui->dn);
 
index 7e0d9a420db864cb9591582440df64576cf3f15d..a959b972ab1bf36051dd9a31cd753fc33271cba7 100644 (file)
@@ -170,7 +170,7 @@ class divListDepartment extends MultiSelectWindow
 
       /* Create title
        */
-      $title = @LDAP::fix($val['dn']);
+      $title = LDAP::fix($val['dn']);
 
       /* Create checkboxes infront of the entry 
        */
index e3a64da8a04878d62f65e65221cc79bdeae16379..290c67df10f611f20315f7defa5c9cdde27393bc 100644 (file)
@@ -39,7 +39,7 @@ if ($remove_lock){
 
        /* Page header*/
        if (session::is_set('objectinfo')){
-               $display= print_header(get_template_path('plugins/departments/images/plugin.png'), _("Department management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".@LDAP::fix(session::get('objectinfo')));
+               $display= print_header(get_template_path('plugins/departments/images/plugin.png'), _("Department management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".LDAP::fix(session::get('objectinfo')));
        } else {
                $display= print_header(get_template_path('plugins/departments/images/plugin.png'), _("Department management"));
        }
index 342d490bcfa33986a6e8ee066d88bb5ec7efb943..2ee9518e86b05ae1c04993a459963255f9ef569a 100644 (file)
@@ -213,7 +213,7 @@ class divListGroup extends MultiSelectWindow
     $ldap->search("(objectClass=gotoMenuEntry)",array("dn"));
     $configured_apps = array();
     while($entry = $ldap->fetch()){
-      $dn = preg_replace("/^.*(cn=[^,]+,".preg_quote(get_groups_ou()).")/","\\1",$entry['dn']);
+      $dn = preg_replace("/^.*(cn=[^,]+,".preg_quote(get_groups_ou(), '/').")/","\\1",$entry['dn']);
       $configured_apps[$dn] = $dn;
     }
 
@@ -258,7 +258,7 @@ class divListGroup extends MultiSelectWindow
           $appl  = $applimg;
       }
 
-      $title = "title='".preg_replace('/ /', '&nbsp;', @LDAP::fix($val['dn']))."'";
+      $title = "title='".preg_replace('/ /', '&nbsp;', LDAP::fix($val['dn']))."'";
 
       if(!isset($val['description'][0])){
         $desc = "";
index de4d235107092178724aa6554ac9cac7ad7f1691..1229fcdf49f9d484032ec02d8513fc45279bd78a 100644 (file)
@@ -194,7 +194,7 @@ class group extends plugin
     } else {
 
       /* Get object base */
-      $this->base =preg_replace ("/^[^,]+,".preg_quote(get_groups_ou())."/","",$this->dn);
+      $this->base =preg_replace ("/^[^,]+,".preg_quote(get_groups_ou(), '/')."/","",$this->dn);
     }
     $this->orig_base = $this->base;
 
index 346a15f394c8d2b92f9dcf2b1898ae7a11890e2a..f86a9d1fd5b19bd20e73cd9fe6f5a7727cc10450 100644 (file)
@@ -365,7 +365,7 @@ class groupManagement extends plugin
 
           $dns_names = array();
           foreach($this->dns as $dn){
-            $dns_names[] =@LDAP::fix($dn);
+            $dns_names[] =LDAP::fix($dn);
           }
           add_lock ($this->dns, $this->ui->dn);
 
@@ -451,7 +451,7 @@ class groupManagement extends plugin
 
         /* Lock the current entry, so nobody will edit it during deletion */
         add_lock ($this->dn, $this->ui->dn);
-        $smarty->assign("info", msgPool::deleteInfo(@LDAP::fix($this->dn),_("group")));
+        $smarty->assign("info", msgPool::deleteInfo(LDAP::fix($this->dn),_("group")));
         $smarty->assign("multiple", false);
         return($smarty->fetch(get_template_path('remove.tpl', TRUE)));
 
index aeb3b0febfc9ad975dbff88e6b933923c4f792df..6f6630ea180a7de83eeb99a2cf5de56645bb8f38 100644 (file)
@@ -40,7 +40,7 @@ if ($remove_lock){
     $display= print_header(get_template_path('plugins/groups/images/plugin.png'),
                            _("Group administration"), "<img alt=\"\" align=\"middle\" src=\"".
                             get_template_path('images/lists/locked.png')."\"> ".
-                            @LDAP::fix(session::get('objectinfo')));
+                            LDAP::fix(session::get('objectinfo')));
   } else {
     $display= print_header(get_template_path('plugins/groups/images/plugin.png'), _("Group administration"));
   }
index 3e828b68f39a1150e2f29d6f2af0e41dd15933ce..e9490509cbdeea470064ecb809fe560b5eeff0ee 100644 (file)
@@ -242,7 +242,7 @@ class divListOGroup extends MultiSelectWindow
       }else{
         $mail = $empty;
       }
-      $title = "title='".preg_replace('/ /', '&nbsp;', @LDAP::fix($val['dn']))."'";
+      $title = "title='".preg_replace('/ /', '&nbsp;', LDAP::fix($val['dn']))."'";
       if(!isset($val['description'][0])){
         $desc = "";
       }else{
index 0a3146bf3e8e6b45f32e9c276ed3e8181881f2aa..a02b120dd9657ac995027180878cffcf808734a3 100644 (file)
@@ -124,7 +124,7 @@ class ogroup extends plugin
     if ($this->dn == "new"){
       $this->base = session::get('CurrentMainBase');
     } else {
-      $this->base= preg_replace("/^[^,]+,".preg_quote(get_ou("ogroupRDN"))."/","",$this->dn);
+      $this->base= preg_replace("/^[^,]+,".preg_quote(get_ou("ogroupRDN"), '/')."/","",$this->dn);
 
       /* Is this account a trustAccount? */
       if ($this->is_account && isset($this->attrs['trustModel'])){
@@ -744,7 +744,7 @@ class ogroup extends plugin
 
       /* It has failed, add entry with type flag I (Invalid)*/
       if (!$ldap->success()){
-        $this->memberList[$dn]= array('text' => _("Non existing dn:")." ".@LDAP::fix($dn),"type" => "I");
+        $this->memberList[$dn]= array('text' => _("Non existing dn:")." ".LDAP::fix($dn),"type" => "I");
 
       } else {
 
@@ -951,7 +951,7 @@ class ogroup extends plugin
     /* Move members to target array */
     $this->attrs['member'] =array();
     foreach ($this->member as $key => $desc){
-      $this->attrs['member'][]= @LDAP::fix($key);
+      $this->attrs['member'][]= LDAP::fix($key);
     }
 
     $ldap= $this->config->get_ldap_link();
index 978bc0c87f4f8284b4ff00386eb5dce4f18a3fc4..6635ee07189251e8d3a722e6fc15dc8335123013 100644 (file)
@@ -246,7 +246,7 @@ class ogroupManagement extends plugin
 
           $dns_names = array();
           foreach($this->dns as $dn){
-            $dns_names[] = @LDAP::fix($dn);
+            $dns_names[] = LDAP::fix($dn);
           }
 
           add_lock ($this->dns, $this->ui->dn);
@@ -328,7 +328,7 @@ class ogroupManagement extends plugin
 
         /* Lock the current entry, so nobody will edit it during deletion */
         add_lock ($this->dn, $this->ui->dn);
-        $smarty->assign("info", msgPool::deleteInfo(@LDAP::fix($this->dn),_("object group")));
+        $smarty->assign("info", msgPool::deleteInfo(LDAP::fix($this->dn),_("object group")));
         $smarty->assign("multiple", false);
         return($smarty->fetch(get_template_path('remove.tpl', TRUE)));
       } else {
index aa6cd07ceacd07297ae8a7d69ecb884545cafd5f..918c970aaf5f70714e55f565bc675a4a0c15e668 100644 (file)
@@ -46,7 +46,7 @@ if ($remove_lock){
                           _("Object groups"),
                           "<img alt=\"\" align=\"middle\" src=\"".
                           get_template_path('images/lists/locked.png').
-                          "\"> ".@LDAP::fix(session::get('objectinfo')));
+                          "\"> ".LDAP::fix(session::get('objectinfo')));
   } else {
     $display= print_header(get_template_path('plugins/ogroups/images/plugin.png'), _("Object groups"));
   }
index daa4156665d7d531dc97031c151bb250745dfa8b..a83e827a20096933584c7ea2b8cc7ae409ce8211 100644 (file)
@@ -344,7 +344,7 @@ class divListUsers extends MultiSelectWindow
       $field0 = array("string" => "<input type='checkbox' id='item_selected_".$key."' name='item_selected_".$key."'>" ,
                       "attach" => "style='width:20px;'");
       $field1 = array("string" => sprintf($tpl,$val['dn']), "attach" => "style='text-align:center;width:20px;'");
-      $field2 = array("string" => sprintf($editlink,$key,$display), "attach" => "style='' title='".preg_replace('/ /', '&nbsp;', @LDAP::fix($val['dn']))."'");
+      $field2 = array("string" => sprintf($editlink,$key,$display), "attach" => "style='' title='".preg_replace('/ /', '&nbsp;', LDAP::fix($val['dn']))."'");
       $field3 = array("string" => $UseImg, "attach" => "style='width:166px;'");
       $field4 = array("string" => $s_img_create_from_template.preg_replace("/%KEY%/", "$key", $action),
                       "attach" => "style='width:".$action_col_size."px;border-right:0px;    text-align:right;'");
index 35c12d1516bd241131227b59484d17b14e3ee7c7..2fa0cfc627e1bc93e04158208fbb52e0a2c1060c 100644 (file)
@@ -486,7 +486,7 @@ class userManagement extends plugin
           if ($ldap->count() != 0){
             while ($attrs= $ldap->fetch()){
               $this->templates[$ldap->getDN()]=
-                $attrs['uid'][0]." - ".@LDAP::fix($key);
+                $attrs['uid'][0]." - ".LDAP::fix($key);
             }
             if ($s_action != "templatize_multiple"){
               $this->templates['none']= _("none");
@@ -592,7 +592,7 @@ class userManagement extends plugin
 
           $dns_names = array();
           foreach($this->dns as $dn){
-            $dns_names[] = @LDAP::fix($dn);
+            $dns_names[] = LDAP::fix($dn);
           }
 
           add_lock($this->dns, $this->ui->dn);
@@ -921,7 +921,7 @@ class userManagement extends plugin
       $this->usertab->givenName = $this->givenName;
       $template_dn              = $_POST['template'];
       $this->usertab->adapt_from_template($template_dn);
-      $template_base            = preg_replace("/^[^,]+,".preg_quote(get_people_ou())."/", '', $template_dn);
+      $template_base            = preg_replace("/^[^,]+,".preg_quote(get_people_ou(), '/')."/", '', $template_dn);
       $this->usertab->by_object['user']->base= $template_base;
     }
    
@@ -1059,7 +1059,7 @@ class userManagement extends plugin
       /* Skip entries that are not located under the people ou (normaly 'ou=people,')
        * Else winstations will be listed too, if you use the subtree flag. 
        */
-      if(!preg_match("/".preg_quote(get_people_ou())."/i",$Entry['dn'])){
+      if(!preg_match("/".preg_quote(get_people_ou(), '/')."/i",$Entry['dn'])){
         continue;
       }else{
 
index 4cacd6dbf3e1a0cd0d6db6a8a02db9eb18553cbd..5e75fe18d9891a33ba848a54373f49d4235c23fc 100644 (file)
@@ -44,7 +44,7 @@ if ($remove_lock){
                            _("User administration"),
                            "<img alt=\"\" class=\"center\" src=\"".
                            get_template_path('images/lists/locked.png').
-                           "\"> ".@LDAP::fix(session::get('objectinfo')));
+                           "\"> ".LDAP::fix(session::get('objectinfo')));
   } else {
     $display= print_header(get_template_path($userManagement->plIcon),
                           _("User administration"));
index 8b9ed80c677c027547ed2fe54847d57e322dff23..03525da833329b87746a20781aef3dcd88181401 100644 (file)
@@ -131,7 +131,7 @@ class Step_Ldap extends setup_step
     $ldap->search("(&(objectClass=person)(|(uid=".$filter.")(cn=".$filter.")))");
     $tmp = array();
     while($attrs = $ldap->fetch()){
-      $tmp[base64_encode($attrs['dn'])]= @LDAP::fix($attrs['dn']);
+      $tmp[base64_encode($attrs['dn'])]= LDAP::fix($attrs['dn']);
       natcasesort($tmp);
     }
     return($tmp);
index 70fb3b4f2fcd8149ea8880c4a0d9551e5b071505..be99fdd3875321c847dbfbb169ab947b78efdd36 100644 (file)
@@ -345,7 +345,7 @@ class Step_Migrate extends setup_step
 
     $this->outside_winstations = array();
     while($attrs = $ldap->fetch()){
-      if((!preg_match("/^[^,]+,".preg_quote($winstation_ou)."/",$attrs['dn'])) && !preg_match("/,dc=addressbook,/",$attrs['dn'])){
+      if((!preg_match("/^[^,]+,".preg_quote($winstation_ou, '/')."/",$attrs['dn'])) && !preg_match("/,dc=addressbook,/",$attrs['dn'])){
         $attrs['selected'] = FALSE;
         $attrs['ldif']     = "";
         $this->outside_winstations[base64_encode($attrs['dn'])] = $attrs;
@@ -410,12 +410,12 @@ class Step_Migrate extends setup_step
     $this->outside_groups = array();
     $this->groups_list = array();;
     while($attrs = $ldap->fetch()){
-      $group_db_base = preg_replace("/^[^,]+,".preg_quote($group_ou)."+,/i","",$attrs['dn']);
+      $group_db_base = preg_replace("/^[^,]+,".preg_quote($group_ou, '/')."+,/i","",$attrs['dn']);
 
       /* Check if entry is not an addressbook only user
        *  and verify that he is in a valid department
        */
-      if( !preg_match("/".preg_quote("dc=addressbook,")."/",$group_db_base) &&
+      if( !preg_match("/".preg_quote("dc=addressbook,", '/')."/",$group_db_base) &&
           !in_array($group_db_base,$valid_deps)
         ){
         $attrs['selected'] = FALSE;
@@ -488,12 +488,12 @@ class Step_Migrate extends setup_step
     }
 
     while($attrs = $ldap->fetch()){
-      $people_db_base = preg_replace("/^[^,]+,".preg_quote($people_ou)."/i","",$attrs['dn']);
+      $people_db_base = preg_replace("/^[^,]+,".preg_quote($people_ou, '/')."/i","",$attrs['dn']);
 
       /* Check if entry is not an addressbook only user
        *  and verify that he is in a valid department
        */
-      if( !preg_match("/".preg_quote("dc=addressbook,")."/",$people_db_base) &&
+      if( !preg_match("/dc=addressbook,/",$people_db_base) &&
           !in_array($people_db_base,$valid_deps)
          ){
         $attrs['selected'] = FALSE;
@@ -1295,7 +1295,7 @@ class Step_Migrate extends setup_step
       /* Fix displayed dn syntax */ 
       $tmp = $this->outside_winstations;
       foreach($tmp as $key => $data){
-        $tmp[$key]['dn'] = @LDAP::fix($data['dn']);
+        $tmp[$key]['dn'] = LDAP::fix($data['dn']);
       }
 
       $smarty = get_smarty();
@@ -1341,7 +1341,7 @@ class Step_Migrate extends setup_step
       /* Fix displayed dn syntax */ 
       $tmp = $this->outside_groups;
       foreach($tmp as $key => $data){
-        $tmp[$key]['dn'] = @LDAP::fix($data['dn']);
+        $tmp[$key]['dn'] = LDAP::fix($data['dn']);
       }
 
       $smarty = get_smarty();
@@ -1389,7 +1389,7 @@ class Step_Migrate extends setup_step
       /* Fix displayed dn syntax */ 
       $tmp = $this->outside_users;
       foreach($tmp as $key => $data){
-        $tmp[$key]['dn'] = @LDAP::fix($data['dn']);
+        $tmp[$key]['dn'] = LDAP::fix($data['dn']);
       }
 
       $smarty = get_smarty();
@@ -1513,7 +1513,7 @@ class Step_Migrate extends setup_step
       /* Fix displayed dn syntax */ 
       $tmp = $this->users_to_migrate;
       foreach($tmp as $key => $data){
-        $tmp[$key]['dn'] = @LDAP::fix($data['dn']);
+        $tmp[$key]['dn'] = LDAP::fix($data['dn']);
       }
 
       $smarty = get_smarty();
@@ -1569,7 +1569,7 @@ class Step_Migrate extends setup_step
       /* Fix displayed dn syntax */ 
       $tmp = $this->deps_to_migrate;
       foreach($tmp as $key => $data){
-        $tmp[$key]['dn'] = @LDAP::fix($data['dn']);
+        $tmp[$key]['dn'] = LDAP::fix($data['dn']);
       }
 
       $smarty->assign("deps_to_migrate",$tmp);
@@ -1886,7 +1886,7 @@ class Step_Migrate extends setup_step
   
     $tmp = array();
     while($attrs = $ldap->fetch()){
-      $tmp[base64_encode($attrs['dn'])] = @LDAP::fix($attrs['dn']);
+      $tmp[base64_encode($attrs['dn'])] = LDAP::fix($attrs['dn']);
     }
     return($tmp);
   }
@@ -2080,7 +2080,7 @@ class Step_Migrate extends setup_step
   
     $tmp = array();
     while($attrs = $ldap->fetch()){
-      $tmp[base64_encode($attrs['dn'])] = @LDAP::fix($attrs['dn']);
+      $tmp[base64_encode($attrs['dn'])] = LDAP::fix($attrs['dn']);
     }
     return($tmp);
   }
index fd3304b082ad4a0ebaa68b4f1bb6f231bf5c3f29..cd7e499c0308f2ba4c501809ce251540218172b6 100644 (file)
@@ -787,8 +787,8 @@ class addressbook extends plugin
     $acls = "";
   
     /* Use addressbook acls */
-    if(preg_match("/".preg_quote($this->abobjectclass)."/",$dn))  {
-      $dn = preg_replace("/".preg_quote($this->abobjectclass).",/","",$dn);
+    if(preg_match("/".preg_quote($this->abobjectclass, '/')."/",$dn))  {
+      $dn = preg_replace("/".preg_quote($this->abobjectclass, '/').",/","",$dn);
       $acls = $this->ui->get_permissions($dn,"addressbook/addressbook",$attr);
     }
     
index 1b5201d24043e060f5351f88ce47a33003c021de..beb0636a359c860b119d44c0f8d01832c0519b0c 100644 (file)
@@ -253,7 +253,7 @@ class servdhcp extends goService
         if (isset($this->dhcpObjectCache[$dn])){
           $this->current_object= $dn;
           $this->dialog= 1;
-          $smarty->assign("warning", msgPool::deleteInfo(@LDAP::fix($dn),_("DHCP section")));
+          $smarty->assign("warning", msgPool::deleteInfo(LDAP::fix($dn),_("DHCP section")));
           return($smarty->fetch(get_template_path('remove_dhcp.tpl', TRUE, dirname(__FILE__))));
         }
       }
@@ -438,7 +438,7 @@ class servdhcp extends goService
     foreach ($this->dhcpObjectCache as $dn => $data){
 
       if($this->dn != $this->orig_dn){
-        $dn = preg_replace("/".preg_quote($this->orig_dn)."$/i",$this->dn,$dn);
+        $dn = preg_replace("/".preg_quote($this->orig_dn, '/')."$/i",$this->dn,$dn);
       }
 
       /* Remove entry? */
@@ -492,7 +492,7 @@ class servdhcp extends goService
       
           if(in_array($attribute,array("dhcpPrimaryDN","dhcpSecondaryDN","dhcpServerDN","dhcpFailOverPeerDN"))){
             foreach($values as $v_key => $value){
-              $values[$v_key] = preg_replace("/".preg_quote($this->orig_dn)."$/i",$this->dn,$value);
+              $values[$v_key] = preg_replace("/".preg_quote($this->orig_dn, '/')."$/i",$this->dn,$value);
             }
           }
 
@@ -542,7 +542,7 @@ class servdhcp extends goService
 
     $this->dhcpServiceDN= $this->serviceDN;
     if($this->dn != $this->orig_dn){
-      $this->dhcpServiceDN= preg_replace("/".preg_quote($this->orig_dn)."$/i",$this->dn,$this->dhcpServiceDN);
+      $this->dhcpServiceDN= preg_replace("/".preg_quote($this->orig_dn, '/')."$/i",$this->dn,$this->dhcpServiceDN);
     }
 
     /* Replace 'new' dn */ 
@@ -720,7 +720,7 @@ class servdhcp extends goService
     while($attrs = $ldap->fetch()){
 
       /* Skip own config */
-      if($this->dn != "new" && preg_match("/".preg_quote($this->dn)."$/",$attrs['dn'])){
+      if($this->dn != "new" && preg_match("/".preg_quote($this->dn, '/')."$/",$attrs['dn'])){
         continue;
       }
 
index 205e3320912083d901fbaa9bd8b5e7416f8fa39f..4aa743a60474e2c24c63c2931f3b1d3029606cff 100644 (file)
@@ -363,8 +363,8 @@ class DNS
          */
         $zN = trim($zone,".");
         $nN = trim($name,".");  
-        if(preg_match("/".preg_quote($zN)."$/",$nN)){
-          $nN = preg_replace("/[\.]*".preg_quote($zN)."[\.]*$/","",$nN);
+        if(preg_match("/".preg_quote($zN, '/')."$/",$nN)){
+          $nN = preg_replace("/[\.]*".preg_quote($zN, '/')."[\.]*$/","",$nN);
         }else{
           $nN = $name;
         }
@@ -399,7 +399,7 @@ class DNS
 
       /* Check given host name with zone settings 
        */ 
-      if(preg_match("/".preg_quote($testname)."[\.]*$/",$nN) || $attrs['relativeDomainName'][0] == $name){
+      if(preg_match("/".preg_quote($testname, '/')."[\.]*$/",$nN) || $attrs['relativeDomainName'][0] == $name){
         $ret['exists'] = true;
         $ret['zoneName'] = $id_tmp;
         foreach(array("dNSClass","dNSTTL") as $atr){
@@ -463,8 +463,8 @@ class DNS
     $zN = trim($zoneName,".");
     $nN = trim($newName,".");
     $oN = trim($oldName,".");
-    $newName = preg_replace("/[\.]*".preg_quote($zN)."$/i","",$nN);
-    $oldName = preg_replace("/[\.]*".preg_quote($zN)."$/i","",$oN);
+    $newName = preg_replace("/[\.]*".preg_quote($zN, '/')."$/i","",$nN);
+    $oldName = preg_replace("/[\.]*".preg_quote($zN, '/')."$/i","",$oN);
 
     /* If reverseZone can't be resolved ... this 
      *  can't be a valid entry, so remove this account
index aa9722b108ded139fca7c07a96b96142702bdd0c..c821a5333392f02908de529d4c2b5a5a29b9683f 100644 (file)
@@ -61,7 +61,7 @@ class servdns extends goService
     $dns = array();
     while($attrs = $ldap->fetch()){
       /* Skip own config */
-      if($this->dn != "new" && preg_match("/".preg_quote($this->dn)."$/",$attrs['dn'])){
+      if($this->dn != "new" && preg_match("/".preg_quote($this->dn, '/')."$/",$attrs['dn'])){
         continue;
       }
       $dn = preg_replace("/^zoneName=[^,]+,/","",$attrs['dn']);
@@ -398,7 +398,7 @@ class servdns extends goService
       $ldap->ls("(objectClass=dnsZone)",$src,array('cn'));
       while($attrs = $ldap->fetch()){
         $src_zone = $attrs['dn'];
-        $dst_zone = preg_replace("/".preg_quote($src)."$/",$this->dn,$src_zone);
+        $dst_zone = preg_replace("/".preg_quote($src, '/')."$/",$this->dn,$src_zone);
         $res = plugin::recursive_move($src_zone, $dst_zone);
 
         if($res){
@@ -435,7 +435,7 @@ class servdns extends goService
     foreach($tmp as $key1 => $data1){
       $tmp2[$key1] = array();
       foreach($data1 as $key2 => $data2){
-        $tmp2[$key1][preg_replace("/".preg_quote($old_dn)."$/",$this->dn,$key2)] = $data2;
+        $tmp2[$key1][preg_replace("/".preg_quote($old_dn, '/')."$/",$this->dn,$key2)] = $data2;
       }
     }
     $tmp = $tmp2;
index b5854fc9d780e888160481691f294e34e49a8ff6..aee9dfa4aad7daa5b7d49f4dfe3c1821ea3c2d6c 100644 (file)
@@ -91,7 +91,7 @@ class servdnseditZone extends plugin
             $tmp2[$tmp[0]] = $rec;
             unset($this->Records[$key]);
           }
-          if($rec['type'] == "nSRecord" && preg_match("/".preg_quote($this->sOAprimary)."/",$rec['value'])){
+          if($rec['type'] == "nSRecord" && preg_match("/".preg_quote($this->sOAprimary, '/')."/",$rec['value'])){
             unset($this->Records[$key]);
           }
         }
index 677a8b925e8b4c6ba33bc06dec7ac4e9a31fcbdf..fd58da5b07fd25f17917bd75ff504a8706fa1d89 100644 (file)
@@ -70,7 +70,7 @@ class FAI
         foreach($res_tmp as $attr){
 
           $buffer = array();
-          $name = preg_replace("/".preg_quote($release)."/i","",$attr['dn']);
+          $name = preg_replace("/".preg_quote($release, '/')."/i","",$attr['dn']);
 
           if(isset($attr['FAIstate'][0])){
             if(preg_match("/removed$/",$attr['FAIstate'][0])){
@@ -83,7 +83,7 @@ class FAI
 
           /* Seems to be an inherited class, apply current FAIstate to this classes 
            */
-          if(!preg_match("/".preg_quote($base_release)."$/i",$attr['dn'])){
+          if(!preg_match("/".preg_quote($base_release, '/')."$/i",$attr['dn'])){
             $buffer['FAIstate'] = $FAIstate; 
           }else{
 
@@ -151,7 +151,7 @@ class FAI
   {
     global $config;
 
-    if(!preg_match("/".preg_quote(get_ou('faiBaseRDN'))."/",$dn)){
+    if(!preg_match("/".preg_quote(get_ou('faiBaseRDN'), '/')."/",$dn)){
       $base = get_ou('faiBaseRDN').$dn;
     }else{
       $base = $dn;
@@ -163,7 +163,7 @@ class FAI
     $ldap->search("(objectClass=FAIbranch)",array("ou","dn"));
     while($attrs = $ldap->fetch()){
       if($appendedName){
-        $res[$attrs['dn']] = convert_department_dn(preg_replace("/,".preg_quote(get_ou('faiBaseRDN')).".*$/","",$attrs['dn']));
+        $res[$attrs['dn']] = convert_department_dn(preg_replace("/,".preg_quote(get_ou('faiBaseRDN'), '/').".*$/","",$attrs['dn']));
       }else{
         $res[$attrs['dn']] = $attrs['ou'][0];
       }
@@ -207,7 +207,7 @@ class FAI
 
       /* Dont't try to modify non FAIclasses  
        */
-      if(!preg_match("/[^,]+,".preg_quote(get_ou("faiBaseRDN"))."/",$obj_dn)){
+      if(!preg_match("/[^,]+,".preg_quote(get_ou("faiBaseRDN"), '/')."/",$obj_dn)){
         trigger_error("PLEASE check fai class handling in ".__LINE__." -> ".__FILE__);        
         echo "<br>-->".$Current_DN."<br>";
         echo "<br>-->".$obj_dn."<br>";
@@ -247,8 +247,8 @@ class FAI
 
               /* Check if this Profile uses the source class ($cn)
                */
-              if(preg_match("/".preg_quote($cn)."/",$attrs['FAIclass'])){
-                $attrs['FAIclass'] = preg_replace("/[ ]*".preg_quote($cn)."[ ]*/i"," ",$attrs['FAIclass']);
+              if(preg_match("/".preg_quote($cn, '/')."/",$attrs['FAIclass'])){
+                $attrs['FAIclass'] = preg_replace("/[ ]*".preg_quote($cn, '/')."[ ]*/i"," ",$attrs['FAIclass']);
                 if(empty($attrs['FAIclass'])){
                   $attrs['FAIclass'] = array();
                 }
@@ -595,7 +595,7 @@ class FAI
 
           $buffer = array();
 #        $name = str_ireplace($release,"",$attr['dn']);
-          $name = preg_replace("/".preg_quote($release)."/i","",$attr['dn']);
+          $name = preg_replace("/".preg_quote($release, '/')."/i","",$attr['dn']);
 
           if(isset($attr['FAIstate'][0])&&(preg_match("/removed$/",$attr['FAIstate'][0]))){
 
@@ -703,7 +703,7 @@ class FAI
 
     /* Get dn suffix. Example  "FAIvairableEntry=keksdose,FAIvariable=Keksregal," */
 #  $dn_suffix = str_ireplace($base_release,"",$dn);
-    $dn_suffix = preg_replace("/".preg_quote($base_release)."/i","",$dn);
+    $dn_suffix = preg_replace("/".preg_quote($base_release, '/')."/i","",$dn);
 
     /* Check if given object also exists whitin one of these releases */
     foreach($sub_releases as $p_release => $name){
@@ -744,7 +744,7 @@ class FAI
 
     /* Get dn suffix. Example  "FAIvairableEntry=keksdose,FAIvariable=Keksregal," */
 #  $dn_suffix = str_ireplace($base_release,"",$dn);
-    $dn_suffix = preg_replace("/".preg_quote($base_release)."/i","",$dn);
+    $dn_suffix = preg_replace("/".preg_quote($base_release, '/')."/i","",$dn);
 
     /* Check if given object also exists whitin one of these releases */
     foreach($previous_releases as $p_release){
@@ -768,7 +768,7 @@ class FAI
     $ret = array();
 
     /* Explode dns into pieces, to be able to build parent dns */
-    $dns_to_check = gosa_ldap_explode_dn(preg_replace("/".preg_quote(",".$config->current['BASE'])."/i","",$dn));
+    $dns_to_check = gosa_ldap_explode_dn(preg_replace("/".preg_quote(",".$config->current['BASE'], '/')."/i","",$dn));
 
     if(!is_array($dns_to_check)){
       return;  
@@ -902,7 +902,7 @@ class FAI
     $ldap->search("(objectClass=FAIbranch)",array("ou","FAIstate"));
     while($attrs = $ldap->fetch()){
       foreach($sub_releases as $sub_rel){
-        if(preg_match("/^".preg_quote($sub_rel.get_ou('faiBaseRDN'))."/",$attrs['dn'])){
+        if(preg_match("/^".preg_quote($sub_rel.get_ou('faiBaseRDN'), '/')."/",$attrs['dn'])){
           $f_releases[$sub_rel.get_ou('faiBaseRDN')] = $attrs;
         }
       }
@@ -979,7 +979,7 @@ class FAI
     }else{
       $source_dns = array();
       foreach($g_releases as $dn => $data){
-        if(preg_match("/^".preg_quote($source_dn)."/",$dn)){
+        if(preg_match("/^".preg_quote($source_dn, '/')."/",$dn)){
           $source_dns[$dn] = $data; 
         }
       }
@@ -992,7 +992,7 @@ class FAI
       $ldap->cd($dn);
       $ldap->ls("(|(objectClass=gotoSubmenuEntry)(objectClass=gotoMenuEntry))",$dn,array("dn"));
       while($attrs = $ldap->fetch()){
-        $destination = preg_replace("/".preg_quote($dn)."$/","ou=".$destination_name.",".$dn,$attrs['dn']);
+        $destination = preg_replace("/".preg_quote($dn, '/')."$/","ou=".$destination_name.",".$dn,$attrs['dn']);
         $to_copy[$attrs['dn']] = $destination;
       }
     }
@@ -1200,7 +1200,7 @@ class FAI
     $ldap->cd($config->current['BASE']);
 
     /* Split dn into pices */ 
-    $dns_to_check = gosa_ldap_explode_dn(preg_replace("/".preg_quote(",".$config->current['BASE'])."/i","",$Current_DN));
+    $dns_to_check = gosa_ldap_explode_dn(preg_replace("/".preg_quote(",".$config->current['BASE'], '/')."/i","",$Current_DN));
 
     if(!is_array($dns_to_check)){
       return;  
index ac6d4f27c1a800d288894e1532c9491b4a7f3873..be5072f22a32be65c1102c573038ff480bb61a9c 100644 (file)
@@ -317,7 +317,7 @@ class divListFai extends MultiSelectWindow
        $field0 = array("string" => "<input type='checkbox' id='item_selected_".$key."' name='item_selected_".$key."'>" ,
            "attach" => "style='width:20px;'");
        $field1 = array("string" => $img , "attach" => "style='text-align:center;width:20px;'");
-       $field2 = array("string" => preg_replace(array("/%KEY%/","/%NAME%/","/%TITLE%/"),array($key,$display,preg_replace('/ /', '&nbsp;', @LDAP::fix($value['dn']))),$edi) , "attach" => "style=''");
+       $field2 = array("string" => preg_replace(array("/%KEY%/","/%NAME%/","/%TITLE%/"),array($key,$display,preg_replace('/ /', '&nbsp;', LDAP::fix($value['dn']))),$edi) , "attach" => "style=''");
        $field3 = array("string" => $info, "attach" => "style='width:200px;'");
        $field4 = array("string" => preg_replace("/%KEY%/",$key,$acti) , "attach" => "style='width:".$action_col_size."px;border-right:0px;text-align:right;'");
        $this->AddElement(array($field0,$field1,$field2,$field3,$field4));
index 5005cce1563c607489a25d89f0cc462699ff753c..2e0119adfc600c2b25bf38d29891d836d7adc296 100644 (file)
@@ -50,7 +50,7 @@ class faiHook extends plugin
       foreach($res as $obj){
 
         /* Skip not relevant objects */
-        if(!preg_match("/".preg_quote($this->dn)."$/i",$obj['dn'])) continue;
+        if(!preg_match("/".preg_quote($this->dn, '/')."$/i",$obj['dn'])) continue;
 
         $objects = array();
         $objects['status']      = "FreshLoaded";
@@ -399,12 +399,12 @@ class faiHook extends plugin
       $ldap = $this->config->get_ldap_link();
       $ldap->cd ($this->dn);
       $release = $this->parent->parent->fai_release;
-      $use_dn = preg_replace("/".preg_quote(FAI::get_release_dn($this->dn))."/i", $release, $this->dn);
+      $use_dn = preg_replace("/".preg_quote(FAI::get_release_dn($this->dn), '/')."/i", $release, $this->dn);
       new log("remove","fai/".get_class($this),$use_dn,$this->attributes);
       FAI::prepare_to_save_FAI_object($use_dn,array(),true);
 
       foreach($this->SubObjects as $name => $obj){
-        $use_dn = preg_replace("/".preg_quote(FAI::get_release_dn($this->dn))."/i", $release, $obj['dn']);
+        $use_dn = preg_replace("/".preg_quote(FAI::get_release_dn($this->dn), '/')."/i", $release, $obj['dn']);
         FAI::prepare_to_save_FAI_object($use_dn,array(),true);
       }
       $this->handle_post_events("remove");
@@ -532,7 +532,7 @@ class faiHook extends plugin
     foreach($res as $obj){
 
       /* Skip not relevant objects */
-      if(!preg_match("/".preg_quote($source['dn'])."$/i",$obj['dn'])) continue;
+      if(!preg_match("/".preg_quote($source['dn'], '/')."$/i",$obj['dn'])) continue;
 
       $objects = array();
       $objects['status']      = "edited";
index 3114ba7fab802cecd5872d59e024a682e25975a0..b65e4476439472179ec282c492797de6c26ec809 100644 (file)
@@ -318,7 +318,7 @@ class faiManagement extends plugin
 
                                /* Lock the current entry, so nobody will edit it during deletion */
                                add_lock ($this->dn, $this->ui->dn);
-                               $smarty->assign("warning",msgPool::deleteInfo(@LDAP::fix($this->dn),_("FAI object")));
+                               $smarty->assign("warning",msgPool::deleteInfo(LDAP::fix($this->dn),_("FAI object")));
         $smarty->assign("multiple", false);
                                return($smarty->fetch(get_template_path('remove.tpl', TRUE)));
                        } else {
@@ -363,7 +363,7 @@ class faiManagement extends plugin
           $dns_names = array();
           foreach($this->dns as $dn){
             add_lock ($dn, $this->ui->dn);
-            $dns_names[] = @LDAP::fix($dn);
+            $dns_names[] = LDAP::fix($dn);
           }
 
           /* Lock the current entry, so nobody will edit it during deletion */
@@ -540,7 +540,7 @@ class faiManagement extends plugin
            we're allowed to remove this 'dn' */
         if($this->acl_is_removeable()){
           $smarty->assign("release_hidden",base64_encode($this->fai_release));
-          $smarty->assign("info", msgPool::deleteInfo(@LDAP::fix($this->fai_release),_("FAI branch/freeze")));
+          $smarty->assign("info", msgPool::deleteInfo(LDAP::fix($this->fai_release),_("FAI branch/freeze")));
           return($smarty->fetch(get_template_path('remove_branch.tpl',TRUE)));
         } else {
           msg_dialog::display(_("Permission error"), _("You have no permission to delete this release!"), ERROR_DIALOG);
@@ -576,9 +576,9 @@ class faiManagement extends plugin
 
             $ldap->cd($bb);
             $ldap->recursive_remove();
-            $ldap->cd(preg_replace('/,'.preg_quote(get_ou('faiBaseRDN')).'/', ','.get_ou('applicationRDN'), $bb));
+            $ldap->cd(preg_replace('/,'.preg_quote(get_ou('faiBaseRDN'), '/').'/', ','.get_ou('applicationRDN'), $bb));
             $ldap->recursive_remove();
-            $ldap->cd(preg_replace('/,'.preg_quote(get_ou('faiBaseRDN')).'/', ','.get_ou('mimetypeRDN'), $bb));
+            $ldap->cd(preg_replace('/,'.preg_quote(get_ou('faiBaseRDN'), '/').'/', ','.get_ou('mimetypeRDN'), $bb));
             $ldap->recursive_remove();
 
             /* Search for all groups with configured application menus.
@@ -586,7 +586,7 @@ class faiManagement extends plugin
               - The search für menu configuration for the specified release and collect all those dns.
               - Remove entries
              */
-            $release_ou = preg_replace("/".preg_quote(get_ou("faiBaseRDN")).".*$/","",$bb);
+            $release_ou = preg_replace("/".preg_quote(get_ou("faiBaseRDN"), '/').".*$/","",$bb);
             $ldap->cd($this->config->current['BASE']);
             $ldap->search("(objectClass=posixGroup)",array("dn"));
           
@@ -604,7 +604,7 @@ class faiManagement extends plugin
               $ldap->cd($dn);
               $ldap->search("(objectClass=FAIbranch)",array("dn"));
               while($attrs = $ldap->fetch()){
-                if(preg_match("/^".preg_quote($release_ou)."/",$attrs['dn'])){
+                if(preg_match("/^".preg_quote($release_ou, '/')."/",$attrs['dn'])){
                   $dns[] = $attrs['dn'];
                 }
               }
@@ -728,11 +728,11 @@ class faiManagement extends plugin
           }
         }
 
-        $appsrc = preg_replace("/".preg_quote(get_ou('faiBaseRDN'))."/",get_ou('applicationRDN'),$baseToUse); 
-        $appdst = preg_replace("/".preg_quote(get_ou('faiBaseRDN'))."/",get_ou('applicationRDN'),"ou=".$name.",".$baseToUse) ; 
+        $appsrc = preg_replace("/".preg_quote(get_ou('faiBaseRDN'), '/')."/",get_ou('applicationRDN'),$baseToUse); 
+        $appdst = preg_replace("/".preg_quote(get_ou('faiBaseRDN'), '/')."/",get_ou('applicationRDN'),"ou=".$name.",".$baseToUse) ; 
 
-        $mimesrc = preg_replace("/".preg_quote(get_ou('faiBaseRDN'))."/",get_ou('mimetypeRDN'),$baseToUse); 
-        $mimedst = preg_replace("/".preg_quote(get_ou('faiBaseRDN'))."/",get_ou('mimetypeRDN'),"ou=".$name.",".$baseToUse) ; 
+        $mimesrc = preg_replace("/".preg_quote(get_ou('faiBaseRDN'), '/')."/",get_ou('mimetypeRDN'),$baseToUse); 
+        $mimedst = preg_replace("/".preg_quote(get_ou('faiBaseRDN'), '/')."/",get_ou('mimetypeRDN'),"ou=".$name.",".$baseToUse) ; 
 
         /* Check if source depeartments exist */
         foreach(array($baseToUse,$appsrc,$mimesrc) as $dep){
index d62a5458c171324b0793d67c6146d48eac396d9e..4380ba3c7a10ec1bc44349d5393c21e9e5cf1f76 100644 (file)
@@ -173,7 +173,7 @@ class faiPackage extends plugin
 
       /* Assemble release name */
       $release = $this->parent->parent->fai_release;
-      $tmp= preg_replace('/[,]*'.preg_quote(get_ou('faiBaseRDN')).'.*$/', '', $release);
+      $tmp= preg_replace('/[,]*'.preg_quote(get_ou('faiBaseRDN'), '/').'.*$/', '', $release);
       $tmp= preg_replace('/ou=/', '', $tmp);
       $rev= array_reverse(split(',', $tmp));
       $this->FAIdebianRelease= "/";
@@ -407,13 +407,13 @@ class faiPackage extends plugin
     $ldap = $this->config->get_ldap_link();
     $ldap->cd ($this->dn);
     $release = $this->parent->parent->fai_release;
-    $use_dn = preg_replace("/".preg_quote(FAI::get_release_dn($this->dn))."/i", $release, $this->dn);
+    $use_dn = preg_replace("/".preg_quote(FAI::get_release_dn($this->dn), '/')."/i", $release, $this->dn);
     FAI::prepare_to_save_FAI_object($use_dn,array(),true);
     new log("remove","fai/".get_class($this),$use_dn,$this->attributes);
     foreach($this->ConfiguredPackages as $pkgname => $attrs){
       foreach($attrs as $name => $attr){
         $pkgdn =  "FAIvariable=".$name.",".$this->dn;
-        $use_dn = preg_replace("/".preg_quote(FAI::get_release_dn($this->dn))."/i", $release, $pkgdn);
+        $use_dn = preg_replace("/".preg_quote(FAI::get_release_dn($this->dn), '/')."/i", $release, $pkgdn);
         FAI::prepare_to_save_FAI_object($use_dn,array(),true);
       }
     }
@@ -495,7 +495,7 @@ class faiPackage extends plugin
     if($this->FAIdebianRelease == "ClearFromCopyPaste"){
 
       $current_release  = $this->parent->parent->fai_release;
-      $tmp= preg_replace('/,'.preg_quote(get_ou('faiBaseRDN')).'.*$/', '', $current_release);
+      $tmp= preg_replace('/,'.preg_quote(get_ou('faiBaseRDN'), '/').'.*$/', '', $current_release);
       $tmp= preg_replace('/ou=/', '', $tmp);
       $rev= array_reverse(split(',', $tmp));
       $this->FAIdebianRelease= "";
index d83ae91b6c1306b8eb65b2a8ea914949b496652c..acc749bfe775304e2e92b0a5c57e083fbc2a3fd9 100644 (file)
@@ -42,7 +42,7 @@ class faiPartitionTable extends plugin
       foreach($res as $obj){
 
         /* Skip not relevant objects */
-        if(!preg_match("/".preg_quote($this->dn)."$/i",$obj['dn'])) continue;
+        if(!preg_match("/".preg_quote($this->dn, '/')."$/i",$obj['dn'])) continue;
 
         $objects = array();
         $objects['description']  = "";
@@ -60,7 +60,7 @@ class faiPartitionTable extends plugin
         foreach($res as $obj){
 
           /* Skip not relevant objects */
-          if(!preg_match("/".preg_quote($disk['dn'])."$/i",$obj['dn'])) continue;
+          if(!preg_match("/".preg_quote($disk['dn'], '/')."$/i",$obj['dn'])) continue;
 
           $objects = array();
           $objects['status']      = "edited";
@@ -324,17 +324,17 @@ class faiPartitionTable extends plugin
     $ldap->cd ($this->dn);
 
     $release = $this->parent->parent->fai_release;
-    $use_dn = preg_replace("/".preg_quote(FAI::get_release_dn($this->dn))."/i", $release, $this->dn);
+    $use_dn = preg_replace("/".preg_quote(FAI::get_release_dn($this->dn), '/')."/i", $release, $this->dn);
 
     FAI::prepare_to_save_FAI_object($use_dn,array(),true);
     new log("remove","fai/".get_class($this),$use_dn,$this->attributes);   
     foreach($this->disks as $disk){
       $disk_dn = "cn=".$disk['cn'].",".$this->dn;
-      $use_dn = preg_replace("/".preg_quote(FAI::get_release_dn($this->dn))."/i",$release, $disk_dn);
+      $use_dn = preg_replace("/".preg_quote(FAI::get_release_dn($this->dn), '/')."/i",$release, $disk_dn);
       FAI::prepare_to_save_FAI_object($use_dn,array(),true);
       foreach($disk['partitions'] as $key => $partition){    
         $partition_dn= "FAIpartitionNr=".$partition['FAIpartitionNr'].",".$disk_dn;      
-        $use_dn = preg_replace("/".preg_quote(FAI::get_release_dn($this->dn))."/i", $release, $partition_dn);
+        $use_dn = preg_replace("/".preg_quote(FAI::get_release_dn($this->dn), '/')."/i", $release, $partition_dn);
         FAI::prepare_to_save_FAI_object($use_dn,array(),true);
       }
     }
@@ -502,7 +502,7 @@ class faiPartitionTable extends plugin
     foreach($res as $obj){
 
       /* Skip not relevant objects */
-      if(!preg_match("/".preg_quote($source['dn'])."$/i",$obj['dn'])) continue;
+      if(!preg_match("/".preg_quote($source['dn'], '/')."$/i",$obj['dn'])) continue;
 
       $objects = array();
       $objects['description']  = "";
@@ -520,7 +520,7 @@ class faiPartitionTable extends plugin
       foreach($res as $obj){
 
         /* Skip not relevant objects */
-        if(!preg_match("/".preg_quote($disk['dn'])."$/i",$obj['dn'])) continue;
+        if(!preg_match("/".preg_quote($disk['dn'], '/')."$/i",$obj['dn'])) continue;
 
         $objects = array();
         $objects['status']      = "edited";
index 9eca6ad6528a5e8ffdf63f358bfed6908801ec87..269652ff85d6b08e4f2faa123929054b25153f30 100644 (file)
@@ -364,7 +364,7 @@ class faiProfile extends plugin
     $ldap = $this->config->get_ldap_link();
     $ldap->cd ($this->dn);
     $release = $this->parent->parent->fai_release;
-    $use_dn = preg_replace("/".preg_quote(FAI::get_release_dn($this->dn))."/i", $release, $this->dn);
+    $use_dn = preg_replace("/".preg_quote(FAI::get_release_dn($this->dn), '/')."/i", $release, $this->dn);
     new log("remove","fai/".get_class($this),$use_dn,$this->attributes);
     FAI::prepare_to_save_FAI_object($use_dn,array(),true);
     $this->handle_post_events("remove");    
index a762beb54dee114183b6ef2fc0f68c3b98147fc5..7bdc914dbea37f2e342f2fc5e75321d1e18a1e70 100644 (file)
@@ -55,7 +55,7 @@ class faiScript extends plugin
       foreach($res as $obj){
 
         /* Skip not relevant objects */
-        if(!preg_match("/".preg_quote($this->dn)."$/i",$obj['dn'])) continue;
+        if(!preg_match("/".preg_quote($this->dn, '/')."$/i",$obj['dn'])) continue;
 
         $objects = array();
         $objects['status']      = "FreshLoaded";
@@ -432,12 +432,12 @@ class faiScript extends plugin
       $ldap = $this->config->get_ldap_link();
       $ldap->cd ($this->dn);
       $release = $this->parent->parent->fai_release;
-      $use_dn = preg_replace("/".preg_quote(FAI::get_release_dn($this->dn))."/i", $release, $this->dn);
+      $use_dn = preg_replace("/".preg_quote(FAI::get_release_dn($this->dn), '/')."/i", $release, $this->dn);
       new log("remove","fai/".get_class($this),$use_dn,$this->attributes);
       FAI::prepare_to_save_FAI_object($use_dn,array(),true);
  
       foreach($this->SubObjects as $name => $obj){
-        $use_dn = preg_replace("/".preg_quote(FAI::get_release_dn($this->dn))."/i", $release, $obj['dn']);
+        $use_dn = preg_replace("/".preg_quote(FAI::get_release_dn($this->dn), '/')."/i", $release, $obj['dn']);
         FAI::prepare_to_save_FAI_object($use_dn,array(),true);
       }
       $this->handle_post_events("remove");
@@ -590,7 +590,7 @@ class faiScript extends plugin
     foreach($res as $obj){
 
       /* Skip not relevant objects */
-      if(!preg_match("/".preg_quote($source['dn'])."$/i",$obj['dn'])) continue;
+      if(!preg_match("/".preg_quote($source['dn'], '/')."$/i",$obj['dn'])) continue;
 
       $objects = array();
       $objects['status']      = "edited";
index 6d6aa0b4250a4a788c58ed83f332bb9b7f29a137..905a97893c57c2297835ad542c6abcd531b7d569 100644 (file)
@@ -69,7 +69,7 @@ class faiSummaryTab extends plugin{
       /* Get Classes and release */
       $this->Classes = $this->parent->by_object['faiProfile']->FAIclasses;
       $this->base    = $this->parent->by_object['faiProfile']->parent->parent->fai_release;
-      $str = preg_replace("/^.*".preg_quote(get_ou('faiProfileRDN'))."/","",$this->dn);
+      $str = preg_replace("/^.*".preg_quote(get_ou('faiProfileRDN'), '/')."/","",$this->dn);
       $tmp  = $this->parent->by_object['faiProfile']->parent->parent->getBranches();
       $this->Release = $tmp[$this->base];
   
index 3bc50dd4a261643d3c366fc79f28387f1a383e12..5f0965c813376b397b02c65dedad423c1aa29fc8 100644 (file)
@@ -52,7 +52,7 @@ class faiTemplate extends plugin
       foreach($res as $obj){
 
         /* Skip not relevant objects */
-        if(!preg_match("/".preg_quote($this->dn)."$/i",$obj['dn'])) continue;
+        if(!preg_match("/".preg_quote($this->dn, '/')."$/i",$obj['dn'])) continue;
 
         $objects = array();
         $objects['status']      = "FreshLoaded";
@@ -382,12 +382,12 @@ class faiTemplate extends plugin
       $ldap = $this->config->get_ldap_link();
       $ldap->cd ($this->dn);
       $release = $this->parent->parent->fai_release;
-      $use_dn = preg_replace("/".preg_quote(FAI::get_release_dn($this->dn))."/i", $release, $this->dn);
+      $use_dn = preg_replace("/".preg_quote(FAI::get_release_dn($this->dn, '/'))."/i", $release, $this->dn);
       new log("remove","fai/".get_class($this),$use_dn,$this->attributes);
       FAI::prepare_to_save_FAI_object($use_dn,array(),true);
 
       foreach($this->SubObjects as $name => $obj){
-        $use_dn = preg_replace("/".preg_quote(FAI::get_release_dn($this->dn))."/i", $release, $obj['dn']);
+        $use_dn = preg_replace("/".preg_quote(FAI::get_release_dn($this->dn), '/')."/i", $release, $obj['dn']);
         FAI::prepare_to_save_FAI_object($use_dn,array(),true);
       }
       $this->handle_post_events("remove");
@@ -517,7 +517,7 @@ class faiTemplate extends plugin
     foreach($res as $obj){
 
       /* Skip not relevant objects */
-      if(!preg_match("/".preg_quote($source['dn'])."$/i",$obj['dn'])) continue;
+      if(!preg_match("/".preg_quote($source['dn'], '/')."$/i",$obj['dn'])) continue;
 
       $objects = array();
       $objects['status']      = "edited";
index f8f1b3be44483430aeca053dce72cf9e50cab267..c5e18af3b87af365aa3fe3182adfeebb3623c051 100644 (file)
@@ -257,12 +257,12 @@ class faiVariable extends plugin
       $ldap = $this->config->get_ldap_link();
       $ldap->cd ($this->dn);
       $release = $this->parent->parent->fai_release;
-      $use_dn = preg_replace("/".preg_quote(FAI::get_release_dn($this->dn))."/i", $release, $this->dn);
+      $use_dn = preg_replace("/".preg_quote(FAI::get_release_dn($this->dn), '/')."/i", $release, $this->dn);
       new log("remove","fai/".get_class($this),$use_dn,$this->attributes);
       FAI::prepare_to_save_FAI_object($use_dn,array(),true);
 
       foreach($this->SubObjects as $name => $obj){
-        $use_dn = preg_replace("/".preg_quote(FAI::get_release_dn($this->dn))."/i", $release, $obj['dn']);
+        $use_dn = preg_replace("/".preg_quote(FAI::get_release_dn($this->dn), '/')."/i", $release, $obj['dn']);
         FAI::prepare_to_save_FAI_object($use_dn,array(),true);
       }
       $this->handle_post_events("remove");
index 9ffb498abd8a43633e091235c20822b96f2f5c6a..650515abc4cda8d7670ed26b13365ce2af223080 100644 (file)
@@ -44,7 +44,7 @@ if ($remove_lock){
        }
        /* Page header*/
        if (session::is_set('objectinfo')){
-               $display= print_header(get_template_path($FAI->plIcon), _("Software deployment"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".@LDAP::fix(session::get('objectinfo')));
+               $display= print_header(get_template_path($FAI->plIcon), _("Software deployment"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".LDAP::fix(session::get('objectinfo')));
        } else {
                $display= print_header(get_template_path($FAI->plIcon), _("Software deployment"));
        }
index 962408b0b3fed98e97c52d531fa7d1a622a2d27e..1346ab95c728dc15547a0c9034e5e74eb05e9b32 100644 (file)
@@ -238,7 +238,7 @@ class blocklist extends plugin
 
           $dns_names = array();
           foreach($this->dns as $dn){
-            $dns_names[]=@LDAP::fix( $dn);
+            $dns_names[]=LDAP::fix( $dn);
           }
           add_lock ($this->dns, $this->ui->dn);
 
@@ -305,7 +305,7 @@ class blocklist extends plugin
 
         // Lock this dn for editing
         add_lock ($this->dn, $this->ui->dn);
-        $smarty->assign("info", msgPool::deleteInfo(@LDAP::fix($this->dn),_("blocklist")));
+        $smarty->assign("info", msgPool::deleteInfo(LDAP::fix($this->dn),_("blocklist")));
         $smarty->assign("multiple", false);
         return($smarty->fetch(get_template_path('remove.tpl', TRUE)));
       }
index 76faf09da9449da5a67cbe5505c76eecd0b7750c..8258b93ae6a92983de532db4740b5d0a82ece399 100644 (file)
@@ -180,7 +180,7 @@ class divListBlocklist extends MultiSelectWindow
       $field0 = array("string" => "<input type='checkbox' id='item_selected_".$key."' name='item_selected_".$key."'>" ,
                       "attach" => "style='width:20px;'");
       $field1 = array("string" => sprintf($blockimg,$val['dn']), "attach" => "style='text-align:center;width:20px;'");
-      $field2 = array("string" => sprintf($editlink,$key,$display), "attach" => "style='' title='".preg_replace('/ /', '&nbsp;', @LDAP::fix($val['dn']))."'");
+      $field2 = array("string" => sprintf($editlink,$key,$display), "attach" => "style='' title='".preg_replace('/ /', '&nbsp;', LDAP::fix($val['dn']))."'");
       $field3 = array("string" => preg_replace("/%KEY%/", "$key", $action), "attach" => "style='width:".$action_col_size."px;border-right:0px;text-align:right;'");
       $this->AddElement( array($field0,$field1,$field2,$field3));
     }
index 2bee86e454695397f5f5b0cbb7e5d5eb7716baf1..7cbadac08dd0a3e6a389f4f585f27b0a1dda6f64 100644 (file)
@@ -24,7 +24,7 @@ if ($remove_lock){
 
        /* Page header*/
        if (session::is_set('objectinfo')){
-               $display= print_header(get_template_path($blocklist->plIcon), _("Blocklist management"), "<img alt=\"\"align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".@LDAP::fix(session::get('objectinfo')));
+               $display= print_header(get_template_path($blocklist->plIcon), _("Blocklist management"), "<img alt=\"\"align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".LDAP::fix(session::get('objectinfo')));
        } else {
                $display= print_header(get_template_path($blocklist->plIcon), _("Blocklist management"));
        }
index 22381c1b41ebc790c3788adee5d3fe10272c0ef4..4deac179ff184bfa9fea6852c25967cdedfb8c48 100644 (file)
@@ -456,7 +456,7 @@ class gofaxAccount extends plugin
       /* Fetch all returned departments an add them to our divlist */
       while($value = $ldap->fetch()){
         if($value["description"][0]!=".."){
-          $this->departments[$value['dn']]=@LDAP::fix(convert_department_dn($value['dn'])." - [".$value["description"][0]."]");
+          $this->departments[$value['dn']]=LDAP::fix(convert_department_dn($value['dn'])." - [".$value["description"][0]."]");
         }else{
           $this->departments[$value['dn']]=$value["description"][0];
         }
@@ -538,7 +538,7 @@ class gofaxAccount extends plugin
       /* Get all departments */
       while($value = $ldap->fetch()){
         if(isset($value["description"][0])){
-          $this->departments[$value['dn']]=@LDAP::fix(convert_department_dn($value['dn'])." - [".$value["description"][0]."]");
+          $this->departments[$value['dn']]=LDAP::fix(convert_department_dn($value['dn'])." - [".$value["description"][0]."]");
         }else{
           $this->departments[$value['dn']]=$value["description"][0];
         }
index e0b758aafbbc4ff656d2bca05d3b8e39c722af53..7889e6d10a3743d434544f8aaa1971fca8e9cf81 100644 (file)
@@ -63,7 +63,7 @@ class phoneGeneric extends plugin
       $this->base= dn2base($ui->dn);
       $this->cn= "";
     } else {
-      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("phoneRDN"))."/", "", $this->dn);
+      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("phoneRDN"), '/')."/", "", $this->dn);
     }
   
     if($this->goFonMSN != ""){
index e95b17da6840d9ff3c474ecdc6faf3ec21dfb599..70554d531b416e6fd0824ddaea3ed13573b6520a 100644 (file)
@@ -186,7 +186,7 @@ class divListConference extends MultiSelectWindow
       }  
 
       /* Create title */
-      $title = " title='".preg_replace("/ /","&nbsp;",@LDAP::fix($data['dn']))."' ";
+      $title = " title='".preg_replace("/ /","&nbsp;",LDAP::fix($data['dn']))."' ";
 
       /* Cutted objects should be displayed in light grey */
       $display = $conference['cn'][0].$number;
index 899b2c231d9b850b5614dfe85b266a4b4ccd01cf..fe083b72da80d31da36fdadc0bb35cde03ff2c52 100644 (file)
@@ -119,7 +119,7 @@ class conference extends plugin
     } else {
 
       /* Get base */ 
-      $this->base = preg_replace ("/^[^,]+,".preg_quote(get_ou('phoneConferenceRDN'))."/i","",$this->dn);;
+      $this->base = preg_replace ("/^[^,]+,".preg_quote(get_ou('phoneConferenceRDN'), '/')."/i","",$this->dn);;
     }
 
     $this->goFonConferenceOwner=$this->ui->dn;
index a944a1571ef339f852266205208c83baea5afa99..ffa0f2ec230e7d7950541d7b726c5e99344d02a3 100644 (file)
@@ -197,7 +197,7 @@ class phoneConferenceManagment extends plugin
           /* Prepare entry list to be displayed */
           $dns_names = array();
           foreach($this->dns as $dn){
-            $dns_names[] = @LDAP::fix($dn);
+            $dns_names[] = LDAP::fix($dn);
           }
 
           /* Lock the current entry, so nobody will edit it during deletion */
@@ -265,7 +265,7 @@ class phoneConferenceManagment extends plugin
           return(gen_locked_message($conf, $this->dn));
         } else {
           add_lock ($this->dn, $this->ui->dn);
-          $smarty->assign("info", msgPool::deleteInfo(@LDAP::fix($this->dn),_("conference")));
+          $smarty->assign("info", msgPool::deleteInfo(LDAP::fix($this->dn),_("conference")));
           $smarty->assign("multiple", false);
           $display.= $smarty->fetch (get_template_path('remove.tpl', TRUE));
           return ($display);
index 3a10ee38347c6668da3bb44ff47b849aadb7b9d1..3717f5e54ff8e594ec2f91be3d3faef1c7c7fc11 100644 (file)
@@ -35,7 +35,7 @@ if ($remove_lock){
 
        /* Page header*/
        if (session::is_set('objectinfo')){
-               $display= print_header(get_template_path('plugins/gofon/images/conference.png'), _("Conference management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".@LDAP::fix(session::get('objectinfo')));
+               $display= print_header(get_template_path('plugins/gofon/images/conference.png'), _("Conference management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".LDAP::fix(session::get('objectinfo')));
        } else {
                $display= print_header(get_template_path('plugins/gofon/images/conference.png'), _("Conference management"));
        }
index 69c4db723bc6aee16299dec0aac7b7fdc173a162..d2ac863beffde6a757f892bc516d17da6a57d250 100644 (file)
@@ -185,7 +185,7 @@ class divListMacro extends MultiSelectWindow
       $field0 = array("string" => "<input type='checkbox' id='item_selected_".$key."' name='item_selected_".$key."'>" ,
                       "attach" => "style='width:20px;'");
       $field1 = array("string" => sprintf($macroimg,$val['dn']), "attach" => "style='text-align:center;width:20px;'");
-      $field2 = array("string" => sprintf($editlink,$key,$display), "attach" => "style='' title='".preg_replace('/ /', '&nbsp;', @LDAP::fix($val['dn']))."'");
+      $field2 = array("string" => sprintf($editlink,$key,$display), "attach" => "style='' title='".preg_replace('/ /', '&nbsp;', LDAP::fix($val['dn']))."'");
       $field3 = array("string" => $pic1, "attach" => "style='width:50px;'");
       $field4 = array("string" => preg_replace("/%KEY%/", "$key", $action), "attach" => "style='width:".$action_col_size."px;border-right:0px;text-align:right;'");
 
index d9f2cf6ba57ccb821949d76fb5812eeb863fa02e..8f0652ac5bed76438d29db20d344fa02384abc82 100644 (file)
@@ -63,7 +63,7 @@ class macro extends plugin
       }
     } else {
       $this->orig_cn=$this->cn;
-      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("phoneMacroRDN"))."/i", "", $this->dn);
+      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("phoneMacroRDN"), '/')."/i", "", $this->dn);
     }
 
     /* Check server configurations
index a13484cd58dbcdbf291f8ba0e92d20020b3f2df5..04cb48277e3ad6f23284d5e09d3a4534cbeb7357 100644 (file)
@@ -282,7 +282,7 @@ class goFonMacro extends plugin
 
           $dns_names = array();
           foreach($this->dns as $dn){
-            $dns_names[] = @LDAP::fix($dn);
+            $dns_names[] = LDAP::fix($dn);
           }
 
           /* Add entry locks */
@@ -363,7 +363,7 @@ class goFonMacro extends plugin
         /* Lock the current entry, so nobody will edit it during deletion */
         add_lock ($this->dn, $this->ui->dn);
         $smarty= get_smarty();
-        $smarty->assign("intro", msgPool::deleteInfo(@LDAP::fix($this->dn),_("macro")));
+        $smarty->assign("intro", msgPool::deleteInfo(LDAP::fix($this->dn),_("macro")));
         $smarty->assign("multiple", false);
         return($smarty->fetch (get_template_path('remove.tpl', TRUE)));
       } else {
index d29a5698a2af23d29717804aeb48986de04f1b70..9c0bc1bd3483be226e7d97ccddff41c154ca27d0 100644 (file)
@@ -41,7 +41,7 @@ if ($remove_lock){
     $display= print_header( get_template_path('images/macros.png'), 
                             _("Phone macro management"), 
                             "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> 
-                            ".@LDAP::fix(session::get('objectinfo')));
+                            ".LDAP::fix(session::get('objectinfo')));
   } else {
     $display= print_header(get_template_path('plugins/gofon/images/macros.png'), _("Phone macro management"));
   }
index 2176e776b63c367c75f5e4815535c1b00330aff5..cbef4a0f28687d534e2680b8f07687173fddb378 100644 (file)
@@ -217,7 +217,7 @@ class phoneAccount extends plugin
       /* Skip all macros we are not able to read 
           execpt, the currently selected macro.
        */
-      if(!preg_match("/r/",$acl) && !preg_match("/^".preg_quote($attrs['dn'])."/",$this->goFonMacro)){
+      if(!preg_match("/r/",$acl) && !preg_match("/^".preg_quote($attrs['dn'], '/')."/",$this->goFonMacro)){
         continue;
       }
 
index 4463602625d9c88fb8522d2a3e1f5bd3e4c22e01..5ae70c23b1d65f3d3c75b01b952bf301f66291e1 100644 (file)
@@ -183,7 +183,7 @@ class target_list extends MultiSelectWindow
       if(in_array($val['cn'][0],$this->Targets_used) || 
          isset($val['macAddress'][0]) && in_array($val['macAddress'][0],$this->Targets_used)) continue;
 
-      $title = "title='".preg_replace('/ /', '&nbsp;', @LDAP::fix($val['dn']))."'";
+      $title = "title='".preg_replace('/ /', '&nbsp;', LDAP::fix($val['dn']))."'";
       if(!isset($val['description'][0])){
         $desc = "";
       }else{
index f8364a09999fc3dd0ae42a310269a1fce468605c..df892ee231fc49dfe7688654a3f49cca02b42e51 100644 (file)
@@ -229,7 +229,7 @@ class application extends plugin
     restore_error_handler();
 
     /* Parse release out of object dn */
-    $release = preg_replace("/".get_ou("applicationRDN").preg_quote($this->base)."$/","",$this->dn);
+    $release = preg_replace("/".get_ou("applicationRDN").preg_quote($this->base, '/')."$/","",$this->dn);
     $release = preg_replace("/^cn=[^,]+,/","",$release);
 
     /* Get a list of all groups 
@@ -249,7 +249,7 @@ class application extends plugin
       $ldap->cd($release.$group);
       $ldap->search("(objectClass=gotoMenuEntry)",array("dn"));
       while($attrs = $ldap->fetch()){
-        $info = preg_replace("/".preg_quote($release.$group)."$/","",$attrs['dn']); 
+        $info = preg_replace("/".preg_quote($release.$group, '/')."$/","",$attrs['dn']); 
         if(preg_match("/^cn=".$this->cn."/",$info) && !preg_match("/ou=[^,]+,/",$info)){
           $found[] = $attrs['dn'];
         }
index 942e1c4bf5cfff6955df6f79e04d0f6e7368635a..6283ec927635f94b8cf4afe666296244be24c864 100644 (file)
@@ -356,7 +356,7 @@ class applicationManagement extends plugin
           $dns_names = array();
           foreach($this->dns as $dn){
             add_lock ($dn, $this->ui->dn);
-            $dns_names[] =@LDAP::fix($dn);
+            $dns_names[] =LDAP::fix($dn);
           }
 
           /* Lock the current entry, so nobody will edit it during deletion */
@@ -441,7 +441,7 @@ class applicationManagement extends plugin
         /* Lock the current entry, so nobody will edit it during deletion */
         add_lock ($this->dn, $this->ui->dn);
         $smarty= get_smarty();
-        $smarty->assign("intro",msgPool::deleteInfo(@LDAP::fix($this->dn),_("application")));
+        $smarty->assign("intro",msgPool::deleteInfo(LDAP::fix($this->dn),_("application")));
         $smarty->assign("multiple", false);
         return($smarty->fetch (get_template_path('remove.tpl', TRUE)));
       } else {
@@ -572,7 +572,7 @@ class applicationManagement extends plugin
     if(!$this->IsReleaseManagementActivated()){
       $use_base = $this->app_base;
       if($SubSearch){
-        $use_base = preg_replace("/^".preg_quote(get_ou("applicationRDN"))."/","",$use_base);
+        $use_base = preg_replace("/^".preg_quote(get_ou("applicationRDN"), '/')."/","",$use_base);
       }
     }else{
       $use_base = $this->app_release;
index 2d7a31ab4693d6ed21f99ec39d4617e8633765c6..a97cc103955367a266ca9858209d4d77875ed4f4 100644 (file)
@@ -198,7 +198,7 @@ class divListApplication extends MultiSelectWindow
         $actions.= "<img src='images/empty.png' alt='&nbsp;'>";
       }
 
-      $title = "title='".preg_replace('/ /', '&nbsp;', @LDAP::fix($val['dn']))."'";
+      $title = "title='".preg_replace('/ /', '&nbsp;', LDAP::fix($val['dn']))."'";
 
       if(!isset($val['description'][0])){
         $desc = "";
index e48883babd700320ed2e688642eacf5f78f62637..eaff4c32211c19cf18790c53d2f1bbeab1f16c40 100644 (file)
@@ -35,7 +35,7 @@ if ($remove_lock){
 
        /* Page header*/
        if (session::is_set('objectinfo')){
-               $display= print_header(get_template_path($applicationManagement->plIcon), _("Application management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".@LDAP::fix(session::get('objectinfo')));
+               $display= print_header(get_template_path($applicationManagement->plIcon), _("Application management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".LDAP::fix(session::get('objectinfo')));
        } else {
                $display= print_header(get_template_path($applicationManagement->plIcon), _("Application management"));
        }
index d82ac62e8d8a6ecc78b4ed4facdfc90e78208659..e8735a43571e9cb5f988053d31ed549565b2043a 100644 (file)
@@ -255,7 +255,7 @@ class deviceManagement extends plugin
 
           $dns_names = array();
           foreach($this->dns as $dn){
-            $dns_names[] =@LDAP::fix($dn);
+            $dns_names[] =LDAP::fix($dn);
           }
           add_lock ($this->dns, $this->ui->dn);
 
@@ -342,7 +342,7 @@ class deviceManagement extends plugin
         /* Lock the current entry, so nobody will edit it during deletion */
         add_lock ($this->dn, $this->ui->dn);
         $smarty= get_smarty();
-        $smarty->assign("intro", msgPool::deleteInfo(@LDAP::fix($this->dn),_("device")));
+        $smarty->assign("intro", msgPool::deleteInfo(LDAP::fix($this->dn),_("device")));
         $smarty->assign("multiple", false);
         return($smarty->fetch (get_template_path('remove.tpl', TRUE)));
       } else {
index 40d996d92c541eb1c0c0e9510741fda8755cf0cc..d81ebd460a5105ecbd8076f2dd1a62dcba24ec68 100644 (file)
@@ -165,7 +165,7 @@ class divListDevices extends MultiSelectWindow
         $actions.= "<img src='images/empty.png' alt='&nbsp;' class='center'>";
       }
 
-      $title = "title='".preg_replace('/ /', '&nbsp;', @LDAP::fix($val['dn']))."'";
+      $title = "title='".preg_replace('/ /', '&nbsp;', LDAP::fix($val['dn']))."'";
 
       if(!isset($val['description'][0])){
         $desc = "";
index 4dc8c7dee867f54ddc6f327f6f8d81ea90865379..45aaf4a433f34fd23e6b08b9dcb01aec2d03161e 100644 (file)
@@ -38,7 +38,7 @@ if ($remove_lock){
 
   /* Page header*/
   if (session::is_set('objectinfo')){
-    $display= print_header(get_template_path($DeviceManagement->plIcon), _("Hotplug device management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".@LDAP::fix(session::get('objectinfo')));
+    $display= print_header(get_template_path($DeviceManagement->plIcon), _("Hotplug device management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".LDAP::fix(session::get('objectinfo')));
   } else {
     $display= print_header(get_template_path($DeviceManagement->plIcon), _("Hotplug device management"));
   }
index 069c394238443205baeffd047dab132284176c7c..a6cb616bb099028804c6dd97c8b49f9a7a642824 100644 (file)
@@ -92,7 +92,7 @@ class appgroup extends plugin
           and fetch all applications from those departments.
        */
       foreach($app_deps as $dep){
-        if(preg_match("/^".preg_quote($release_info['suffix'])."/",$dep)){
+        if(preg_match("/^".preg_quote($release_info['suffix'], '/')."/",$dep)){
           $ret = array_merge($ret,get_list("(objectClass=gosaApplication)","application",$dep,array("*"),GL_NONE));
         }
       }
@@ -187,7 +187,7 @@ class appgroup extends plugin
           $all = $this->_get_all_entries();
           $found = FALSE;
           foreach($all as $entry){
-            if(isset($entry['DN']) && preg_match("/^".preg_quote($bb)."/",$entry['DN'])){
+            if(isset($entry['DN']) && preg_match("/^".preg_quote($bb, '/')."/",$entry['DN'])){
               $found =TRUE;
               break;
             }
@@ -259,7 +259,7 @@ class appgroup extends plugin
        */
       $cur          = &$this->a_Structure[0]['ENTRIES'];
       $parent_id    = $base['UNIQID'];
-      $sub_dn       = preg_replace("/,".preg_quote($this->dn)."$/","",$attrs['dn']);
+      $sub_dn       = preg_replace("/,".preg_quote($this->dn, '/')."$/","",$attrs['dn']);
       $sub_dn_array = split("\,",$sub_dn);
 
       /* Walk through our menu structure array while we have found 
@@ -431,8 +431,8 @@ class appgroup extends plugin
       $res = get_list("(objectClass=gosaDepartment)", "application", $this->curbase,array("description","cn","ou"),GL_SIZELIMIT);
       foreach($res as $value){
         $fdn = $value['dn'];
-        $fdn = preg_replace("/".preg_quote($this->curbase)."/","",$fdn);
-        $fdn= @LDAP::fix($fdn);
+        $fdn = preg_replace("/".preg_quote($this->curbase, '/')."/","",$fdn);
+        $fdn= LDAP::fix($fdn);
         if($value["description"][0]!=".."){
           $departments[$value['dn']]= convert_department_dn($fdn)." - [".$value["description"][0]."]";
         }else{
@@ -468,7 +468,7 @@ class appgroup extends plugin
       if(in_array($app['cn'][0],$used_apps)){
         continue;
       }
-      if(!preg_match("/".get_ou('applicationRDN').preg_quote($this->curbase)."$/",$app['dn'])){
+      if(!preg_match("/".get_ou('applicationRDN').preg_quote($this->curbase, '/')."$/",$app['dn'])){
         continue;
       }
 
index 079328181ee63f51141768cc38ec757edd80719b..8fe4e83f2d916f663be33ae78c94ac5107ec739b 100644 (file)
@@ -203,7 +203,7 @@ class divListMimeTypes extends MultiSelectWindow
         $action.= "<img src='images/empty.png' alt='&nbsp;' class='center'>";
       }
 
-      $title = "title='".preg_replace('/ /', '&nbsp;', @LDAP::fix($val['dn']))."'";
+      $title = "title='".preg_replace('/ /', '&nbsp;', LDAP::fix($val['dn']))."'";
 
       if(!isset($val['description'][0])){
         $desc = "";
index 97b28e77949865b12206b45b6ab3c17fc0586749..2e266a903c1e7c0fa4dbd2239c976fc60821ca4c 100644 (file)
@@ -129,7 +129,7 @@ class mimetype extends plugin
         $this->base= dn2base($ui->dn);
       }
     } else {
-      $this->base= preg_replace ("/^.*,".preg_quote(get_ou("mimetypeRDN"))."/", "", $this->dn);
+      $this->base= preg_replace ("/^.*,".preg_quote(get_ou("mimetypeRDN"), '/')."/", "", $this->dn);
     }
 
     /* Get icon data */
index ac4b762922a55cf42c7b0008cf84be0f80569e72..61285cda798367627f789519b0e12d9cf1228737 100644 (file)
@@ -366,7 +366,7 @@ class mimetypeManagement extends plugin
 
           $dns_names = array();
           foreach($this->dns as $dn){
-            $dns_names[] = @LDAP::fix($dn);
+            $dns_names[] = LDAP::fix($dn);
           }
 
           add_lock ($this->dns, $this->ui->dn);
@@ -453,7 +453,7 @@ class mimetypeManagement extends plugin
         /* Lock the current entry, so nobody will edit it during deletion */
         add_lock ($this->dn, $this->ui->dn);
         $smarty= get_smarty();
-        $smarty->assign("info", msgPool::deleteInfo(@LDAP::fix($this->dn),_("Mime type")));
+        $smarty->assign("info", msgPool::deleteInfo(LDAP::fix($this->dn),_("Mime type")));
         $smarty->assign("multiple", false);
         return($smarty->fetch (get_template_path('remove.tpl', TRUE)));
       } else {
@@ -585,7 +585,7 @@ class mimetypeManagement extends plugin
     if(!$this->IsReleaseManagementActivated()){
       $use_base = $this->mime_base;
       if($SubSearch){
-        $use_base = preg_replace("/^".preg_quote(get_ou("mimeou"))."/","",$use_base);
+        $use_base = preg_replace("/^".preg_quote(get_ou("mimeou"), '/')."/","",$use_base);
       }
     }else{
       $use_base = $this->mime_release;
@@ -682,7 +682,7 @@ class mimetypeManagement extends plugin
     if($this->start_pasting_copied_objects && $this->CopyPasteHandler->entries_queued()){
 
       /* Get dialog */
-      $this->CopyPasteHandler->SetVar("base",preg_replace("/^".preg_quote(get_ou("mimetypeRDN"))."/","",$this->mime_base));
+      $this->CopyPasteHandler->SetVar("base",preg_replace("/^".preg_quote(get_ou("mimetypeRDN"), '/')."/","",$this->mime_base));
       $this->CopyPasteHandler->SetVar("parent",$this);
       $data = $this->CopyPasteHandler->execute();
 
index 5acff3063a3c29149fbc9f26a4be89b7793a4756..79d8da876e8769f4fa1736ee475c4563e2c4e83c 100644 (file)
@@ -38,7 +38,7 @@ if ($remove_lock){
 
   /* Page header*/
   if (session::is_set('objectinfo')){
-    $display= print_header(get_template_path($MimeTypeManagement->plIcon), _("Mimetype management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".@LDAP::fix(session::get('objectinfo')));
+    $display= print_header(get_template_path($MimeTypeManagement->plIcon), _("Mimetype management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".LDAP::fix(session::get('objectinfo')));
   } else {
     $display= print_header(get_template_path('images/mimetypes.png'), _("Mimetype management"));
   }
index d6e2626e8da797dbb677077d4695faf9e2dd31ef..e12c79d6b9d022905079d7e4dfc58716a7910bc4 100644 (file)
@@ -63,11 +63,11 @@ class printgeneric extends plugin
 
     /* Update dn, to ensure storing as printer instead of WS / terminal */
     if(preg_match("/Terminal/i",$this->BelongsTo) || preg_match("/TerminalTemplate/i",$this->BelongsTo)){
-      $this->dn= preg_replace("/".preg_quote(get_ou('terminalRDN'))."/",get_ou('printerRDN'),$this->dn);
+      $this->dn= preg_replace("/".preg_quote(get_ou('terminalRDN'), '/')."/",get_ou('printerRDN'),$this->dn);
     }
 
     if(preg_match("/Workstation/i",$this->BelongsTo) || preg_match("/WorkstationTemplate/i",$this->BelongsTo)){
-      $this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'))."/",get_ou('printerRDN'),$this->dn);
+      $this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'), '/')."/",get_ou('printerRDN'),$this->dn);
     }
 
     $this->orig_dn = $this->dn;
@@ -96,10 +96,10 @@ class printgeneric extends plugin
     } else {
     
       /* Set base and check if the extracted base exists */
-      if(preg_match("/".preg_quote(get_ou('systemIncomingRDN'))."/",$this->dn)){
-        $this->base= preg_replace("/".preg_quote(get_ou('systemIncomingRDN'))."/","",dn2base($this->dn));
+      if(preg_match("/".preg_quote(get_ou('systemIncomingRDN'), '/')."/",$this->dn)){
+        $this->base= preg_replace("/".preg_quote(get_ou('systemIncomingRDN'), '/')."/","",dn2base($this->dn));
       }else{
-        $this->base= preg_replace("/".preg_quote(get_ou('printerRDN'))."/","",dn2base($this->dn));
+        $this->base= preg_replace("/".preg_quote(get_ou('printerRDN'), '/')."/","",dn2base($this->dn));
       }
 
       if(!isset($this->config->idepartments[$this->base])){
@@ -220,11 +220,11 @@ class printgeneric extends plugin
       /* Update dn, to ensure storing as printer instead of WS / terminal
        */
       if(preg_match("/terminal/i",$this->BelongsTo)){
-        $this->dn= preg_replace("/".preg_quote(get_ou('terminalRDN'))."/",get_ou('printerRDN'),$this->dn);
+        $this->dn= preg_replace("/".preg_quote(get_ou('terminalRDN'), '/')."/",get_ou('printerRDN'),$this->dn);
       }
 
       if(preg_match("/workstation/i",$this->BelongsTo)){
-        $this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'))."/",get_ou('printerRDN'),$this->dn);
+        $this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'), '/')."/",get_ou('printerRDN'),$this->dn);
       }
 
       /* Detect if this is a valid printer account;
@@ -569,11 +569,11 @@ class printgeneric extends plugin
       /* Update dn, to ensure storing as printer instead of WS / terminal
        */
       if(preg_match("/terminal/i",$this->BelongsTo)){
-        $this->dn= preg_replace("/".preg_quote(get_ou('terminalRDN')).",/",get_ou('printerRDN'),$this->dn);
+        $this->dn= preg_replace("/".preg_quote(get_ou('terminalRDN'), '/').",/",get_ou('printerRDN'),$this->dn);
       }
 
       if(preg_match("/workstation/i",$this->BelongsTo)){
-        $this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'))."/",get_ou('printerRDN'),$this->dn);
+        $this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'), '/')."/",get_ou('printerRDN'),$this->dn);
       }
 
       /* Check if this dn points to a printer, to avoid deleting something else */
@@ -716,11 +716,11 @@ class printgeneric extends plugin
     /* Update dn, to ensure storing as printer instead of WS / terminal
      */
     if(preg_match("/terminal/i",$this->BelongsTo)){
-      $this->dn= preg_replace("/".preg_quote(get_ou('terminalRDN'))."/",get_ou('printerRDN'),$this->dn);
+      $this->dn= preg_replace("/".preg_quote(get_ou('terminalRDN'), '/')."/",get_ou('printerRDN'),$this->dn);
     }
 
     if(preg_match("/workstation/i",$this->BelongsTo)){
-      $this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'))."/",get_ou('printerRDN'),$this->dn);
+      $this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'), '/')."/",get_ou('printerRDN'),$this->dn);
     }
     
     if(!$this->is_account) return;
@@ -847,7 +847,7 @@ class printgeneric extends plugin
     }
 
     /* Ensure to create a new object */
-    if(preg_match("/".preg_quote(get_ou('systemIncomingRDN'))."/",$this->orig_dn)){
+    if(preg_match("/".preg_quote(get_ou('systemIncomingRDN'), '/')."/",$this->orig_dn)){
       $this->orig_dn = "new";
     }
 
index d18612059dd397b881f15b333ba479f700e54624..0c043fe3c0728d5bb194c26de9c6d0eaee57530c 100644 (file)
@@ -126,7 +126,7 @@ class termgeneric extends plugin
       $ui= get_userinfo();
       $this->base= dn2base($ui->dn);
     } else {
-      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("terminalRDN"))."/", "", $this->dn);
+      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("terminalRDN"), '/')."/", "", $this->dn);
     }
 
     /* Create an array of all Syslog servers */
@@ -463,7 +463,7 @@ class termgeneric extends plugin
       }
       if ($ldap->count() != 0){
         while ($attrs= $ldap->fetch()){
-          if (preg_match("/cn=dhcp,/",$attrs['dn']) || preg_match ("/,".preg_quote(get_ou('systemIncomingRDN'))."/", $ldap->getDN())){
+          if (preg_match("/cn=dhcp,/",$attrs['dn']) || preg_match ("/,".preg_quote(get_ou('systemIncomingRDN'), '/')."/", $ldap->getDN())){
             continue;
           } else {
             if ($attrs['dn'] != $this->orig_dn){
index f156bc07507582fe557c873c3b3ed06a30080084..a19bfe318f5d4dc126c86d21508c6ba7a492df60 100644 (file)
@@ -639,7 +639,7 @@ class termservice extends plugin
            */
           $p = $this->parent->by_object['ogroup'];
           foreach($p->memberList as $dn => $obj){
-            if(preg_match("/".preg_quote(get_ou("systemIncomingRDN"))."/",$dn)) continue;
+            if(preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/",$dn)) continue;
             if(isset($p->objcache[$dn]['macAddress']) && !empty($p->objcache[$dn]['macAddress'])){
               $macs[] = $p->objcache[$dn]['macAddress'];
             }
@@ -649,7 +649,7 @@ class termservice extends plugin
           /* We are a workstation. Add current mac.
            */
           $mac = $this->parent->by_object['workgeneric']->netConfigDNS->macAddress;
-          if(!empty($mac) && !preg_match("/".preg_quote(get_ou("systemIncomingRDN"))."/",$this->orig_dn)){
+          if(!empty($mac) && !preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/",$this->orig_dn)){
             $macs[] = $mac;
           }
         }
index 4ec0149260391411df36c9f32f8d1f7a702c2958..7246e559782671d88870fd27aa25bafab71a8fb7 100644 (file)
@@ -143,7 +143,7 @@ class workgeneric extends plugin
       $ui= get_userinfo();
       $this->base= dn2base($ui->dn);
     } else {
-      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("workstationRDN"))."/i", "", $this->dn);
+      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("workstationRDN"), '/')."/i", "", $this->dn);
     }
 
     /* Create an array of all Syslog servers */
@@ -502,7 +502,7 @@ class workgeneric extends plugin
     }else{
       /* Warn the user, that this host is currently installing */
       if($this->currently_installing && !$this->currently_installing_warned && 
-          !preg_match("/".preg_quote(get_ou("systemIncomingRDN"))."/",$this->orig_dn)){
+          !preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/",$this->orig_dn)){
       
         /* Force aborting without message dialog */
         $message[] = "";
index f3a7f17a15c52d155e5c3503335b8042cf880631..f0fcff4e40bab939967d2b0eb1d0649369f9edfd 100644 (file)
@@ -527,7 +527,7 @@ class workservice extends plugin
            */
           $p = $this->parent->by_object['ogroup'];
           foreach($p->memberList as $dn => $obj){
-            if(preg_match("/".preg_quote(get_ou("systemIncomingRDN"))."/",$dn)) continue;
+            if(preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/",$dn)) continue;
             if(isset($p->objcache[$dn]['macAddress']) && !empty($p->objcache[$dn]['macAddress'])){
               $macs[] = $p->objcache[$dn]['macAddress'];
             }
@@ -537,7 +537,7 @@ class workservice extends plugin
           /* We are a workstation. Add current mac.
            */
           $mac = $this->parent->by_object['workgeneric']->netConfigDNS->macAddress;
-          if(!empty($mac) && !preg_match("/".preg_quote(get_ou("systemIncomingRDN"))."/",$this->orig_dn)){
+          if(!empty($mac) && !preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/",$this->orig_dn)){
             $macs[] = $mac;
           }          
         }
index 3b623259d1316bf5cac5209fa0edf2758f3605cf..da4a7d674251387f1212461898f481ef3ff38c62 100644 (file)
@@ -1338,7 +1338,7 @@ class workstartup extends plugin
    */
   function dn_to_release_name($dn)
   {
-    $relevant = preg_replace("/,".preg_quote(get_ou("faiBaseRDN")).".*$/","",$dn);
+    $relevant = preg_replace("/,".preg_quote(get_ou("faiBaseRDN"), '/').".*$/","",$dn);
     $parts    = array_reverse(split("\,",$relevant));
     $str ="";
     foreach($parts as $part){
index f2dc8669c91085d73b75e1aa1581398643aa4016..165659b461ef19b0cbafccafe318685bb45970c5 100644 (file)
@@ -106,7 +106,7 @@ class goLdapServer extends goService{
       while($attrs = $ldap->fetch()){
         $ldapServer = array();
         for($i = 0 ; $i < $attrs['gotoLdapServer']['count'] ; $i ++ ){
-          $ldapServer[] = preg_replace("/".preg_quote($this->oldBase)."/",$this->goLdapBase,$attrs['gotoLdapServer'][$i]);
+          $ldapServer[] = preg_replace("/".preg_quote($this->oldBase, '/')."/",$this->goLdapBase,$attrs['gotoLdapServer'][$i]);
         }
         $new[$attrs['dn']]['gotoLdapServer'] = $ldapServer;
       }
index 323a25fcd5d020cac6f609b3f8a68b94f78573f5..8bed2866af2dfb17f135e6ca7c1de611d54375ad 100644 (file)
@@ -93,7 +93,7 @@ class ldifexport extends plugin
     if((!preg_match("/r/",$acls)) && (isset($dn))){
 
       /* Show error msg */      
-      msg_dialog::display(_("Permission error"), sprintf(_("You have no permission to export '%s'!"),@LDAP::fix($dn)), ERROR_DIALOG);
+      msg_dialog::display(_("Permission error"), sprintf(_("You have no permission to export '%s'!"),LDAP::fix($dn)), ERROR_DIALOG);
 
       /* Show main page */
       $smarty->assign("LDIFError",TRUE);
index 33250ca77dc237186f710d8ea70e5d4627e57251..8af43592e145263a08c06208c9c9eb2eae5448c2 100644 (file)
@@ -103,7 +103,7 @@ class xlsexport extends plugin
     if(!preg_match("/r/",$acls) && (isset($_POST['sfrmgetsingle']) || isset($_POST['sfrmgetfull']) || isset($_POST['sfrmgetivbb']))){
 
       /* Show error msg */      
-      msg_dialog::display(_("Permission error"), sprintf(_("You have no permission to export '%s'!"),@LDAP::fix($dn)), ERROR_DIALOG);
+      msg_dialog::display(_("Permission error"), sprintf(_("You have no permission to export '%s'!"),LDAP::fix($dn)), ERROR_DIALOG);
 
       /* Show main page */
       $smarty->assign("LDIFError",TRUE);
index 42b8781c2300526bd202231c132b03dbd7a80b83..794ab8af832e0387950742fc63dcfb61a098d261 100644 (file)
@@ -307,9 +307,9 @@ class gosa_logview extends plugin
         if(isset($this->uid_map[$line['user']])){
           $user = $this->uid_map[$line['user']];
         }else{
-          $user = preg_replace("/,".preg_quote($this->config->current['BASE'])."/",$base,$line['user']);
+          $user = preg_replace("/,".preg_quote($this->config->current['BASE'], '/')."/",$base,$line['user']);
         }
-        $object = preg_replace("/,".preg_quote($this->config->current['BASE'])."/",$base,$line['object']);
+        $object = preg_replace("/,".preg_quote($this->config->current['BASE'], '/')."/",$base,$line['object']);
 
         $res.=" <tr style=\"$col\">\n";
         $res.="   <td title='".$line['objecttype']."'>".$line['action']."</td>";
index d9159bafb9a171e0afad7630c698fc904602d851..47612b903fcc1971fdf5c04f6170122a0f4f63d6 100644 (file)
@@ -241,7 +241,7 @@ class mailqueue extends plugin
     foreach($hosts as $mac){
       $found = FALSE;
       foreach($res as $entry){
-        if(preg_match("/^".preg_quote($mac)."$/i",$entry['macAddress'][0])){
+        if(preg_match("/^".preg_quote($mac, '/')."$/i",$entry['macAddress'][0])){
           $ret[$mac] = $entry['cn'][0];
           $found = TRUE;
           break;
index 553150cd8e652ee2839c33a7c529dffdc2edd817..3eb055bde5f576fed9d53d28dc24c389fdf9df65 100644 (file)
@@ -38,7 +38,7 @@ class si_mailqueue extends gosaSupportDaemon
 
     /* Prepare search filter 
      */
-    $search_str = preg_replace("/\\\\\*/",".*",preg_quote($search_str));
+    $search_str = preg_replace("/\\\\\*/",".*",preg_quote($search_str, '/'));
 
     /* Query mailqueue 
      */
index 5553dfd666082b3d1cbb9992d865d71b22b9de8b..c050ed4e7019e0697f24743c0ccbffe3175781b9 100644 (file)
@@ -155,7 +155,7 @@ class mailMethodCyrus extends mailMethod
 
         /* Cut domain name */
         $val = preg_replace("/@.*$/","",$val);
-        $result[]=preg_replace ("/^.*".preg_quote($folder)."/","INBOX", mb_convert_encoding($val, "UTF-8", "UTF7-IMAP"));
+        $result[]=preg_replace ("/^.*".preg_quote($folder, '/')."/","INBOX", mb_convert_encoding($val, "UTF-8", "UTF7-IMAP"));
       }
     }
 
index 970f2c7f3295cd58617cf81538e854fd7d34c2f6..21f914eeca83ced05fa15d506201215abbcec9f6 100644 (file)
@@ -183,7 +183,7 @@ class krbHostKeys extends plugin
            */
           foreach($this->server_list as $server => $data){
             foreach($data['PRINCIPALS'] as $p_name){
-              if(preg_match("/\/".preg_quote($this->namingAttr)."\@/",$p_name)){
+              if(preg_match("/\/".preg_quote($this->namingAttr, '/')."\@/",$p_name)){
                 $pre = preg_replace("/\/.*$/","/",$p_name);
                 $this->delete_key($server, $pre.$this->namingAttr."@".$data['REALM']);
                 $this->create_key($server, $pre.$this->object->cn."@".$data['REALM']);
@@ -204,7 +204,7 @@ class krbHostKeys extends plugin
 
             /* Collect all principals for the current host. 
              */
-            if(preg_match("/\/".preg_quote($this->namingAttr)."\@/",$p_name)){
+            if(preg_match("/\/".preg_quote($this->namingAttr, '/')."\@/",$p_name)){
               $pre = preg_replace("/\/.*$/","/",$p_name);
               $found[] = "<b>".$pre.$this->namingAttr."@".$data['REALM']."</b> ".
                 _("updated to").
@@ -265,7 +265,7 @@ class krbHostKeys extends plugin
       $master_princ = $prefix.$this->namingAttr."@".$realm;
 
       foreach($server['PRINCIPALS'] as $id => $princ){
-        if(preg_match("/^".preg_quote($master_princ)."$/i",$princ)){
+        if(preg_match("/^".preg_quote($master_princ, '/')."$/i",$princ)){
           $found = TRUE;
           break;
         }
@@ -297,8 +297,8 @@ class krbHostKeys extends plugin
        */
       if(!$service_plugin){
         foreach($server['PRINCIPALS'] as $id => $princ){
-          if(preg_match("/".preg_quote("/".$this->namingAttr."@")."/i",$princ) &&
-              !preg_match("/^".preg_quote($prefix)."/",$princ)){
+          if(preg_match("/".preg_quote("/".$this->namingAttr."@", '/')."/i",$princ) &&
+              !preg_match("/^".preg_quote($prefix, '/')."/",$princ)){
 
             /* Display buttons to "create" or to "remove/recreate" wheteher the prefix esists or not 
              */
@@ -428,7 +428,7 @@ class krbHostKeys extends plugin
 
         /* Detect all principals for the current host.
          */
-        if(preg_match("/".preg_quote($prefix.$this->namingAttr)."\@/",$p_name)){
+        if(preg_match("/".preg_quote($prefix.$this->namingAttr, '/')."\@/",$p_name)){
           $this->delete_key($server, $p_name);
         }
       }
index 7791cb4e0a42f4e9e85f3f3cef111600928419dc..c09a13a9eb3221448d96b380eaefdf119ad4f99e 100644 (file)
@@ -118,7 +118,7 @@ class netatalk extends plugin {
     if($this->dn === "new" || $this->dn === NULL) {
       $base  = session::get('CurrentMainBase');
     } else {
-      $base = preg_replace("/^[^,]+,".preg_quote(get_people_ou())."/","",$this->dn);
+      $base = preg_replace("/^[^,]+,".preg_quote(get_people_ou(), '/')."/","",$this->dn);
     }
 
     $ldap->cd($base);
index 1cc1186f9f58076c72953f3ab4aad58e94964bdf..5f150b223e3efb09ee45a46ff0311c980f5c7e9e 100644 (file)
@@ -108,7 +108,7 @@ class opsiGeneric extends plugin
          #FIXME Implement an opsi method which returns infos for only one opsi client, not all. 
        */
       foreach($list as $entry){
-        if(preg_match("/^".preg_quote($this->hostId)."$/i",$entry['NAME'][0]['VALUE'])){
+        if(preg_match("/^".preg_quote($this->hostId, '/')."$/i",$entry['NAME'][0]['VALUE'])){
           $this->initially_was_account = TRUE; 
           $this->is_account = TRUE;
           foreach(array(
index 1cac6ba02cda3267c982e5e7bfeb60e37b393a19..e88b9ebe5146cd87aa4dfbec36529aa2d3b719c7 100644 (file)
@@ -59,7 +59,7 @@ class wingeneric extends plugin
       $this->base= dn2base($ui->dn);
       $this->cn= "";
     } else {
-      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_winstations_ou())."/", "", $this->dn);
+      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_winstations_ou(), '/')."/", "", $this->dn);
     }
 
     $this->cn= preg_replace("/\\\$\$/","",$this->cn);
index a47b6f629424b478c16676c93df01b82732ac081..924115d15b0fafb76ac53b631929f7146a41f75a 100644 (file)
@@ -178,7 +178,7 @@ class divListSudo extends MultiSelectWindow
           src='images/lists/trash.png' alt='".msgPool::delButton()."' name='sudo_del_%KEY%' title='"._("Delete this entry")."'>";
       }
 
-      $title = "title='".preg_replace('/ /', '&nbsp;', @LDAP::fix($val['dn']))."'";
+      $title = "title='".preg_replace('/ /', '&nbsp;', LDAP::fix($val['dn']))."'";
 
       if(!isset($val['description'][0])){
         $desc = "";
index 8c08ad30008f1e14e7b9d5d2dd7deefddde44b43..81c9de50ad661a8ce6ac96defb1b192f86c19620 100644 (file)
@@ -171,7 +171,7 @@ class target_list_systems extends MultiSelectWindow
       if(in_array($val['cn'][0],$this->Targets_used) || 
          isset($val['macAddress'][0]) && in_array($val['macAddress'][0],$this->Targets_used)) continue;
 
-      $title = "title='".preg_replace('/ /', '&nbsp;', @LDAP::fix($val['dn']))."'";
+      $title = "title='".preg_replace('/ /', '&nbsp;', LDAP::fix($val['dn']))."'";
       if(!isset($val['description'][0])){
         $desc = "";
       }else{
index 9e8f26248aafd0aa5ec5757a661e504935cc7d0b..c903563e159a8ad798556d65be3d25dfc9c45b5c 100644 (file)
@@ -167,7 +167,7 @@ class target_list_users extends MultiSelectWindow
 
       if(in_array($val['cn'][0],$this->Targets_used)) continue;
 
-      $title = "title='".preg_replace('/ /', '&nbsp;', @LDAP::fix($val['dn']))."'";
+      $title = "title='".preg_replace('/ /', '&nbsp;', LDAP::fix($val['dn']))."'";
       if(!isset($val['description'][0])){
         $desc = "";
       }else{
index ed768b49d8d82a228aa0fa4d531189bf479c5707..396feff873603737a871dc01f5ac13a8d0edb66f 100644 (file)
@@ -41,7 +41,7 @@ if ($remove_lock){
     $display= print_header(get_template_path('plugins/sudo/images/sudo.png'),
                             _("Sudo role administration"), "<img alt=\"\" align=\"middle\" src=\"".
                             get_template_path('images/lists/locked.png')."\"> ".
-                            @LDAP::fix(session::get('objectinfo')));
+                            LDAP::fix(session::get('objectinfo')));
   } else {
     $display= print_header(get_template_path('plugins/sudo/images/sudo.png'), _("Sudo role administration"));
   }
index 72a770afbea776a5d971c0f7e76ed6748c72ba3c..766fe3b4be20ecf1a831d370aac74f577650bc1d 100644 (file)
@@ -50,7 +50,7 @@ class componentGeneric extends plugin
       $this->base= dn2base($ui->dn);
       $this->cn= "";
     } else {
-      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("componentRDN"))."/", "", $this->dn);
+      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("componentRDN"), '/')."/", "", $this->dn);
     }
     $this->netConfigDNS = new termDNS($this->config,$this,$this->objectclasses, true);
     /* Save dn for later references */
@@ -232,7 +232,7 @@ class componentGeneric extends plugin
           if(preg_match("/cn=dhcp,/",$attrs['dn'])){
             continue;
           }
-          if ($attrs['dn'] != $this->orig_dn && preg_match("/".preg_quote(get_ou("componentRDN"))."/",$attrs['dn'])){
+          if ($attrs['dn'] != $this->orig_dn && preg_match("/".preg_quote(get_ou("componentRDN"), '/')."/",$attrs['dn'])){
             $message[]= msgPool::duplicated(_("Component name"));
             break;
           }
index a68c74497b3e0614001340d4aeb18fad8ef07445..88cd4f5113b85369796f13431959b182498c635e 100644 (file)
@@ -390,7 +390,7 @@ class divListSystem extends MultiSelectWindow
       $field1 = array("string" => sprintf($img['img'],$val['dn']),
           "attach" => "style='text-align:center;width:20px;'");
       $field2 = array("string" => sprintf($editlink,$key,$display),
-          "attach" => "style='' title='".preg_replace('/ /', '&nbsp;', @LDAP::fix($val['dn']))."'");
+          "attach" => "style='' title='".preg_replace('/ /', '&nbsp;', LDAP::fix($val['dn']))."'");
       $field3 = array("string" => preg_replace("/%KEY%/", "$key", $action2.$action),
           "attach" => "style='width:".$action_col_size."px;border-right:0px;text-align:right;'");
 
index 44b1cc4a8579e14ac8eca178d43d23df3549442b..9bfa325eb9c2e2a516340e38e961dd0e7e6a0944 100644 (file)
@@ -92,7 +92,7 @@ class servgeneric extends plugin
       $this->base= dn2base($ui->dn);
       $this->cn= "";
     } else {
-      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("serverRDN"))."/", "", $this->dn);
+      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("serverRDN"), '/')."/", "", $this->dn);
     }
     $this->netConfigDNS = new termDNS($this->config,$this,$this->objectclasses);
     $this->netConfigDNS->set_acl_category("server");
@@ -361,7 +361,7 @@ class servgeneric extends plugin
     }
 
     /* Warn the user, that this host is currently installing */
-    if($this->currently_installing && !$this->currently_installing_warned && !preg_match("/".preg_quote(get_ou("systemIncomingRDN"))."/",$this->orig_dn)){
+    if($this->currently_installing && !$this->currently_installing_warned && !preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/",$this->orig_dn)){
 
       /* Force aborting without message dialog */
       $message[] = "";
index 07cea7c68d115b9770931d5fb45c2312c7314a5c..40d58f000f3e72d06a2c9a62b782e56288d3f624 100644 (file)
@@ -863,7 +863,7 @@ class systems extends plugin
           $dns_names = array();
           foreach($this->dns as $dn){
             add_lock ($dn, $this->ui->dn);
-            $dns_names[] = @LDAP::fix($dn);
+            $dns_names[] = LDAP::fix($dn);
           }
 
           /* Lock the current entry, so nobody will edit it during deletion */
@@ -1041,7 +1041,7 @@ class systems extends plugin
 
       $dialog     = FALSE;
       $hide_apply = $this->dn == "new";
-      $hide_apply = ($this->dn == "new") || (preg_match("/".preg_quote(get_ou("systemIncomingRDN"))."/",$this->dn));
+      $hide_apply = ($this->dn == "new") || (preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/",$this->dn));
       if(is_object($this->systab) && !isset($this->systab->by_object)){
         $dialog = TRUE;
         $hide_apply = TRUE;
@@ -1261,7 +1261,7 @@ class systems extends plugin
       }
 
       /* Create a string containing the last part of the department. */
-      $dn_name = preg_replace("#^([^/]+/)*#","",convert_department_dn(@LDAP::fix($tmp)));
+      $dn_name = preg_replace("#^([^/]+/)*#","",convert_department_dn(LDAP::fix($tmp)));
       if(empty($dn_name)){
         $dn_name = "/";
       }
index 059e4f9614878df1c3be98e1c1fb0a5490b17105..1cf1a4c1848c6c192ad48f8426c3eb88f57adf55 100644 (file)
@@ -1035,7 +1035,7 @@ class termDNS extends plugin
 
   function get_dhcp_parent_node()
   {
-    return(preg_replace("/^cn=".preg_quote($this->cn).",/","",$this->get_dhcp_host_entry_dn()));
+    return(preg_replace("/^cn=".preg_quote($this->cn, '/').",/","",$this->get_dhcp_host_entry_dn()));
   }
 
 
@@ -1084,7 +1084,7 @@ class termDNS extends plugin
       $tmp = array_flip($this->Zones);
       $tmp = preg_replace("/^[^\/]*+\//","",$tmp[$this->dnsEntry['zoneName']]);
       $tmp = trim(preg_replace("/\.in-addr.arpa$/","",$tmp));
-      $ptr = preg_replace("/^".preg_quote(DNS::FlipIp($tmp))."\./","",$this->ipHostNumber);
+      $ptr = preg_replace("/^".preg_quote(DNS::FlipIp($tmp), '/')."\./","",$this->ipHostNumber);
       return($ptr);
     }else{
       return(FALSE);
@@ -1111,7 +1111,7 @@ class termDNS extends plugin
     $ret = array();
     foreach($arr as $r => $name){
       $base_part = str_replace($base,"",$r);
-      if(preg_match("/^[a-z]*=".preg_quote($name)."(|,)$/i",$base_part)){
+      if(preg_match("/^[a-z]*=".preg_quote($name, '/')."(|,)$/i",$base_part)){
         $ret[$r] = $current.$name;
         $tmp = $this->create_tree($arr,$r,$current.".&nbsp;");
         foreach($tmp as $sub_key => $sub_name){
index ee86742e3a1d99880488a8369cdf030d1f0fce63..99dc629f3bff47a303cb3edc630df5b4f67bbf96 100644 (file)
@@ -43,7 +43,7 @@ if ($remove_lock){
 
        /* Page header*/
        if (session::is_set('objectinfo')){
-               $display= print_header(get_template_path($systems->plIcon), _("System management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".@LDAP::fix(session::get('objectinfo')));
+               $display= print_header(get_template_path($systems->plIcon), _("System management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".LDAP::fix(session::get('objectinfo')));
        } else {
                $display= print_header(get_template_path($systems->plIcon), _("System management"));
        }