summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 027fa83)
raw | patch | inline | side by side (parent: 027fa83)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 24 Mar 2006 11:54:30 +0000 (11:54 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 24 Mar 2006 11:54:30 +0000 (11:54 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2905 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_ldap.inc | patch | blob | history |
diff --git a/include/class_ldap.inc b/include/class_ldap.inc
index 07797798f588a0cffa6a2b512dab071e65a34686..3809d85433119afb83042c72ae6997d216b07f8c 100644 (file)
--- a/include/class_ldap.inc
+++ b/include/class_ldap.inc
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>";
+ sprintf(_("Creating copy of %s"),"<i>".$sourcedn."</i>")."</h4>";
}else{
if(preg_match("/^ou=/",$sourcedn)){
- echo "<br><h3>"._("Processing")." : ".preg_replace("/,.*$/","",$destinationdn)."</h3>";
+ echo "<br><h3>"._("Processing")." <i>$destinationdn</i></h3>";
}else{
$tmp = split(",",$sourcedn);
- echo "<b>Current object : ";
+ echo " <b>"._("Object").": ";
for($i = 0; $i < ($depth -1 ) ; $i ++) {
echo preg_replace("/^.*=/","",$tmp[$i])." ";
}
$deststr = substr($deststr,0,96)."...";
}
- echo "".$deststr."</br>";
+ echo $deststr."</br>";
}
}
/* 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);
}