From 049d82cc1f343b829bcfdcb751a0b2222d3d7f15 Mon Sep 17 00:00:00 2001 From: cajus Date: Fri, 31 Oct 2008 16:19:40 +0000 Subject: [PATCH] Added delimiter to preg_quote git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12852 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_SnapShotDialog.inc | 2 +- gosa-core/include/class_config.inc | 4 +-- gosa-core/include/class_plugin.inc | 26 ++++++++-------- gosa-core/include/class_userinfo.inc | 2 +- gosa-core/include/functions.inc | 10 +++---- gosa-core/plugins/admin/acl/main.inc | 2 +- .../departments/class_departmentGeneric.inc | 22 +++++++------- .../class_departmentManagement.inc | 2 +- .../departments/class_divListDepartment.inc | 2 +- gosa-core/plugins/admin/departments/main.inc | 2 +- .../admin/groups/class_divListGroup.inc | 4 +-- .../admin/groups/class_groupGeneric.inc | 2 +- .../admin/groups/class_groupManagement.inc | 4 +-- gosa-core/plugins/admin/groups/main.inc | 2 +- .../admin/ogroups/class_divListOGroup.inc | 2 +- .../plugins/admin/ogroups/class_ogroup.inc | 6 ++-- .../admin/ogroups/class_ogroupManagement.inc | 4 +-- gosa-core/plugins/admin/ogroups/main.inc | 2 +- .../admin/users/class_divListUsers.inc | 2 +- .../admin/users/class_userManagement.inc | 8 ++--- gosa-core/plugins/admin/users/main.inc | 2 +- gosa-core/setup/class_setupStep_Ldap.inc | 2 +- gosa-core/setup/class_setupStep_Migrate.inc | 24 +++++++-------- .../addons/addressbook/class_addressbook.inc | 4 +-- .../systems/services/dhcp/class_servDHCP.inc | 10 +++---- .../admin/systems/services/dns/class_DNS.inc | 10 +++---- .../systems/services/dns/class_servDNS.inc | 6 ++-- .../services/dns/class_servDNSeditZone.inc | 2 +- gosa-plugins/fai/admin/fai/class_FAI.inc | 30 +++++++++---------- .../fai/admin/fai/class_divListFai.inc | 2 +- gosa-plugins/fai/admin/fai/class_faiHook.inc | 8 ++--- .../fai/admin/fai/class_faiManagement.inc | 22 +++++++------- .../fai/admin/fai/class_faiPackage.inc | 8 ++--- .../fai/admin/fai/class_faiPartitionTable.inc | 14 ++++----- .../fai/admin/fai/class_faiProfile.inc | 2 +- .../fai/admin/fai/class_faiScript.inc | 8 ++--- .../fai/admin/fai/class_faiSummaryTab.inc | 2 +- .../fai/admin/fai/class_faiTemplate.inc | 8 ++--- .../fai/admin/fai/class_faiVariable.inc | 4 +-- gosa-plugins/fai/admin/fai/main.inc | 2 +- .../blocklists/class_blocklistManagement.inc | 4 +-- .../blocklists/class_divListBlocklists.inc | 2 +- gosa-plugins/gofax/gofax/blocklists/main.inc | 2 +- .../gofax/faxaccount/class_gofaxAccount.inc | 4 +-- .../systems/gofon/class_phoneGeneric.inc | 2 +- .../conference/class_divListConferences.inc | 2 +- .../class_phoneConferenceGeneric.inc | 2 +- .../class_phoneConferenceManagment.inc | 4 +-- gosa-plugins/gofon/gofon/conference/main.inc | 2 +- .../gofon/gofon/macro/class_divListMacros.inc | 2 +- .../gofon/gofon/macro/class_gofonMacro.inc | 2 +- .../macro/class_gofonMacroManagement.inc | 4 +-- gosa-plugins/gofon/gofon/macro/main.inc | 2 +- .../gofon/phoneaccount/class_phoneAccount.inc | 2 +- .../goto/addons/goto/class_target_list.inc | 2 +- .../applications/class_applicationGeneric.inc | 4 +-- .../class_applicationManagement.inc | 6 ++-- .../applications/class_divListApplication.inc | 2 +- gosa-plugins/goto/admin/applications/main.inc | 2 +- .../admin/devices/class_deviceManagement.inc | 4 +-- .../admin/devices/class_divListDevices.inc | 2 +- gosa-plugins/goto/admin/devices/main.inc | 2 +- .../groups/apps/class_groupApplication.inc | 12 ++++---- .../mimetypes/class_divListMimeTypes.inc | 2 +- .../admin/mimetypes/class_mimetypeGeneric.inc | 2 +- .../mimetypes/class_mimetypeManagement.inc | 8 ++--- gosa-plugins/goto/admin/mimetypes/main.inc | 2 +- .../admin/systems/goto/class_printGeneric.inc | 24 +++++++-------- .../systems/goto/class_terminalGeneric.inc | 4 +-- .../systems/goto/class_terminalService.inc | 4 +-- .../systems/goto/class_workstationGeneric.inc | 4 +-- .../systems/goto/class_workstationService.inc | 4 +-- .../systems/goto/class_workstationStartup.inc | 2 +- .../services/ldap/class_goLdapServer.inc | 2 +- .../addons/ldapmanager/class_export.inc | 2 +- .../addons/ldapmanager/class_exportxls.inc | 2 +- .../log/addons/logview/class_gosa_logview.inc | 4 +-- .../mail/addons/mailqueue/class_mailqueue.inc | 2 +- .../addons/mailqueue/class_si_mailqueue.inc | 2 +- .../mail/class_mail-methods-cyrus.inc | 2 +- .../services/kerberos/class_krb_host_keys.inc | 12 ++++---- .../personal/netatalk/class_netatalk.inc | 2 +- .../opsi/admin/opsi/class_opsigeneric.inc | 2 +- .../admin/systems/samba/class_winGeneric.inc | 2 +- .../sudo/admin/sudo/class_divListSudo.inc | 2 +- .../admin/sudo/class_target_list_systems.inc | 2 +- .../admin/sudo/class_target_list_users.inc | 2 +- gosa-plugins/sudo/admin/sudo/main.inc | 2 +- .../admin/systems/class_componentGeneric.inc | 4 +-- .../admin/systems/class_divListSystem.inc | 2 +- .../admin/systems/class_servGeneric.inc | 4 +-- .../admin/systems/class_systemManagement.inc | 6 ++-- .../systems/admin/systems/class_termDNS.inc | 6 ++-- gosa-plugins/systems/admin/systems/main.inc | 2 +- 94 files changed, 237 insertions(+), 237 deletions(-) diff --git a/gosa-core/include/class_SnapShotDialog.inc b/gosa-core/include/class_SnapShotDialog.inc index 56d3580be..af18ab6ce 100644 --- a/gosa-core/include/class_SnapShotDialog.inc +++ b/gosa-core/include/class_SnapShotDialog.inc @@ -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'))); } } diff --git a/gosa-core/include/class_config.inc b/gosa-core/include/class_config.inc index d1afed386..ddb15d47c 100644 --- a/gosa-core/include/class_config.inc +++ b/gosa-core/include/class_config.inc @@ -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){ diff --git a/gosa-core/include/class_plugin.inc b/gosa-core/include/class_plugin.inc index baafda872..dc208f2a8 100644 --- a/gosa-core/include/class_plugin.inc +++ b/gosa-core/include/class_plugin.inc @@ -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(); diff --git a/gosa-core/include/class_userinfo.inc b/gosa-core/include/class_userinfo.inc index cf36489cf..65538578d 100644 --- a/gosa-core/include/class_userinfo.inc +++ b/gosa-core/include/class_userinfo.inc @@ -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; } diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index ea81f1ce6..3a0263a41 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -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 */ diff --git a/gosa-core/plugins/admin/acl/main.inc b/gosa-core/plugins/admin/acl/main.inc index f9dddcc16..7e4bce0e4 100644 --- a/gosa-core/plugins/admin/acl/main.inc +++ b/gosa-core/plugins/admin/acl/main.inc @@ -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"), "\"\" ".@LDAP::fix(session::get('objectinfo'))); + $display= print_header(get_template_path('plugins/acl/images/plugin.png'), _("ACL management"), "\"\" ".LDAP::fix(session::get('objectinfo'))); } else { $display= print_header(get_template_path('plugins/acl/images/plugin.png'), _("ACL management")); } diff --git a/gosa-core/plugins/admin/departments/class_departmentGeneric.inc b/gosa-core/plugins/admin/departments/class_departmentGeneric.inc index 27ad5c002..4be01cdde 100644 --- a/gosa-core/plugins/admin/departments/class_departmentGeneric.inc +++ b/gosa-core/plugins/admin/departments/class_departmentGeneric.inc @@ -433,7 +433,7 @@ class department extends plugin '; - echo "

".sprintf(_("Tagging '%s'."),"".@LDAP::fix($this->dn)."")."

"; + echo "

".sprintf(_("Tagging '%s'."),"".LDAP::fix($this->dn)."")."

"; } $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 '; - echo "

".sprintf(_("Moving '%s' to '%s'"),"".@LDAP::fix($src_dn)."","".@LDAP::fix($dst_dn)."")."

"; + echo "

".sprintf(_("Moving '%s' to '%s'"),"".LDAP::fix($src_dn)."","".LDAP::fix($dst_dn)."")."

"; /* 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))."
"; + echo sprintf("Recursive_move: '%s' already exists", LDAP::fix($dst_dn))."
"; 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 ""._("Object").": ".@LDAP::fix($src)."
"; + echo ""._("Object").": ".LDAP::fix($src)."
"; $this->update_acls($object, $dst,TRUE); if (!$this->copy($src, $dst)){ - echo "
".sprintf(_("FAILED to copy %s, aborting operation"),@LDAP::fix($src))."
"; + echo "
".sprintf(_("FAILED to copy %s, aborting operation"),LDAP::fix($src))."
"; return (FALSE); } echo "" ; @@ -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))."
"; + echo sprintf(_("Object '%s' is already tagged"), LDAP::fix($dn))."
"; flush(); } return; } if (count($attrs)){ if ($show){ - echo sprintf(_("Adding tag (%s) to object '%s'"), $tag, @LDAP::fix($dn))."
"; + echo sprintf(_("Adding tag (%s) to object '%s'"), $tag, LDAP::fix($dn))."
"; 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))."
"; + echo sprintf(_("Removing tag from object '%s'"), LDAP::fix($dn))."
"; flush(); } $nattrs= array("gosaUnitTag" => array()); diff --git a/gosa-core/plugins/admin/departments/class_departmentManagement.inc b/gosa-core/plugins/admin/departments/class_departmentManagement.inc index dc4574dd0..0637be02a 100644 --- a/gosa-core/plugins/admin/departments/class_departmentManagement.inc +++ b/gosa-core/plugins/admin/departments/class_departmentManagement.inc @@ -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); diff --git a/gosa-core/plugins/admin/departments/class_divListDepartment.inc b/gosa-core/plugins/admin/departments/class_divListDepartment.inc index 7e0d9a420..a959b972a 100644 --- a/gosa-core/plugins/admin/departments/class_divListDepartment.inc +++ b/gosa-core/plugins/admin/departments/class_divListDepartment.inc @@ -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 */ diff --git a/gosa-core/plugins/admin/departments/main.inc b/gosa-core/plugins/admin/departments/main.inc index e3a64da8a..290c67df1 100644 --- a/gosa-core/plugins/admin/departments/main.inc +++ b/gosa-core/plugins/admin/departments/main.inc @@ -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"), "\"\" ".@LDAP::fix(session::get('objectinfo'))); + $display= print_header(get_template_path('plugins/departments/images/plugin.png'), _("Department management"), "\"\" ".LDAP::fix(session::get('objectinfo'))); } else { $display= print_header(get_template_path('plugins/departments/images/plugin.png'), _("Department management")); } diff --git a/gosa-core/plugins/admin/groups/class_divListGroup.inc b/gosa-core/plugins/admin/groups/class_divListGroup.inc index 342d490bc..2ee9518e8 100644 --- a/gosa-core/plugins/admin/groups/class_divListGroup.inc +++ b/gosa-core/plugins/admin/groups/class_divListGroup.inc @@ -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('/ /', ' ', @LDAP::fix($val['dn']))."'"; + $title = "title='".preg_replace('/ /', ' ', LDAP::fix($val['dn']))."'"; if(!isset($val['description'][0])){ $desc = ""; diff --git a/gosa-core/plugins/admin/groups/class_groupGeneric.inc b/gosa-core/plugins/admin/groups/class_groupGeneric.inc index de4d23510..1229fcdf4 100644 --- a/gosa-core/plugins/admin/groups/class_groupGeneric.inc +++ b/gosa-core/plugins/admin/groups/class_groupGeneric.inc @@ -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; diff --git a/gosa-core/plugins/admin/groups/class_groupManagement.inc b/gosa-core/plugins/admin/groups/class_groupManagement.inc index 346a15f39..f86a9d1fd 100644 --- a/gosa-core/plugins/admin/groups/class_groupManagement.inc +++ b/gosa-core/plugins/admin/groups/class_groupManagement.inc @@ -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))); diff --git a/gosa-core/plugins/admin/groups/main.inc b/gosa-core/plugins/admin/groups/main.inc index aeb3b0feb..6f6630ea1 100644 --- a/gosa-core/plugins/admin/groups/main.inc +++ b/gosa-core/plugins/admin/groups/main.inc @@ -40,7 +40,7 @@ if ($remove_lock){ $display= print_header(get_template_path('plugins/groups/images/plugin.png'), _("Group administration"), "\"\" ". - @LDAP::fix(session::get('objectinfo'))); + LDAP::fix(session::get('objectinfo'))); } else { $display= print_header(get_template_path('plugins/groups/images/plugin.png'), _("Group administration")); } diff --git a/gosa-core/plugins/admin/ogroups/class_divListOGroup.inc b/gosa-core/plugins/admin/ogroups/class_divListOGroup.inc index 3e828b68f..e9490509c 100644 --- a/gosa-core/plugins/admin/ogroups/class_divListOGroup.inc +++ b/gosa-core/plugins/admin/ogroups/class_divListOGroup.inc @@ -242,7 +242,7 @@ class divListOGroup extends MultiSelectWindow }else{ $mail = $empty; } - $title = "title='".preg_replace('/ /', ' ', @LDAP::fix($val['dn']))."'"; + $title = "title='".preg_replace('/ /', ' ', LDAP::fix($val['dn']))."'"; if(!isset($val['description'][0])){ $desc = ""; }else{ diff --git a/gosa-core/plugins/admin/ogroups/class_ogroup.inc b/gosa-core/plugins/admin/ogroups/class_ogroup.inc index 0a3146bf3..a02b120dd 100644 --- a/gosa-core/plugins/admin/ogroups/class_ogroup.inc +++ b/gosa-core/plugins/admin/ogroups/class_ogroup.inc @@ -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(); diff --git a/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc b/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc index 978bc0c87..6635ee071 100644 --- a/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc +++ b/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc @@ -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 { diff --git a/gosa-core/plugins/admin/ogroups/main.inc b/gosa-core/plugins/admin/ogroups/main.inc index aa6cd07ce..918c970aa 100644 --- a/gosa-core/plugins/admin/ogroups/main.inc +++ b/gosa-core/plugins/admin/ogroups/main.inc @@ -46,7 +46,7 @@ if ($remove_lock){ _("Object groups"), "\"\" ".@LDAP::fix(session::get('objectinfo'))); + "\"> ".LDAP::fix(session::get('objectinfo'))); } else { $display= print_header(get_template_path('plugins/ogroups/images/plugin.png'), _("Object groups")); } diff --git a/gosa-core/plugins/admin/users/class_divListUsers.inc b/gosa-core/plugins/admin/users/class_divListUsers.inc index daa415666..a83e827a2 100644 --- a/gosa-core/plugins/admin/users/class_divListUsers.inc +++ b/gosa-core/plugins/admin/users/class_divListUsers.inc @@ -344,7 +344,7 @@ class divListUsers extends MultiSelectWindow $field0 = array("string" => "" , "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('/ /', ' ', @LDAP::fix($val['dn']))."'"); + $field2 = array("string" => sprintf($editlink,$key,$display), "attach" => "style='' title='".preg_replace('/ /', ' ', 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;'"); diff --git a/gosa-core/plugins/admin/users/class_userManagement.inc b/gosa-core/plugins/admin/users/class_userManagement.inc index 35c12d151..2fa0cfc62 100644 --- a/gosa-core/plugins/admin/users/class_userManagement.inc +++ b/gosa-core/plugins/admin/users/class_userManagement.inc @@ -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{ diff --git a/gosa-core/plugins/admin/users/main.inc b/gosa-core/plugins/admin/users/main.inc index 4cacd6dbf..5e75fe18d 100644 --- a/gosa-core/plugins/admin/users/main.inc +++ b/gosa-core/plugins/admin/users/main.inc @@ -44,7 +44,7 @@ if ($remove_lock){ _("User administration"), "\"\" ".@LDAP::fix(session::get('objectinfo'))); + "\"> ".LDAP::fix(session::get('objectinfo'))); } else { $display= print_header(get_template_path($userManagement->plIcon), _("User administration")); diff --git a/gosa-core/setup/class_setupStep_Ldap.inc b/gosa-core/setup/class_setupStep_Ldap.inc index 8b9ed80c6..03525da83 100644 --- a/gosa-core/setup/class_setupStep_Ldap.inc +++ b/gosa-core/setup/class_setupStep_Ldap.inc @@ -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); diff --git a/gosa-core/setup/class_setupStep_Migrate.inc b/gosa-core/setup/class_setupStep_Migrate.inc index 70fb3b4f2..be99fdd38 100644 --- a/gosa-core/setup/class_setupStep_Migrate.inc +++ b/gosa-core/setup/class_setupStep_Migrate.inc @@ -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); } diff --git a/gosa-plugins/addressbook/addons/addressbook/class_addressbook.inc b/gosa-plugins/addressbook/addons/addressbook/class_addressbook.inc index fd3304b08..cd7e499c0 100644 --- a/gosa-plugins/addressbook/addons/addressbook/class_addressbook.inc +++ b/gosa-plugins/addressbook/addons/addressbook/class_addressbook.inc @@ -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); } diff --git a/gosa-plugins/dhcp/admin/systems/services/dhcp/class_servDHCP.inc b/gosa-plugins/dhcp/admin/systems/services/dhcp/class_servDHCP.inc index 1b5201d24..beb0636a3 100644 --- a/gosa-plugins/dhcp/admin/systems/services/dhcp/class_servDHCP.inc +++ b/gosa-plugins/dhcp/admin/systems/services/dhcp/class_servDHCP.inc @@ -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; } diff --git a/gosa-plugins/dns/admin/systems/services/dns/class_DNS.inc b/gosa-plugins/dns/admin/systems/services/dns/class_DNS.inc index 205e33209..4aa743a60 100644 --- a/gosa-plugins/dns/admin/systems/services/dns/class_DNS.inc +++ b/gosa-plugins/dns/admin/systems/services/dns/class_DNS.inc @@ -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 diff --git a/gosa-plugins/dns/admin/systems/services/dns/class_servDNS.inc b/gosa-plugins/dns/admin/systems/services/dns/class_servDNS.inc index aa9722b10..c821a5333 100644 --- a/gosa-plugins/dns/admin/systems/services/dns/class_servDNS.inc +++ b/gosa-plugins/dns/admin/systems/services/dns/class_servDNS.inc @@ -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; diff --git a/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZone.inc b/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZone.inc index b5854fc9d..aee9dfa4a 100644 --- a/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZone.inc +++ b/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZone.inc @@ -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]); } } diff --git a/gosa-plugins/fai/admin/fai/class_FAI.inc b/gosa-plugins/fai/admin/fai/class_FAI.inc index 677a8b925..fd58da5b0 100644 --- a/gosa-plugins/fai/admin/fai/class_FAI.inc +++ b/gosa-plugins/fai/admin/fai/class_FAI.inc @@ -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 "
-->".$Current_DN."
"; echo "
-->".$obj_dn."
"; @@ -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; diff --git a/gosa-plugins/fai/admin/fai/class_divListFai.inc b/gosa-plugins/fai/admin/fai/class_divListFai.inc index ac6d4f27c..be5072f22 100644 --- a/gosa-plugins/fai/admin/fai/class_divListFai.inc +++ b/gosa-plugins/fai/admin/fai/class_divListFai.inc @@ -317,7 +317,7 @@ class divListFai extends MultiSelectWindow $field0 = array("string" => "" , "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('/ /', ' ', @LDAP::fix($value['dn']))),$edi) , "attach" => "style=''"); + $field2 = array("string" => preg_replace(array("/%KEY%/","/%NAME%/","/%TITLE%/"),array($key,$display,preg_replace('/ /', ' ', 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)); diff --git a/gosa-plugins/fai/admin/fai/class_faiHook.inc b/gosa-plugins/fai/admin/fai/class_faiHook.inc index 5005cce15..2e0119adf 100644 --- a/gosa-plugins/fai/admin/fai/class_faiHook.inc +++ b/gosa-plugins/fai/admin/fai/class_faiHook.inc @@ -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"; diff --git a/gosa-plugins/fai/admin/fai/class_faiManagement.inc b/gosa-plugins/fai/admin/fai/class_faiManagement.inc index 3114ba7fa..b65e44764 100644 --- a/gosa-plugins/fai/admin/fai/class_faiManagement.inc +++ b/gosa-plugins/fai/admin/fai/class_faiManagement.inc @@ -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){ diff --git a/gosa-plugins/fai/admin/fai/class_faiPackage.inc b/gosa-plugins/fai/admin/fai/class_faiPackage.inc index d62a5458c..4380ba3c7 100644 --- a/gosa-plugins/fai/admin/fai/class_faiPackage.inc +++ b/gosa-plugins/fai/admin/fai/class_faiPackage.inc @@ -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= ""; diff --git a/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc b/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc index d83ae91b6..acc749bfe 100644 --- a/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc +++ b/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc @@ -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"; diff --git a/gosa-plugins/fai/admin/fai/class_faiProfile.inc b/gosa-plugins/fai/admin/fai/class_faiProfile.inc index 9eca6ad65..269652ff8 100644 --- a/gosa-plugins/fai/admin/fai/class_faiProfile.inc +++ b/gosa-plugins/fai/admin/fai/class_faiProfile.inc @@ -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"); diff --git a/gosa-plugins/fai/admin/fai/class_faiScript.inc b/gosa-plugins/fai/admin/fai/class_faiScript.inc index a762beb54..7bdc914db 100644 --- a/gosa-plugins/fai/admin/fai/class_faiScript.inc +++ b/gosa-plugins/fai/admin/fai/class_faiScript.inc @@ -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"; diff --git a/gosa-plugins/fai/admin/fai/class_faiSummaryTab.inc b/gosa-plugins/fai/admin/fai/class_faiSummaryTab.inc index 6d6aa0b42..905a97893 100644 --- a/gosa-plugins/fai/admin/fai/class_faiSummaryTab.inc +++ b/gosa-plugins/fai/admin/fai/class_faiSummaryTab.inc @@ -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]; diff --git a/gosa-plugins/fai/admin/fai/class_faiTemplate.inc b/gosa-plugins/fai/admin/fai/class_faiTemplate.inc index 3bc50dd4a..5f0965c81 100644 --- a/gosa-plugins/fai/admin/fai/class_faiTemplate.inc +++ b/gosa-plugins/fai/admin/fai/class_faiTemplate.inc @@ -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"; diff --git a/gosa-plugins/fai/admin/fai/class_faiVariable.inc b/gosa-plugins/fai/admin/fai/class_faiVariable.inc index f8f1b3be4..c5e18af3b 100644 --- a/gosa-plugins/fai/admin/fai/class_faiVariable.inc +++ b/gosa-plugins/fai/admin/fai/class_faiVariable.inc @@ -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"); diff --git a/gosa-plugins/fai/admin/fai/main.inc b/gosa-plugins/fai/admin/fai/main.inc index 9ffb498ab..650515abc 100644 --- a/gosa-plugins/fai/admin/fai/main.inc +++ b/gosa-plugins/fai/admin/fai/main.inc @@ -44,7 +44,7 @@ if ($remove_lock){ } /* Page header*/ if (session::is_set('objectinfo')){ - $display= print_header(get_template_path($FAI->plIcon), _("Software deployment"), "\"\" ".@LDAP::fix(session::get('objectinfo'))); + $display= print_header(get_template_path($FAI->plIcon), _("Software deployment"), "\"\" ".LDAP::fix(session::get('objectinfo'))); } else { $display= print_header(get_template_path($FAI->plIcon), _("Software deployment")); } diff --git a/gosa-plugins/gofax/gofax/blocklists/class_blocklistManagement.inc b/gosa-plugins/gofax/gofax/blocklists/class_blocklistManagement.inc index 962408b0b..1346ab95c 100644 --- a/gosa-plugins/gofax/gofax/blocklists/class_blocklistManagement.inc +++ b/gosa-plugins/gofax/gofax/blocklists/class_blocklistManagement.inc @@ -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))); } diff --git a/gosa-plugins/gofax/gofax/blocklists/class_divListBlocklists.inc b/gosa-plugins/gofax/gofax/blocklists/class_divListBlocklists.inc index 76faf09da..8258b93ae 100644 --- a/gosa-plugins/gofax/gofax/blocklists/class_divListBlocklists.inc +++ b/gosa-plugins/gofax/gofax/blocklists/class_divListBlocklists.inc @@ -180,7 +180,7 @@ class divListBlocklist extends MultiSelectWindow $field0 = array("string" => "" , "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('/ /', ' ', @LDAP::fix($val['dn']))."'"); + $field2 = array("string" => sprintf($editlink,$key,$display), "attach" => "style='' title='".preg_replace('/ /', ' ', 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)); } diff --git a/gosa-plugins/gofax/gofax/blocklists/main.inc b/gosa-plugins/gofax/gofax/blocklists/main.inc index 2bee86e45..7cbadac08 100644 --- a/gosa-plugins/gofax/gofax/blocklists/main.inc +++ b/gosa-plugins/gofax/gofax/blocklists/main.inc @@ -24,7 +24,7 @@ if ($remove_lock){ /* Page header*/ if (session::is_set('objectinfo')){ - $display= print_header(get_template_path($blocklist->plIcon), _("Blocklist management"), "\"\"align=\"middle\" ".@LDAP::fix(session::get('objectinfo'))); + $display= print_header(get_template_path($blocklist->plIcon), _("Blocklist management"), "\"\"align=\"middle\" ".LDAP::fix(session::get('objectinfo'))); } else { $display= print_header(get_template_path($blocklist->plIcon), _("Blocklist management")); } diff --git a/gosa-plugins/gofax/gofax/faxaccount/class_gofaxAccount.inc b/gosa-plugins/gofax/gofax/faxaccount/class_gofaxAccount.inc index 22381c1b4..4deac179f 100644 --- a/gosa-plugins/gofax/gofax/faxaccount/class_gofaxAccount.inc +++ b/gosa-plugins/gofax/gofax/faxaccount/class_gofaxAccount.inc @@ -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]; } diff --git a/gosa-plugins/gofon/admin/systems/gofon/class_phoneGeneric.inc b/gosa-plugins/gofon/admin/systems/gofon/class_phoneGeneric.inc index e0b758aaf..7889e6d10 100644 --- a/gosa-plugins/gofon/admin/systems/gofon/class_phoneGeneric.inc +++ b/gosa-plugins/gofon/admin/systems/gofon/class_phoneGeneric.inc @@ -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 != ""){ diff --git a/gosa-plugins/gofon/gofon/conference/class_divListConferences.inc b/gosa-plugins/gofon/gofon/conference/class_divListConferences.inc index e95b17da6..70554d531 100644 --- a/gosa-plugins/gofon/gofon/conference/class_divListConferences.inc +++ b/gosa-plugins/gofon/gofon/conference/class_divListConferences.inc @@ -186,7 +186,7 @@ class divListConference extends MultiSelectWindow } /* Create title */ - $title = " title='".preg_replace("/ /"," ",@LDAP::fix($data['dn']))."' "; + $title = " title='".preg_replace("/ /"," ",LDAP::fix($data['dn']))."' "; /* Cutted objects should be displayed in light grey */ $display = $conference['cn'][0].$number; diff --git a/gosa-plugins/gofon/gofon/conference/class_phoneConferenceGeneric.inc b/gosa-plugins/gofon/gofon/conference/class_phoneConferenceGeneric.inc index 899b2c231..fe083b72d 100644 --- a/gosa-plugins/gofon/gofon/conference/class_phoneConferenceGeneric.inc +++ b/gosa-plugins/gofon/gofon/conference/class_phoneConferenceGeneric.inc @@ -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; diff --git a/gosa-plugins/gofon/gofon/conference/class_phoneConferenceManagment.inc b/gosa-plugins/gofon/gofon/conference/class_phoneConferenceManagment.inc index a944a1571..ffa0f2ec2 100644 --- a/gosa-plugins/gofon/gofon/conference/class_phoneConferenceManagment.inc +++ b/gosa-plugins/gofon/gofon/conference/class_phoneConferenceManagment.inc @@ -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); diff --git a/gosa-plugins/gofon/gofon/conference/main.inc b/gosa-plugins/gofon/gofon/conference/main.inc index 3a10ee383..3717f5e54 100644 --- a/gosa-plugins/gofon/gofon/conference/main.inc +++ b/gosa-plugins/gofon/gofon/conference/main.inc @@ -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"), "\"\" ".@LDAP::fix(session::get('objectinfo'))); + $display= print_header(get_template_path('plugins/gofon/images/conference.png'), _("Conference management"), "\"\" ".LDAP::fix(session::get('objectinfo'))); } else { $display= print_header(get_template_path('plugins/gofon/images/conference.png'), _("Conference management")); } diff --git a/gosa-plugins/gofon/gofon/macro/class_divListMacros.inc b/gosa-plugins/gofon/gofon/macro/class_divListMacros.inc index 69c4db723..d2ac863be 100644 --- a/gosa-plugins/gofon/gofon/macro/class_divListMacros.inc +++ b/gosa-plugins/gofon/gofon/macro/class_divListMacros.inc @@ -185,7 +185,7 @@ class divListMacro extends MultiSelectWindow $field0 = array("string" => "" , "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('/ /', ' ', @LDAP::fix($val['dn']))."'"); + $field2 = array("string" => sprintf($editlink,$key,$display), "attach" => "style='' title='".preg_replace('/ /', ' ', 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;'"); diff --git a/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc b/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc index d9f2cf6ba..8f0652ac5 100644 --- a/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc +++ b/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc @@ -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 diff --git a/gosa-plugins/gofon/gofon/macro/class_gofonMacroManagement.inc b/gosa-plugins/gofon/gofon/macro/class_gofonMacroManagement.inc index a13484cd5..04cb48277 100644 --- a/gosa-plugins/gofon/gofon/macro/class_gofonMacroManagement.inc +++ b/gosa-plugins/gofon/gofon/macro/class_gofonMacroManagement.inc @@ -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 { diff --git a/gosa-plugins/gofon/gofon/macro/main.inc b/gosa-plugins/gofon/gofon/macro/main.inc index d29a5698a..9c0bc1bd3 100644 --- a/gosa-plugins/gofon/gofon/macro/main.inc +++ b/gosa-plugins/gofon/gofon/macro/main.inc @@ -41,7 +41,7 @@ if ($remove_lock){ $display= print_header( get_template_path('images/macros.png'), _("Phone macro management"), "\"\" - ".@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")); } diff --git a/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc b/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc index 2176e776b..cbef4a0f2 100644 --- a/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc +++ b/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc @@ -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; } diff --git a/gosa-plugins/goto/addons/goto/class_target_list.inc b/gosa-plugins/goto/addons/goto/class_target_list.inc index 446360262..5ae70c23b 100644 --- a/gosa-plugins/goto/addons/goto/class_target_list.inc +++ b/gosa-plugins/goto/addons/goto/class_target_list.inc @@ -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('/ /', ' ', @LDAP::fix($val['dn']))."'"; + $title = "title='".preg_replace('/ /', ' ', LDAP::fix($val['dn']))."'"; if(!isset($val['description'][0])){ $desc = ""; }else{ diff --git a/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc b/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc index f8364a099..df892ee23 100644 --- a/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc +++ b/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc @@ -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']; } diff --git a/gosa-plugins/goto/admin/applications/class_applicationManagement.inc b/gosa-plugins/goto/admin/applications/class_applicationManagement.inc index 942e1c4bf..6283ec927 100644 --- a/gosa-plugins/goto/admin/applications/class_applicationManagement.inc +++ b/gosa-plugins/goto/admin/applications/class_applicationManagement.inc @@ -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; diff --git a/gosa-plugins/goto/admin/applications/class_divListApplication.inc b/gosa-plugins/goto/admin/applications/class_divListApplication.inc index 2d7a31ab4..a97cc1039 100644 --- a/gosa-plugins/goto/admin/applications/class_divListApplication.inc +++ b/gosa-plugins/goto/admin/applications/class_divListApplication.inc @@ -198,7 +198,7 @@ class divListApplication extends MultiSelectWindow $actions.= " "; } - $title = "title='".preg_replace('/ /', ' ', @LDAP::fix($val['dn']))."'"; + $title = "title='".preg_replace('/ /', ' ', LDAP::fix($val['dn']))."'"; if(!isset($val['description'][0])){ $desc = ""; diff --git a/gosa-plugins/goto/admin/applications/main.inc b/gosa-plugins/goto/admin/applications/main.inc index e48883bab..eaff4c322 100644 --- a/gosa-plugins/goto/admin/applications/main.inc +++ b/gosa-plugins/goto/admin/applications/main.inc @@ -35,7 +35,7 @@ if ($remove_lock){ /* Page header*/ if (session::is_set('objectinfo')){ - $display= print_header(get_template_path($applicationManagement->plIcon), _("Application management"), "\"\" ".@LDAP::fix(session::get('objectinfo'))); + $display= print_header(get_template_path($applicationManagement->plIcon), _("Application management"), "\"\" ".LDAP::fix(session::get('objectinfo'))); } else { $display= print_header(get_template_path($applicationManagement->plIcon), _("Application management")); } diff --git a/gosa-plugins/goto/admin/devices/class_deviceManagement.inc b/gosa-plugins/goto/admin/devices/class_deviceManagement.inc index d82ac62e8..e8735a435 100644 --- a/gosa-plugins/goto/admin/devices/class_deviceManagement.inc +++ b/gosa-plugins/goto/admin/devices/class_deviceManagement.inc @@ -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 { diff --git a/gosa-plugins/goto/admin/devices/class_divListDevices.inc b/gosa-plugins/goto/admin/devices/class_divListDevices.inc index 40d996d92..d81ebd460 100644 --- a/gosa-plugins/goto/admin/devices/class_divListDevices.inc +++ b/gosa-plugins/goto/admin/devices/class_divListDevices.inc @@ -165,7 +165,7 @@ class divListDevices extends MultiSelectWindow $actions.= " "; } - $title = "title='".preg_replace('/ /', ' ', @LDAP::fix($val['dn']))."'"; + $title = "title='".preg_replace('/ /', ' ', LDAP::fix($val['dn']))."'"; if(!isset($val['description'][0])){ $desc = ""; diff --git a/gosa-plugins/goto/admin/devices/main.inc b/gosa-plugins/goto/admin/devices/main.inc index 4dc8c7dee..45aaf4a43 100644 --- a/gosa-plugins/goto/admin/devices/main.inc +++ b/gosa-plugins/goto/admin/devices/main.inc @@ -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"), "\"\" ".@LDAP::fix(session::get('objectinfo'))); + $display= print_header(get_template_path($DeviceManagement->plIcon), _("Hotplug device management"), "\"\" ".LDAP::fix(session::get('objectinfo'))); } else { $display= print_header(get_template_path($DeviceManagement->plIcon), _("Hotplug device management")); } diff --git a/gosa-plugins/goto/admin/groups/apps/class_groupApplication.inc b/gosa-plugins/goto/admin/groups/apps/class_groupApplication.inc index 069c39423..a6cb616bb 100644 --- a/gosa-plugins/goto/admin/groups/apps/class_groupApplication.inc +++ b/gosa-plugins/goto/admin/groups/apps/class_groupApplication.inc @@ -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; } diff --git a/gosa-plugins/goto/admin/mimetypes/class_divListMimeTypes.inc b/gosa-plugins/goto/admin/mimetypes/class_divListMimeTypes.inc index 079328181..8fe4e83f2 100644 --- a/gosa-plugins/goto/admin/mimetypes/class_divListMimeTypes.inc +++ b/gosa-plugins/goto/admin/mimetypes/class_divListMimeTypes.inc @@ -203,7 +203,7 @@ class divListMimeTypes extends MultiSelectWindow $action.= " "; } - $title = "title='".preg_replace('/ /', ' ', @LDAP::fix($val['dn']))."'"; + $title = "title='".preg_replace('/ /', ' ', LDAP::fix($val['dn']))."'"; if(!isset($val['description'][0])){ $desc = ""; diff --git a/gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc b/gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc index 97b28e779..2e266a903 100644 --- a/gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc +++ b/gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc @@ -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 */ diff --git a/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc b/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc index ac4b76292..61285cda7 100644 --- a/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc +++ b/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc @@ -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(); diff --git a/gosa-plugins/goto/admin/mimetypes/main.inc b/gosa-plugins/goto/admin/mimetypes/main.inc index 5acff3063..79d8da876 100644 --- a/gosa-plugins/goto/admin/mimetypes/main.inc +++ b/gosa-plugins/goto/admin/mimetypes/main.inc @@ -38,7 +38,7 @@ if ($remove_lock){ /* Page header*/ if (session::is_set('objectinfo')){ - $display= print_header(get_template_path($MimeTypeManagement->plIcon), _("Mimetype management"), "\"\" ".@LDAP::fix(session::get('objectinfo'))); + $display= print_header(get_template_path($MimeTypeManagement->plIcon), _("Mimetype management"), "\"\" ".LDAP::fix(session::get('objectinfo'))); } else { $display= print_header(get_template_path('images/mimetypes.png'), _("Mimetype management")); } diff --git a/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc index d6e2626e8..e12c79d6b 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc @@ -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"; } diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc index d18612059..0c043fe3c 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc @@ -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){ diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalService.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalService.inc index f156bc075..a19bfe318 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_terminalService.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_terminalService.inc @@ -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; } } diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc index 4ec014926..7246e5597 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc @@ -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[] = ""; diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc index f3a7f17a1..f0fcff4e4 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc @@ -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; } } diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc index 3b623259d..da4a7d674 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc @@ -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){ diff --git a/gosa-plugins/goto/admin/systems/services/ldap/class_goLdapServer.inc b/gosa-plugins/goto/admin/systems/services/ldap/class_goLdapServer.inc index f2dc8669c..165659b46 100644 --- a/gosa-plugins/goto/admin/systems/services/ldap/class_goLdapServer.inc +++ b/gosa-plugins/goto/admin/systems/services/ldap/class_goLdapServer.inc @@ -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; } diff --git a/gosa-plugins/ldapmanager/addons/ldapmanager/class_export.inc b/gosa-plugins/ldapmanager/addons/ldapmanager/class_export.inc index 323a25fcd..8bed2866a 100644 --- a/gosa-plugins/ldapmanager/addons/ldapmanager/class_export.inc +++ b/gosa-plugins/ldapmanager/addons/ldapmanager/class_export.inc @@ -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); diff --git a/gosa-plugins/ldapmanager/addons/ldapmanager/class_exportxls.inc b/gosa-plugins/ldapmanager/addons/ldapmanager/class_exportxls.inc index 33250ca77..8af43592e 100644 --- a/gosa-plugins/ldapmanager/addons/ldapmanager/class_exportxls.inc +++ b/gosa-plugins/ldapmanager/addons/ldapmanager/class_exportxls.inc @@ -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); diff --git a/gosa-plugins/log/addons/logview/class_gosa_logview.inc b/gosa-plugins/log/addons/logview/class_gosa_logview.inc index 42b8781c2..794ab8af8 100644 --- a/gosa-plugins/log/addons/logview/class_gosa_logview.inc +++ b/gosa-plugins/log/addons/logview/class_gosa_logview.inc @@ -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.=" \n"; $res.=" ".$line['action'].""; diff --git a/gosa-plugins/mail/addons/mailqueue/class_mailqueue.inc b/gosa-plugins/mail/addons/mailqueue/class_mailqueue.inc index d9159bafb..47612b903 100644 --- a/gosa-plugins/mail/addons/mailqueue/class_mailqueue.inc +++ b/gosa-plugins/mail/addons/mailqueue/class_mailqueue.inc @@ -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; diff --git a/gosa-plugins/mail/addons/mailqueue/class_si_mailqueue.inc b/gosa-plugins/mail/addons/mailqueue/class_si_mailqueue.inc index 553150cd8..3eb055bde 100644 --- a/gosa-plugins/mail/addons/mailqueue/class_si_mailqueue.inc +++ b/gosa-plugins/mail/addons/mailqueue/class_si_mailqueue.inc @@ -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 */ diff --git a/gosa-plugins/mail/personal/mail/class_mail-methods-cyrus.inc b/gosa-plugins/mail/personal/mail/class_mail-methods-cyrus.inc index 5553dfd66..c050ed4e7 100644 --- a/gosa-plugins/mail/personal/mail/class_mail-methods-cyrus.inc +++ b/gosa-plugins/mail/personal/mail/class_mail-methods-cyrus.inc @@ -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")); } } diff --git a/gosa-plugins/mit-krb5/admin/systems/services/kerberos/class_krb_host_keys.inc b/gosa-plugins/mit-krb5/admin/systems/services/kerberos/class_krb_host_keys.inc index 970f2c7f3..21f914eec 100644 --- a/gosa-plugins/mit-krb5/admin/systems/services/kerberos/class_krb_host_keys.inc +++ b/gosa-plugins/mit-krb5/admin/systems/services/kerberos/class_krb_host_keys.inc @@ -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[] = "".$pre.$this->namingAttr."@".$data['REALM']." ". _("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); } } diff --git a/gosa-plugins/netatalk/personal/netatalk/class_netatalk.inc b/gosa-plugins/netatalk/personal/netatalk/class_netatalk.inc index 7791cb4e0..c09a13a9e 100644 --- a/gosa-plugins/netatalk/personal/netatalk/class_netatalk.inc +++ b/gosa-plugins/netatalk/personal/netatalk/class_netatalk.inc @@ -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); diff --git a/gosa-plugins/opsi/admin/opsi/class_opsigeneric.inc b/gosa-plugins/opsi/admin/opsi/class_opsigeneric.inc index 1cc1186f9..5f150b223 100644 --- a/gosa-plugins/opsi/admin/opsi/class_opsigeneric.inc +++ b/gosa-plugins/opsi/admin/opsi/class_opsigeneric.inc @@ -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( diff --git a/gosa-plugins/samba/admin/systems/samba/class_winGeneric.inc b/gosa-plugins/samba/admin/systems/samba/class_winGeneric.inc index 1cac6ba02..e88b9ebe5 100644 --- a/gosa-plugins/samba/admin/systems/samba/class_winGeneric.inc +++ b/gosa-plugins/samba/admin/systems/samba/class_winGeneric.inc @@ -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); diff --git a/gosa-plugins/sudo/admin/sudo/class_divListSudo.inc b/gosa-plugins/sudo/admin/sudo/class_divListSudo.inc index a47b6f629..924115d15 100644 --- a/gosa-plugins/sudo/admin/sudo/class_divListSudo.inc +++ b/gosa-plugins/sudo/admin/sudo/class_divListSudo.inc @@ -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('/ /', ' ', @LDAP::fix($val['dn']))."'"; + $title = "title='".preg_replace('/ /', ' ', LDAP::fix($val['dn']))."'"; if(!isset($val['description'][0])){ $desc = ""; diff --git a/gosa-plugins/sudo/admin/sudo/class_target_list_systems.inc b/gosa-plugins/sudo/admin/sudo/class_target_list_systems.inc index 8c08ad300..81c9de50a 100644 --- a/gosa-plugins/sudo/admin/sudo/class_target_list_systems.inc +++ b/gosa-plugins/sudo/admin/sudo/class_target_list_systems.inc @@ -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('/ /', ' ', @LDAP::fix($val['dn']))."'"; + $title = "title='".preg_replace('/ /', ' ', LDAP::fix($val['dn']))."'"; if(!isset($val['description'][0])){ $desc = ""; }else{ diff --git a/gosa-plugins/sudo/admin/sudo/class_target_list_users.inc b/gosa-plugins/sudo/admin/sudo/class_target_list_users.inc index 9e8f26248..c903563e1 100644 --- a/gosa-plugins/sudo/admin/sudo/class_target_list_users.inc +++ b/gosa-plugins/sudo/admin/sudo/class_target_list_users.inc @@ -167,7 +167,7 @@ class target_list_users extends MultiSelectWindow if(in_array($val['cn'][0],$this->Targets_used)) continue; - $title = "title='".preg_replace('/ /', ' ', @LDAP::fix($val['dn']))."'"; + $title = "title='".preg_replace('/ /', ' ', LDAP::fix($val['dn']))."'"; if(!isset($val['description'][0])){ $desc = ""; }else{ diff --git a/gosa-plugins/sudo/admin/sudo/main.inc b/gosa-plugins/sudo/admin/sudo/main.inc index ed768b49d..396feff87 100644 --- a/gosa-plugins/sudo/admin/sudo/main.inc +++ b/gosa-plugins/sudo/admin/sudo/main.inc @@ -41,7 +41,7 @@ if ($remove_lock){ $display= print_header(get_template_path('plugins/sudo/images/sudo.png'), _("Sudo role administration"), "\"\" ". - @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")); } diff --git a/gosa-plugins/systems/admin/systems/class_componentGeneric.inc b/gosa-plugins/systems/admin/systems/class_componentGeneric.inc index 72a770afb..766fe3b4b 100644 --- a/gosa-plugins/systems/admin/systems/class_componentGeneric.inc +++ b/gosa-plugins/systems/admin/systems/class_componentGeneric.inc @@ -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; } diff --git a/gosa-plugins/systems/admin/systems/class_divListSystem.inc b/gosa-plugins/systems/admin/systems/class_divListSystem.inc index a68c74497..88cd4f511 100644 --- a/gosa-plugins/systems/admin/systems/class_divListSystem.inc +++ b/gosa-plugins/systems/admin/systems/class_divListSystem.inc @@ -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('/ /', ' ', @LDAP::fix($val['dn']))."'"); + "attach" => "style='' title='".preg_replace('/ /', ' ', 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;'"); diff --git a/gosa-plugins/systems/admin/systems/class_servGeneric.inc b/gosa-plugins/systems/admin/systems/class_servGeneric.inc index 44b1cc4a8..9bfa325eb 100644 --- a/gosa-plugins/systems/admin/systems/class_servGeneric.inc +++ b/gosa-plugins/systems/admin/systems/class_servGeneric.inc @@ -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[] = ""; diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc index 07cea7c68..40d58f000 100644 --- a/gosa-plugins/systems/admin/systems/class_systemManagement.inc +++ b/gosa-plugins/systems/admin/systems/class_systemManagement.inc @@ -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 = "/"; } diff --git a/gosa-plugins/systems/admin/systems/class_termDNS.inc b/gosa-plugins/systems/admin/systems/class_termDNS.inc index 059e4f961..1cf1a4c18 100644 --- a/gosa-plugins/systems/admin/systems/class_termDNS.inc +++ b/gosa-plugins/systems/admin/systems/class_termDNS.inc @@ -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.". "); foreach($tmp as $sub_key => $sub_name){ diff --git a/gosa-plugins/systems/admin/systems/main.inc b/gosa-plugins/systems/admin/systems/main.inc index ee86742e3..99dc629f3 100644 --- a/gosa-plugins/systems/admin/systems/main.inc +++ b/gosa-plugins/systems/admin/systems/main.inc @@ -43,7 +43,7 @@ if ($remove_lock){ /* Page header*/ if (session::is_set('objectinfo')){ - $display= print_header(get_template_path($systems->plIcon), _("System management"), "\"\" ".@LDAP::fix(session::get('objectinfo'))); + $display= print_header(get_template_path($systems->plIcon), _("System management"), "\"\" ".LDAP::fix(session::get('objectinfo'))); } else { $display= print_header(get_template_path($systems->plIcon), _("System management")); } -- 2.30.2