index 50931968045e1ad029dcdb134028d17e4d3352aa..161d4fdcbfc438f5f945f84b9f945f858a0f694a 100644 (file)
/* check if this is a binary entry */
if(in_array_ics($attrs,$this->subBinary)){
- $var = addslashes( $ldap->get_attribute($object['dn'], $attrs,$r_array=0));
+ $var = $ldap->get_attribute($object['dn'], $attrs,$r_array=0);
}
- /* Fix slashes */
- $var = addslashes($var);
+ $var = stripslashes($var);
+
$object[$attrs] = $var;
}
}
$ldap = $this->config->get_ldap_link();
$ldap->cd ($this->dn);
- $use_dn = str_ireplace( get_release_dn($this->dn), $_SESSION['faifilter']['branch'], $this->dn);
+# $use_dn = str_ireplace( get_release_dn($this->dn), $_SESSION['faifilter']['branch'], $this->dn);
+ $use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $_SESSION['faifilter']['branch'], $this->dn);
if($_SESSION['faifilter']['branch'] == "main"){
$use_dn = $this->dn;
}
prepare_to_save_FAI_object($use_dn,array(),true);
foreach($this->SubObjects as $name => $obj){
- $use_dn = str_ireplace( get_release_dn($this->dn), $_SESSION['faifilter']['branch'], $obj['dn']);
+# $use_dn = str_ireplace( get_release_dn($this->dn), $_SESSION['faifilter']['branch'], $obj['dn']);
+ $use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $_SESSION['faifilter']['branch'], $obj['dn']);
if($_SESSION['faifilter']['branch'] == "main"){
$use_dn = $obj['dn'];
}
if(empty($obj[$attrs])){
$obj[$attrs] = array();
}
- $tmp[$attrs] = $obj[$attrs];
+ $tmp[$attrs] = stripslashes($obj[$attrs]);
}
$tmp['objectClass'] = $this->subClasses;