diff --git a/include/class_ldap.inc b/include/class_ldap.inc
index 07797798f588a0cffa6a2b512dab071e65a34686..96ff38e203b08e796d2a663a796ef53dd8e9d190 100644 (file)
--- a/include/class_ldap.inc
+++ b/include/class_ldap.inc
error_reporting(E_ALL);
if($is_first){
- echo "<font style='font-size:11px;'><h4>".
- sprintf(_("Creating duplicate of %s in %s"),"<br><i>".$sourcedn."</i><br>","<br><i>".$destinationdn."</i><br>")."</h4>";
+ echo "<h2>".sprintf(_("Creating copy of %s"),"<i>".$sourcedn."</i>")."</h2>";
}else{
if(preg_match("/^ou=/",$sourcedn)){
- echo "<br><h3>"._("Processing")." : ".preg_replace("/,.*$/","",$destinationdn)."</h3>";
+ echo "<h3>"._("Processing")." <i>$destinationdn</i></h3>";
}else{
$tmp = split(",",$sourcedn);
- echo "<b>Current object : ";
- for($i = 0; $i < ($depth -1 ) ; $i ++) {
- echo preg_replace("/^.*=/","",$tmp[$i])." ";
- }
- echo "</b>";
- echo ": <br>";
+ echo " <b>"._("Object").":</b> ";
$deststr = $destinationdn;
if(strlen($deststr) > 96){
$deststr = substr($deststr,0,96)."...";
}
- echo "".$deststr."</br>";
+ echo $deststr."<br>";
}
}
+
+ flush();
if($this->hascon){
if ($this->reconnect) $this->connect();
/* Error while fetching object / attribute abort*/
if((!$attr) || (count($attr)) ==0) {
- echo "error while fetching source dn ..";
+ echo _("Error while fetching source dn - aborted!");
return;
}
/* If is first entry, append FAIbranch to department entry */
if($is_first){
- $attr= $this->fetch($this->cat($destinationdn));
+ $this->cat($destinationdn);
+ $attr= $this->fetch();
/* Filter unneeded informations */
foreach($attr as $key => $value){
$this->modify($attr);
}
}else{
- /* If this is no department */
- foreach($attr as $key => $value){
- if(in_array($key ,array("FAItemplateFile","FAIscript"))){
- $sr= ldap_read($this->cid, $this->fix($sourcedn), "(objectClass=FAIclass)", array($key));
+ /* If this is no department */
+ foreach($attr as $key => $value){
+ if(in_array($key ,array("FAItemplateFile","FAIscript", "gotoLogonScript", "gosaApplicationIcon"))){
+ $sr= ldap_read($this->cid, $this->fix($sourcedn), "$key=*", array($key));
$ei= ldap_first_entry($this->cid, $sr);
- $tmp = (@ldap_get_values_len($this->cid, $ei,$key));
- if(is_array($tmp)){
+ if ($tmp= @ldap_get_values_len($this->cid, $ei,$key)){
$attr[$key] = $tmp;
}
}
/* Add entry */
$this->cd($destinationdn);
- $a = $this->fetch($this->cat($destinationdn));
+ $this->cat($destinationdn);
+ $a = $this->fetch();
if(!count($a)){
$this->add($attr);
}
}
}
if($is_first){
- echo "<br><b>"._("Successfully finished")."</b></font><br><br><br>";
+ echo "<p class='seperator'> </p>";
}
}