summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 408c836)
raw | patch | inline | side by side (parent: 408c836)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 8 Sep 2006 07:34:06 +0000 (07:34 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 8 Sep 2006 07:34:06 +0000 (07:34 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4625 594d385d-05f5-0310-b6e9-bd551577e9d8
include/functions_FAI.inc | patch | blob | history |
index 6843c0d48610a32c24fdfcf0b5dbf5515a6f75c5..2c9297cad61318ec18086630e0982d10710fb70a 100644 (file)
while($attr = $ldap->fetch()){
$buffer = array();
- $name = str_ireplace($release,"",$attr['dn']);
+# $name = str_ireplace($release,"",$attr['dn']);
+ $name = preg_replace("/".normalizePreg($release)."/i","",$attr['dn']);
if(isset($attr['FAIstate'][0])){
if(preg_match("/removed$/",$attr['FAIstate'][0])){
while($attr = $ldap->fetch()){
$buffer = array();
- $name = str_ireplace($release,"",$attr['dn']);
+# $name = str_ireplace($release,"",$attr['dn']);
+ $name = preg_replace("/".normalizePreg($release)."/i","",$attr['dn']);
if(isset($attr['FAIstate'][0])&&(preg_match("/removed$/",$attr['FAIstate'][0]))){
$sub_releases = get_sub_releases_of_this_release($base_release);
/* Get dn suffix. Example "FAIvairableEntry=keksdose,FAIvariable=Keksregal," */
- $dn_suffix = str_ireplace($base_release,"",$dn);
+# $dn_suffix = str_ireplace($base_release,"",$dn);
+ $dn_suffix = preg_replace("/".normalizePreg($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 = str_ireplace($base_release,"",$dn);
+ $dn_suffix = preg_replace("/".normalizePreg($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 = ldap_explode_dn(str_ireplace(",".$config->current['BASE'],"",$dn),0);
+# $dns_to_check = ldap_explode_dn(str_ireplace(",".$config->current['BASE'],"",$dn),0);
+ $dns_to_check = ldap_explode_dn(preg_replace("/".normalizePreg(",".$config->current['BASE'])."/i","",$dn),0);
+ echo "<font color='red'>Replace ldap_explode_dn it is evil, it changes characters within result... </font><br>";
+
if(!is_array($dns_to_check)){
return;
}
$ldap->cd($config->current['BASE']);
/* Split dn into pices */
- $dns_to_check = ldap_explode_dn(str_ireplace(",".$config->current['BASE'],"",$Current_DN),0);
+# $dns_to_check = ldap_explode_dn(str_ireplace(",".$config->current['BASE'],"",$Current_DN),0);
+ $dns_to_check = ldap_explode_dn(preg_replace("/".normalizePreg(",".$config->current['BASE'])."/i","",$Current_DN),0);
+ echo "<font color='red'>Replace ldap_explode_dn it is evil, it changes characters within result... </font><br>";
+
if(!is_array($dns_to_check)){
return;
}