index 43ca39a03b2f0a0bcdabaa2e4e59a24b75a7743c..260957797c1585d60ff65c8ac092655dd7c3806f 100644 (file)
$this->is_dialog =true;
}
+ /* Configuration dialog open*/
+ if((isset($_POST['Markpkg']))&&(isset($_POST['usedPackages']))&&(!empty($_POST['usedPackages']))){
+ foreach($_POST['usedPackages'] as $pkg){
+ if (isset($this->usedPackages[$pkg])){
+ unset($this->usedPackages[$pkg]);
+ if (preg_match('/^-/', $pkg)){
+ $pkg= preg_replace('/^-/', '', $pkg);
+ } else {
+ $pkg= preg_replace('/^/', '-', $pkg);
+ }
+ $this->usedPackages[$pkg]= $pkg;
+ }
+ }
+ print_a($this->usedPackages);
+ }
+
/* Save Configuration */
if(isset($_POST['SaveObjectConfig'])){
if($this->FAIstate != "freeze"){
$ldap = $this->config->get_ldap_link();
$ldap->cd ($this->dn);
$ldap->rmdir_recursive($this->dn);
+ show_ldap_error($ldap->get_error(), sprintf(_("Removing of FAI/package list with dn '%s' failed."),$this->dn));
$this->handle_post_events("remove");
}
$c_str = " - "._("package is configured");
}
+ /* Adapt used name if we're marked for removal */
+ $dsc= "";
+ if (preg_match('/^-/', $usedName)){
+ $dsc= " - "._("Package marked for removal");
+ $usedName= preg_replace('/^-/', '! ', $usedName);
+ }
+
if(isset($this->list[$usedName][1])){
- $a_ret[$usedName] = $usedName." [".$this->list[$usedName][1]."]".$c_str;
+ $a_ret[$usedName] = $usedName." [".$this->list[$usedName][1]."]".$c_str.$dsc;
}else{
- $a_ret[$usedName] = $usedName.$c_str;
+ $a_ret[$usedName] = $usedName.$c_str.$dsc;
}
}
}
$ldap->cd($this->dn);
$ldap->add($this->attrs);
}
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), sprintf(_("Saving of FAI/package list with dn '%s' failed."),$this->dn));
/* Do object tagging */
$this->handle_object_tagging();
- show_ldap_error($ldap->get_error());
$ldap->cd($this->dn);
/* Save Package configurations */
$ldap->cd($pkgdn);
$ldap->add($pkgattrs);
}
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), sprintf(_("Saving of FAI/package list with dn '%s' failed."),$this->dn));
/* Handle tagging */
$this->handle_object_tagging($pkgdn, $this->gosaUnitTag);
}
}
-
-
-
-
}
}