summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8e7a670)
raw | patch | inline | side by side (parent: 8e7a670)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 31 Oct 2008 16:19:40 +0000 (16:19 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 31 Oct 2008 16:19:40 +0000 (16:19 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12852 594d385d-05f5-0310-b6e9-bd551577e9d8
94 files changed:
diff --git a/gosa-core/include/class_SnapShotDialog.inc b/gosa-core/include/class_SnapShotDialog.inc
index 56d3580bef4af48a4426401dc5ab8de75a1d4660..af18ab6ce8669a526b0da76f2909a466cdb5c345 100644 (file)
if($found){
$this->del_dn = $entry;
$smarty= get_smarty();
- $smarty->assign("intro", sprintf(_("You're about to delete the snapshot '%s'."), @LDAP::fix($this->del_dn)));
+ $smarty->assign("intro", sprintf(_("You're about to delete the snapshot '%s'."), LDAP::fix($this->del_dn)));
return($smarty->fetch (get_template_path('remove.tpl')));
}
}
index d1afed386eaee1ae4319104569f692d151482f95..ddb15d47c7c5854e15900c0aab028212f67ebfb8 100644 (file)
/* 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;
}
/* Fix name, if it contains a replace tag */
- $name= preg_replace('/\\\\,/', ',', @LDAP::fix($name));
+ $name= preg_replace('/\\\\,/', ',', LDAP::fix($name));
/* Check if current name is too long, then cut it */
if(mb_strlen($name, 'UTF-8')> $max_size){
index baafda8721f6a373c6e5ff0db84bfe0f035ef931..dc208f2a8dd41b4712d2f3dd90682389aa7e9ce7 100644 (file)
}
$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();
/* 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
$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);
}
$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);
}
$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);
/* 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);
}
$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']);
}
/* 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;
$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))"));
$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 */
/* Prepare bases */
$base = $this->config->current['BASE'];
$snap_base = $this->config->get_cfg_value("snapshotBase");
- $new_base = preg_replace("/".preg_quote($base)."$/","",$base_of_object).$snap_base;
+ $new_base = preg_replace("/".preg_quote($base, '/')."$/","",$base_of_object).$snap_base;
/* Fetch all objects and check if they do not exist anymore */
$ui = get_userinfo();
index cf36489cfbd0bbee642a1eed64826405f9500a14..65538578d61c88bcbd0f53ef66646db9e6b0981a 100644 (file)
/* Skip self acls? */
if($skip_self_acls && isset($data['0']) && strpos($data['0'], "s")) continue;
- if(preg_match("/^".preg_quote($mod)."/",$cat)){
+ if(preg_match("/^".preg_quote($mod, '/')."/",$cat)){
$found =TRUE;
break;
}
index ea81f1ce68c1bbb6a79c6b4c48953f95fff6038f..3a0263a41f811bfff321c57a77b853671fddecdf 100644 (file)
@@ -870,7 +870,7 @@ function get_sub_list($filter, $category,$sub_deps, $base= "", $attributes= arra
* departments like this "ou=servers,ou=blafasel,..."
* Here we filter out those blafasel departments.
*/
- if(preg_match("/".preg_quote($sub_dep)."/",$attrs['dn'])){
+ if(preg_match("/".preg_quote($sub_dep, '/')."/",$attrs['dn'])){
$departments[$attrs['dn']] = $attrs['dn'];
break;
}
/* 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("/");
* 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)));
}
$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,");
{
global $config;
- $pattern= "/^[^,]+,".preg_quote(get_people_ou())."/i";
+ $pattern= "/^[^,]+,".preg_quote(get_people_ou(), '/')."/i";
$base= preg_replace($pattern, '', $dn);
/* Set to base, if we're not on a correct subtree */
index f9dddcc165e6a2132006f2f2ab9191ba753bec73..7e4bce0e460d469d9f931a582482c4204124732b 100644 (file)
/* Page header*/
if (session::is_set('objectinfo')){
- $display= print_header(get_template_path('plugins/acl/images/plugin.png'), _("ACL management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".@LDAP::fix(session::get('objectinfo')));
+ $display= print_header(get_template_path('plugins/acl/images/plugin.png'), _("ACL management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".LDAP::fix(session::get('objectinfo')));
} else {
$display= print_header(get_template_path('plugins/acl/images/plugin.png'), _("ACL management"));
}
diff --git a/gosa-core/plugins/admin/departments/class_departmentGeneric.inc b/gosa-core/plugins/admin/departments/class_departmentGeneric.inc
index 27ad5c002bd9f29a56a6d8104ad5d8a94aec92b6..4be01cddebe02cf5eb6f97a5aa7a9a312a647b00 100644 (file)
</head>
<body style="background: none; margin:4px;" id="body" >
';
- echo "<h3>".sprintf(_("Tagging '%s'."),"<i>".@LDAP::fix($this->dn)."</i>")."</h3>";
+ echo "<h3>".sprintf(_("Tagging '%s'."),"<i>".LDAP::fix($this->dn)."</i>")."</h3>";
}
$add= $this->is_administrational_unit;
}
/* 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;
}
</head>
<body style="background: none; margin:4px;" id="body" >
';
- echo "<h3>".sprintf(_("Moving '%s' to '%s'"),"<i>".@LDAP::fix($src_dn)."</i>","<i>".@LDAP::fix($dst_dn)."</i>")."</h3>";
+ echo "<h3>".sprintf(_("Moving '%s' to '%s'"),"<i>".LDAP::fix($src_dn)."</i>","<i>".LDAP::fix($dst_dn)."</i>")."</h3>";
/* Check if the destination entry exists */
/* Check if destination exists - abort */
$ldap->cat($dst_dn, array('dn'));
if ($ldap->fetch()){
- trigger_error("Recursive_move ".@LDAP::fix($dst_dn)." already exists.",
+ trigger_error("Recursive_move ".LDAP::fix($dst_dn)." already exists.",
E_USER_WARNING);
- echo sprintf("Recursive_move: '%s' already exists", @LDAP::fix($dst_dn))."<br>";
+ echo sprintf("Recursive_move: '%s' already exists", LDAP::fix($dst_dn))."<br>";
return (FALSE);
}
$dst= preg_replace("/".str_replace("\\","\\\\",$src_dn)."$/", "$dst_dn", $object);
$dst= str_replace($src_dn,$dst_dn,$object);
- echo "<b>"._("Object").":</b> ".@LDAP::fix($src)."<br>";
+ echo "<b>"._("Object").":</b> ".LDAP::fix($src)."<br>";
$this->update_acls($object, $dst,TRUE);
if (!$this->copy($src, $dst)){
- echo "<font color='#FF0000'><br>".sprintf(_("FAILED to copy %s, aborting operation"),@LDAP::fix($src))."</font>";
+ echo "<font color='#FF0000'><br>".sprintf(_("FAILED to copy %s, aborting operation"),LDAP::fix($src))."</font>";
return (FALSE);
}
echo "<script language=\"javascript\" type=\"text/javascript\">scrollDown2();</script>" ;
}
/* 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;
$attrs= $ldap->fetch();
if(isset($attrs['gosaUnitTag'][0]) && $attrs['gosaUnitTag'][0] == $tag){
if ($show) {
- echo sprintf(_("Object '%s' is already tagged"), @LDAP::fix($dn))."<br>";
+ echo sprintf(_("Object '%s' is already tagged"), LDAP::fix($dn))."<br>";
flush();
}
return;
}
if (count($attrs)){
if ($show){
- echo sprintf(_("Adding tag (%s) to object '%s'"), $tag, @LDAP::fix($dn))."<br>";
+ echo sprintf(_("Adding tag (%s) to object '%s'"), $tag, LDAP::fix($dn))."<br>";
flush();
}
$nattrs= array("gosaUnitTag" => $tag);
}
if (count($attrs)){
if ($show){
- echo sprintf(_("Removing tag from object '%s'"), @LDAP::fix($dn))."<br>";
+ echo sprintf(_("Removing tag from object '%s'"), LDAP::fix($dn))."<br>";
flush();
}
$nattrs= array("gosaUnitTag" => array());
diff --git a/gosa-core/plugins/admin/departments/class_departmentManagement.inc b/gosa-core/plugins/admin/departments/class_departmentManagement.inc
index dc4574dd069282fe1294ee4dc88567889d7fb66d..0637be02a0ef01bf45fb7634f148f776ed3dc0ff 100644 (file)
$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 7e0d9a420db864cb9591582440df64576cf3f15d..a959b972ab1bf36051dd9a31cd753fc33271cba7 100644 (file)
/* 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 e3a64da8a04878d62f65e65221cc79bdeae16379..290c67df10f611f20315f7defa5c9cdde27393bc 100644 (file)
/* Page header*/
if (session::is_set('objectinfo')){
- $display= print_header(get_template_path('plugins/departments/images/plugin.png'), _("Department management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".@LDAP::fix(session::get('objectinfo')));
+ $display= print_header(get_template_path('plugins/departments/images/plugin.png'), _("Department management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".LDAP::fix(session::get('objectinfo')));
} else {
$display= print_header(get_template_path('plugins/departments/images/plugin.png'), _("Department management"));
}
diff --git a/gosa-core/plugins/admin/groups/class_divListGroup.inc b/gosa-core/plugins/admin/groups/class_divListGroup.inc
index 342d490bcfa33986a6e8ee066d88bb5ec7efb943..2ee9518e86b05ae1c04993a459963255f9ef569a 100644 (file)
$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;
}
$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 de4d235107092178724aa6554ac9cac7ad7f1691..1229fcdf49f9d484032ec02d8513fc45279bd78a 100644 (file)
} 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 346a15f394c8d2b92f9dcf2b1898ae7a11890e2a..f86a9d1fd5b19bd20e73cd9fe6f5a7727cc10450 100644 (file)
$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);
/* Lock the current entry, so nobody will edit it during deletion */
add_lock ($this->dn, $this->ui->dn);
- $smarty->assign("info", msgPool::deleteInfo(@LDAP::fix($this->dn),_("group")));
+ $smarty->assign("info", msgPool::deleteInfo(LDAP::fix($this->dn),_("group")));
$smarty->assign("multiple", false);
return($smarty->fetch(get_template_path('remove.tpl', TRUE)));
index aeb3b0febfc9ad975dbff88e6b933923c4f792df..6f6630ea180a7de83eeb99a2cf5de56645bb8f38 100644 (file)
$display= print_header(get_template_path('plugins/groups/images/plugin.png'),
_("Group administration"), "<img alt=\"\" align=\"middle\" src=\"".
get_template_path('images/lists/locked.png')."\"> ".
- @LDAP::fix(session::get('objectinfo')));
+ LDAP::fix(session::get('objectinfo')));
} else {
$display= print_header(get_template_path('plugins/groups/images/plugin.png'), _("Group administration"));
}
diff --git a/gosa-core/plugins/admin/ogroups/class_divListOGroup.inc b/gosa-core/plugins/admin/ogroups/class_divListOGroup.inc
index 3e828b68f39a1150e2f29d6f2af0e41dd15933ce..e9490509cbdeea470064ecb809fe560b5eeff0ee 100644 (file)
}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 0a3146bf3e8e6b45f32e9c276ed3e8181881f2aa..a02b120dd9657ac995027180878cffcf808734a3 100644 (file)
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'])){
/* 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 {
/* 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 978bc0c87f4f8284b4ff00386eb5dce4f18a3fc4..6635ee07189251e8d3a722e6fc15dc8335123013 100644 (file)
$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);
/* Lock the current entry, so nobody will edit it during deletion */
add_lock ($this->dn, $this->ui->dn);
- $smarty->assign("info", msgPool::deleteInfo(@LDAP::fix($this->dn),_("object group")));
+ $smarty->assign("info", msgPool::deleteInfo(LDAP::fix($this->dn),_("object group")));
$smarty->assign("multiple", false);
return($smarty->fetch(get_template_path('remove.tpl', TRUE)));
} else {
index aa6cd07ceacd07297ae8a7d69ecb884545cafd5f..918c970aaf5f70714e55f565bc675a4a0c15e668 100644 (file)
_("Object groups"),
"<img alt=\"\" align=\"middle\" src=\"".
get_template_path('images/lists/locked.png').
- "\"> ".@LDAP::fix(session::get('objectinfo')));
+ "\"> ".LDAP::fix(session::get('objectinfo')));
} else {
$display= print_header(get_template_path('plugins/ogroups/images/plugin.png'), _("Object groups"));
}
diff --git a/gosa-core/plugins/admin/users/class_divListUsers.inc b/gosa-core/plugins/admin/users/class_divListUsers.inc
index daa4156665d7d531dc97031c151bb250745dfa8b..a83e827a20096933584c7ea2b8cc7ae409ce8211 100644 (file)
$field0 = array("string" => "<input type='checkbox' id='item_selected_".$key."' name='item_selected_".$key."'>" ,
"attach" => "style='width:20px;'");
$field1 = array("string" => sprintf($tpl,$val['dn']), "attach" => "style='text-align:center;width:20px;'");
- $field2 = array("string" => sprintf($editlink,$key,$display), "attach" => "style='' title='".preg_replace('/ /', ' ', @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 35c12d1516bd241131227b59484d17b14e3ee7c7..2fa0cfc627e1bc93e04158208fbb52e0a2c1060c 100644 (file)
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");
$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);
$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;
}
/* Skip entries that are not located under the people ou (normaly 'ou=people,')
* Else winstations will be listed too, if you use the subtree flag.
*/
- if(!preg_match("/".preg_quote(get_people_ou())."/i",$Entry['dn'])){
+ if(!preg_match("/".preg_quote(get_people_ou(), '/')."/i",$Entry['dn'])){
continue;
}else{
index 4cacd6dbf3e1a0cd0d6db6a8a02db9eb18553cbd..5e75fe18d9891a33ba848a54373f49d4235c23fc 100644 (file)
_("User administration"),
"<img alt=\"\" class=\"center\" src=\"".
get_template_path('images/lists/locked.png').
- "\"> ".@LDAP::fix(session::get('objectinfo')));
+ "\"> ".LDAP::fix(session::get('objectinfo')));
} else {
$display= print_header(get_template_path($userManagement->plIcon),
_("User administration"));
index 8b9ed80c677c027547ed2fe54847d57e322dff23..03525da833329b87746a20781aef3dcd88181401 100644 (file)
$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 70fb3b4f2fcd8149ea8880c4a0d9551e5b071505..be99fdd3875321c847dbfbb169ab947b78efdd36 100644 (file)
$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;
$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;
}
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;
/* 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();
/* 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();
/* 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();
/* 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();
/* 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);
$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);
}
$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 fd3304b082ad4a0ebaa68b4f1bb6f231bf5c3f29..cd7e499c0308f2ba4c501809ce251540218172b6 100644 (file)
$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 1b5201d24043e060f5351f88ce47a33003c021de..beb0636a359c860b119d44c0f8d01832c0519b0c 100644 (file)
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__))));
}
}
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? */
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);
}
}
$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 */
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 205e3320912083d901fbaa9bd8b5e7416f8fa39f..4aa743a60474e2c24c63c2931f3b1d3029606cff 100644 (file)
*/
$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;
}
/* 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){
$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 aa9722b108ded139fca7c07a96b96142702bdd0c..c821a5333392f02908de529d4c2b5a5a29b9683f 100644 (file)
$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']);
$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){
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 b5854fc9d780e888160481691f294e34e49a8ff6..aee9dfa4aad7daa5b7d49f4dfe3c1821ea3c2d6c 100644 (file)
$tmp2[$tmp[0]] = $rec;
unset($this->Records[$key]);
}
- if($rec['type'] == "nSRecord" && preg_match("/".preg_quote($this->sOAprimary)."/",$rec['value'])){
+ if($rec['type'] == "nSRecord" && preg_match("/".preg_quote($this->sOAprimary, '/')."/",$rec['value'])){
unset($this->Records[$key]);
}
}
index 677a8b925e8b4c6ba33bc06dec7ac4e9a31fcbdf..fd58da5b07fd25f17917bd75ff504a8706fa1d89 100644 (file)
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])){
/* 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{
{
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;
$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];
}
/* Dont't try to modify non FAIclasses
*/
- if(!preg_match("/[^,]+,".preg_quote(get_ou("faiBaseRDN"))."/",$obj_dn)){
+ if(!preg_match("/[^,]+,".preg_quote(get_ou("faiBaseRDN"), '/')."/",$obj_dn)){
trigger_error("PLEASE check fai class handling in ".__LINE__." -> ".__FILE__);
echo "<br>-->".$Current_DN."<br>";
echo "<br>-->".$obj_dn."<br>";
/* 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();
}
$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]))){
/* 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){
/* 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){
$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;
$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;
}
}
}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;
}
}
$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;
}
}
$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 ac6d4f27c1a800d288894e1532c9491b4a7f3873..be5072f22a32be65c1102c573038ff480bb61a9c 100644 (file)
$field0 = array("string" => "<input type='checkbox' id='item_selected_".$key."' name='item_selected_".$key."'>" ,
"attach" => "style='width:20px;'");
$field1 = array("string" => $img , "attach" => "style='text-align:center;width:20px;'");
- $field2 = array("string" => preg_replace(array("/%KEY%/","/%NAME%/","/%TITLE%/"),array($key,$display,preg_replace('/ /', ' ', @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 5005cce1563c607489a25d89f0cc462699ff753c..2e0119adfc600c2b25bf38d29891d836d7adc296 100644 (file)
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";
$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");
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 3114ba7fab802cecd5872d59e024a682e25975a0..b65e4476439472179ec282c492797de6c26ec809 100644 (file)
/* 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 {
$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 */
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);
$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.
- 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"));
$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'];
}
}
}
}
- $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 d62a5458c171324b0793d67c6146d48eac396d9e..4380ba3c7a10ec1bc44349d5393c21e9e5cf1f76 100644 (file)
/* 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= "/";
$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);
}
}
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 d83ae91b6c1306b8eb65b2a8ea914949b496652c..acc749bfe775304e2e92b0a5c57e083fbc2a3fd9 100644 (file)
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'] = "";
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";
$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);
}
}
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'] = "";
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 9eca6ad6528a5e8ffdf63f358bfed6908801ec87..269652ff85d6b08e4f2faa123929054b25153f30 100644 (file)
$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 a762beb54dee114183b6ef2fc0f68c3b98147fc5..7bdc914dbea37f2e342f2fc5e75321d1e18a1e70 100644 (file)
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";
$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");
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 6d6aa0b4250a4a788c58ed83f332bb9b7f29a137..905a97893c57c2297835ad542c6abcd531b7d569 100644 (file)
/* 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 3bc50dd4a261643d3c366fc79f28387f1a383e12..5f0965c813376b397b02c65dedad423c1aa29fc8 100644 (file)
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";
$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");
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 f8f1b3be44483430aeca053dce72cf9e50cab267..c5e18af3b87af365aa3fe3182adfeebb3623c051 100644 (file)
$ldap = $this->config->get_ldap_link();
$ldap->cd ($this->dn);
$release = $this->parent->parent->fai_release;
- $use_dn = preg_replace("/".preg_quote(FAI::get_release_dn($this->dn))."/i", $release, $this->dn);
+ $use_dn = preg_replace("/".preg_quote(FAI::get_release_dn($this->dn), '/')."/i", $release, $this->dn);
new log("remove","fai/".get_class($this),$use_dn,$this->attributes);
FAI::prepare_to_save_FAI_object($use_dn,array(),true);
foreach($this->SubObjects as $name => $obj){
- $use_dn = preg_replace("/".preg_quote(FAI::get_release_dn($this->dn))."/i", $release, $obj['dn']);
+ $use_dn = preg_replace("/".preg_quote(FAI::get_release_dn($this->dn), '/')."/i", $release, $obj['dn']);
FAI::prepare_to_save_FAI_object($use_dn,array(),true);
}
$this->handle_post_events("remove");
index 9ffb498abd8a43633e091235c20822b96f2f5c6a..650515abc4cda8d7670ed26b13365ce2af223080 100644 (file)
}
/* Page header*/
if (session::is_set('objectinfo')){
- $display= print_header(get_template_path($FAI->plIcon), _("Software deployment"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".@LDAP::fix(session::get('objectinfo')));
+ $display= print_header(get_template_path($FAI->plIcon), _("Software deployment"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".LDAP::fix(session::get('objectinfo')));
} else {
$display= print_header(get_template_path($FAI->plIcon), _("Software deployment"));
}
diff --git a/gosa-plugins/gofax/gofax/blocklists/class_blocklistManagement.inc b/gosa-plugins/gofax/gofax/blocklists/class_blocklistManagement.inc
index 962408b0b3fed98e97c52d531fa7d1a622a2d27e..1346ab95c728dc15547a0c9034e5e74eb05e9b32 100644 (file)
$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);
// 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 76faf09da9449da5a67cbe5505c76eecd0b7750c..8258b93ae6a92983de532db4740b5d0a82ece399 100644 (file)
$field0 = array("string" => "<input type='checkbox' id='item_selected_".$key."' name='item_selected_".$key."'>" ,
"attach" => "style='width:20px;'");
$field1 = array("string" => sprintf($blockimg,$val['dn']), "attach" => "style='text-align:center;width:20px;'");
- $field2 = array("string" => sprintf($editlink,$key,$display), "attach" => "style='' title='".preg_replace('/ /', ' ', @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 2bee86e454695397f5f5b0cbb7e5d5eb7716baf1..7cbadac08dd0a3e6a389f4f585f27b0a1dda6f64 100644 (file)
/* Page header*/
if (session::is_set('objectinfo')){
- $display= print_header(get_template_path($blocklist->plIcon), _("Blocklist management"), "<img alt=\"\"align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".@LDAP::fix(session::get('objectinfo')));
+ $display= print_header(get_template_path($blocklist->plIcon), _("Blocklist management"), "<img alt=\"\"align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".LDAP::fix(session::get('objectinfo')));
} else {
$display= print_header(get_template_path($blocklist->plIcon), _("Blocklist management"));
}
diff --git a/gosa-plugins/gofax/gofax/faxaccount/class_gofaxAccount.inc b/gosa-plugins/gofax/gofax/faxaccount/class_gofaxAccount.inc
index 22381c1b41ebc790c3788adee5d3fe10272c0ef4..4deac179ff184bfa9fea6852c25967cdedfb8c48 100644 (file)
/* 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];
}
/* 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 e0b758aafbbc4ff656d2bca05d3b8e39c722af53..7889e6d10a3743d434544f8aaa1971fca8e9cf81 100644 (file)
$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 e95b17da6840d9ff3c474ecdc6faf3ec21dfb599..70554d531b416e6fd0824ddaea3ed13573b6520a 100644 (file)
}
/* 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 899b2c231d9b850b5614dfe85b266a4b4ccd01cf..fe083b72da80d31da36fdadc0bb35cde03ff2c52 100644 (file)
} 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 a944a1571ef339f852266205208c83baea5afa99..ffa0f2ec230e7d7950541d7b726c5e99344d02a3 100644 (file)
/* 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 */
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 3a10ee38347c6668da3bb44ff47b849aadb7b9d1..3717f5e54ff8e594ec2f91be3d3faef1c7c7fc11 100644 (file)
/* Page header*/
if (session::is_set('objectinfo')){
- $display= print_header(get_template_path('plugins/gofon/images/conference.png'), _("Conference management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".@LDAP::fix(session::get('objectinfo')));
+ $display= print_header(get_template_path('plugins/gofon/images/conference.png'), _("Conference management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".LDAP::fix(session::get('objectinfo')));
} else {
$display= print_header(get_template_path('plugins/gofon/images/conference.png'), _("Conference management"));
}
diff --git a/gosa-plugins/gofon/gofon/macro/class_divListMacros.inc b/gosa-plugins/gofon/gofon/macro/class_divListMacros.inc
index 69c4db723bc6aee16299dec0aac7b7fdc173a162..d2ac863beffde6a757f892bc516d17da6a57d250 100644 (file)
$field0 = array("string" => "<input type='checkbox' id='item_selected_".$key."' name='item_selected_".$key."'>" ,
"attach" => "style='width:20px;'");
$field1 = array("string" => sprintf($macroimg,$val['dn']), "attach" => "style='text-align:center;width:20px;'");
- $field2 = array("string" => sprintf($editlink,$key,$display), "attach" => "style='' title='".preg_replace('/ /', ' ', @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 d9f2cf6ba57ccb821949d76fb5812eeb863fa02e..8f0652ac5bed76438d29db20d344fa02384abc82 100644 (file)
}
} 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 a13484cd58dbcdbf291f8ba0e92d20020b3f2df5..04cb48277e3ad6f23284d5e09d3a4534cbeb7357 100644 (file)
$dns_names = array();
foreach($this->dns as $dn){
- $dns_names[] = @LDAP::fix($dn);
+ $dns_names[] = LDAP::fix($dn);
}
/* Add entry locks */
/* Lock the current entry, so nobody will edit it during deletion */
add_lock ($this->dn, $this->ui->dn);
$smarty= get_smarty();
- $smarty->assign("intro", msgPool::deleteInfo(@LDAP::fix($this->dn),_("macro")));
+ $smarty->assign("intro", msgPool::deleteInfo(LDAP::fix($this->dn),_("macro")));
$smarty->assign("multiple", false);
return($smarty->fetch (get_template_path('remove.tpl', TRUE)));
} else {
index d29a5698a2af23d29717804aeb48986de04f1b70..9c0bc1bd3483be226e7d97ccddff41c154ca27d0 100644 (file)
$display= print_header( get_template_path('images/macros.png'),
_("Phone macro management"),
"<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\">
- ".@LDAP::fix(session::get('objectinfo')));
+ ".LDAP::fix(session::get('objectinfo')));
} else {
$display= print_header(get_template_path('plugins/gofon/images/macros.png'), _("Phone macro management"));
}
diff --git a/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc b/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc
index 2176e776b63c367c75f5e4815535c1b00330aff5..cbef4a0f28687d534e2680b8f07687173fddb378 100644 (file)
/* 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 4463602625d9c88fb8522d2a3e1f5bd3e4c22e01..5ae70c23b1d65f3d3c75b01b952bf301f66291e1 100644 (file)
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 f8364a09999fc3dd0ae42a310269a1fce468605c..df892ee231fc49dfe7688654a3f49cca02b42e51 100644 (file)
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
$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 942e1c4bf5cfff6955df6f79e04d0f6e7368635a..6283ec927635f94b8cf4afe666296244be24c864 100644 (file)
$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 */
/* 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 {
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 2d7a31ab4693d6ed21f99ec39d4617e8633765c6..a97cc103955367a266ca9858209d4d77875ed4f4 100644 (file)
$actions.= "<img src='images/empty.png' alt=' '>";
}
- $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 e48883babd700320ed2e688642eacf5f78f62637..eaff4c32211c19cf18790c53d2f1bbeab1f16c40 100644 (file)
/* Page header*/
if (session::is_set('objectinfo')){
- $display= print_header(get_template_path($applicationManagement->plIcon), _("Application management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".@LDAP::fix(session::get('objectinfo')));
+ $display= print_header(get_template_path($applicationManagement->plIcon), _("Application management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".LDAP::fix(session::get('objectinfo')));
} else {
$display= print_header(get_template_path($applicationManagement->plIcon), _("Application management"));
}
diff --git a/gosa-plugins/goto/admin/devices/class_deviceManagement.inc b/gosa-plugins/goto/admin/devices/class_deviceManagement.inc
index d82ac62e8d8a6ecc78b4ed4facdfc90e78208659..e8735a43571e9cb5f988053d31ed549565b2043a 100644 (file)
$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);
/* 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 40d996d92c541eb1c0c0e9510741fda8755cf0cc..d81ebd460a5105ecbd8076f2dd1a62dcba24ec68 100644 (file)
$actions.= "<img src='images/empty.png' alt=' ' class='center'>";
}
- $title = "title='".preg_replace('/ /', ' ', @LDAP::fix($val['dn']))."'";
+ $title = "title='".preg_replace('/ /', ' ', LDAP::fix($val['dn']))."'";
if(!isset($val['description'][0])){
$desc = "";
index 4dc8c7dee867f54ddc6f327f6f8d81ea90865379..45aaf4a433f34fd23e6b08b9dcb01aec2d03161e 100644 (file)
/* Page header*/
if (session::is_set('objectinfo')){
- $display= print_header(get_template_path($DeviceManagement->plIcon), _("Hotplug device management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".@LDAP::fix(session::get('objectinfo')));
+ $display= print_header(get_template_path($DeviceManagement->plIcon), _("Hotplug device management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".LDAP::fix(session::get('objectinfo')));
} else {
$display= print_header(get_template_path($DeviceManagement->plIcon), _("Hotplug device management"));
}
diff --git a/gosa-plugins/goto/admin/groups/apps/class_groupApplication.inc b/gosa-plugins/goto/admin/groups/apps/class_groupApplication.inc
index 069c394238443205baeffd047dab132284176c7c..a6cb616bb099028804c6dd97c8b49f9a7a642824 100644 (file)
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));
}
}
$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;
}
*/
$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
$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{
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 079328181ee63f51141768cc38ec757edd80719b..8fe4e83f2d916f663be33ae78c94ac5107ec739b 100644 (file)
$action.= "<img src='images/empty.png' alt=' ' class='center'>";
}
- $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 97b28e77949865b12206b45b6ab3c17fc0586749..2e266a903c1e7c0fa4dbd2239c976fc60821ca4c 100644 (file)
$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 ac4b762922a55cf42c7b0008cf84be0f80569e72..61285cda798367627f789519b0e12d9cf1228737 100644 (file)
$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);
/* 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 {
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;
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 5acff3063a3c29149fbc9f26a4be89b7793a4756..79d8da876e8769f4fa1736ee475c4563e2c4e83c 100644 (file)
/* Page header*/
if (session::is_set('objectinfo')){
- $display= print_header(get_template_path($MimeTypeManagement->plIcon), _("Mimetype management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".@LDAP::fix(session::get('objectinfo')));
+ $display= print_header(get_template_path($MimeTypeManagement->plIcon), _("Mimetype management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".LDAP::fix(session::get('objectinfo')));
} else {
$display= print_header(get_template_path('images/mimetypes.png'), _("Mimetype management"));
}
diff --git a/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc
index d6e2626e8da797dbb677077d4695faf9e2dd31ef..e12c79d6b9d022905079d7e4dfc58716a7910bc4 100644 (file)
/* 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;
} 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])){
/* 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;
/* 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 */
/* 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;
}
/* 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 d18612059dd397b881f15b333ba479f700e54624..0c043fe3c0728d5bb194c26de9c6d0eaee57530c 100644 (file)
$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 */
}
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 f156bc07507582fe557c873c3b3ed06a30080084..a19bfe318f5d4dc126c86d21508c6ba7a492df60 100644 (file)
*/
$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'];
}
/* 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 4ec0149260391411df36c9f32f8d1f7a702c2958..7246e559782671d88870fd27aa25bafab71a8fb7 100644 (file)
$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 */
}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 f3a7f17a15c52d155e5c3503335b8042cf880631..f0fcff4e40bab939967d2b0eb1d0649369f9edfd 100644 (file)
*/
$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'];
}
/* 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 3b623259d1316bf5cac5209fa0edf2758f3605cf..da4a7d674251387f1212461898f481ef3ff38c62 100644 (file)
*/
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 f2dc8669c91085d73b75e1aa1581398643aa4016..165659b461ef19b0cbafccafe318685bb45970c5 100644 (file)
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 323a25fcd5d020cac6f609b3f8a68b94f78573f5..8bed2866af2dfb17f135e6ca7c1de611d54375ad 100644 (file)
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 33250ca77dc237186f710d8ea70e5d4627e57251..8af43592e145263a08c06208c9c9eb2eae5448c2 100644 (file)
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 42b8781c2300526bd202231c132b03dbd7a80b83..794ab8af832e0387950742fc63dcfb61a098d261 100644 (file)
if(isset($this->uid_map[$line['user']])){
$user = $this->uid_map[$line['user']];
}else{
- $user = preg_replace("/,".preg_quote($this->config->current['BASE'])."/",$base,$line['user']);
+ $user = preg_replace("/,".preg_quote($this->config->current['BASE'], '/')."/",$base,$line['user']);
}
- $object = preg_replace("/,".preg_quote($this->config->current['BASE'])."/",$base,$line['object']);
+ $object = preg_replace("/,".preg_quote($this->config->current['BASE'], '/')."/",$base,$line['object']);
$res.=" <tr style=\"$col\">\n";
$res.=" <td title='".$line['objecttype']."'>".$line['action']."</td>";
diff --git a/gosa-plugins/mail/addons/mailqueue/class_mailqueue.inc b/gosa-plugins/mail/addons/mailqueue/class_mailqueue.inc
index d9159bafb9a171e0afad7630c698fc904602d851..47612b903fcc1971fdf5c04f6170122a0f4f63d6 100644 (file)
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 553150cd8e652ee2839c33a7c529dffdc2edd817..3eb055bde5f576fed9d53d28dc24c389fdf9df65 100644 (file)
/* 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 5553dfd666082b3d1cbb9992d865d71b22b9de8b..c050ed4e7019e0697f24743c0ccbffe3175781b9 100644 (file)
/* 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 970f2c7f3295cd58617cf81538e854fd7d34c2f6..21f914eeca83ced05fa15d506201215abbcec9f6 100644 (file)
*/
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']);
/* Collect all principals for the current host.
*/
- if(preg_match("/\/".preg_quote($this->namingAttr)."\@/",$p_name)){
+ if(preg_match("/\/".preg_quote($this->namingAttr, '/')."\@/",$p_name)){
$pre = preg_replace("/\/.*$/","/",$p_name);
$found[] = "<b>".$pre.$this->namingAttr."@".$data['REALM']."</b> ".
_("updated to").
$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;
}
*/
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
*/
/* 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 7791cb4e0a42f4e9e85f3f3cef111600928419dc..c09a13a9eb3221448d96b380eaefdf119ad4f99e 100644 (file)
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 1cc1186f9f58076c72953f3ab4aad58e94964bdf..5f150b223e3efb09ee45a46ff0311c980f5c7e9e 100644 (file)
#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 1cac6ba02cda3267c982e5e7bfeb60e37b393a19..e88b9ebe5146cd87aa4dfbec36529aa2d3b719c7 100644 (file)
$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 a47b6f629424b478c16676c93df01b82732ac081..924115d15b0fafb76ac53b631929f7146a41f75a 100644 (file)
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 8c08ad30008f1e14e7b9d5d2dd7deefddde44b43..81c9de50ad661a8ce6ac96defb1b192f86c19620 100644 (file)
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 9e8f26248aafd0aa5ec5757a661e504935cc7d0b..c903563e159a8ad798556d65be3d25dfc9c45b5c 100644 (file)
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{
index ed768b49d8d82a228aa0fa4d531189bf479c5707..396feff873603737a871dc01f5ac13a8d0edb66f 100644 (file)
$display= print_header(get_template_path('plugins/sudo/images/sudo.png'),
_("Sudo role administration"), "<img alt=\"\" align=\"middle\" src=\"".
get_template_path('images/lists/locked.png')."\"> ".
- @LDAP::fix(session::get('objectinfo')));
+ LDAP::fix(session::get('objectinfo')));
} else {
$display= print_header(get_template_path('plugins/sudo/images/sudo.png'), _("Sudo role administration"));
}
diff --git a/gosa-plugins/systems/admin/systems/class_componentGeneric.inc b/gosa-plugins/systems/admin/systems/class_componentGeneric.inc
index 72a770afbea776a5d971c0f7e76ed6748c72ba3c..766fe3b4be20ecf1a831d370aac74f577650bc1d 100644 (file)
$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 */
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 a68c74497b3e0614001340d4aeb18fad8ef07445..88cd4f5113b85369796f13431959b182498c635e 100644 (file)
$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 44b1cc4a8579e14ac8eca178d43d23df3549442b..9bfa325eb9c2e2a516340e38e961dd0e7e6a0944 100644 (file)
$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");
}
/* 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 07cea7c68d115b9770931d5fb45c2312c7314a5c..40d58f000f3e72d06a2c9a62b782e56288d3f624 100644 (file)
$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 */
$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;
}
/* 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 059e4f9614878df1c3be98e1c1fb0a5490b17105..1cf1a4c1848c6c192ad48f8426c3eb88f57adf55 100644 (file)
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()));
}
$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);
$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 ee86742e3a1d99880488a8369cdf030d1f0fce63..99dc629f3bff47a303cb3edc630df5b4f67bbf96 100644 (file)
/* Page header*/
if (session::is_set('objectinfo')){
- $display= print_header(get_template_path($systems->plIcon), _("System management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".@LDAP::fix(session::get('objectinfo')));
+ $display= print_header(get_template_path($systems->plIcon), _("System management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".LDAP::fix(session::get('objectinfo')));
} else {
$display= print_header(get_template_path($systems->plIcon), _("System management"));
}