diff --git a/gosa-plugins/dns/admin/systems/services/dns/class_servDNS.inc b/gosa-plugins/dns/admin/systems/services/dns/class_servDNS.inc
index 9890931ea7ae3d477c07963729d2422783c6aee5..d2779828baf2f93336700ad7d20bd8e13a9e1d8b 100644 (file)
class servdns extends goService
{
- /* CLI vars */
- var $cli_summary= "Manage server basic objects";
- var $cli_description= "Some longer text\nfor help";
- var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
-
/* attribute list for save action */
var $ignore_account = FALSE;
var $attributes = array();
$smarty->assign("dns_take_over",TRUE);
$smarty->assign("info",$info);
$warning = sprintf(_("You are going to migrate the DNS setup from server '%s'."),$this->dns_server_list['ENTRIES'][$id]['cn'][0]);
- $warning2 = _("The migration will be startet when you save this system. To cancel this action, use the cancel button below.");
+ $warning2 = _("The migration will be started when you save this system. To cancel this action, use the cancel button below.");
$smarty->assign("warning",$warning);
$smarty->assign("warning2",$warning2);
- return($smarty->fetch(get_template_path('servdns.tpl', TRUE)));
+ return($smarty->fetch(get_template_path('servdns.tpl', TRUE, dirname(__FILE__))));
}
*/
if(count($this->dialog->check())){
foreach($this->dialog->check() as $msgs){
- print_red($msgs);
+ msg_dialog::display(_("Error"), $msgs, ERROR_DIALOG);
}
}else{
/* add new/edited zone
/* Add entries to divlist
*/
- $editImg = "<input type='image' src='images/edit.png' name='editZone_%s'>";
+ $editImg = "<input type='image' src='images/lists/edit.png' name='editZone_%s'>";
if($this->acl_is_removeable()){
- $editImg.= "<input type='image' src='images/edittrash.png' name='delZone_%s'>";
+ $editImg.= "<input type='image' src='images/lists/trash.png' name='delZone_%s'>";
}
$link = "<a href='?plug=".$_GET['plug']."&act=edit&id=%s'>%s</a>";
/* Display tempalte
*/
$smarty->assign("ZoneList",$ZoneList->DrawList());
- $display.= $smarty->fetch(get_template_path('servdns.tpl', TRUE));
+ $display.= $smarty->fetch(get_template_path('servdns.tpl', TRUE, dirname(__FILE__)));
return($display);
}
if(count($used)> 2) {
$str .=" ... ";
}
- print_red(sprintf(_("Can't delete the selected zone, because it is still in use by these entry/entries '%s'"),trim($str)));
+ msg_dialog::display(_("Error"), sprintf(_("Cannot delete the selected zone. It is still in use by '%s'"), trim($str)), ERROR_DIALOG);
return(false);
}else{
unset($this->Zones[$id]);
$old_dn = $this->dn;
}
- $tmp = DNS::getDNSZoneEntriesDiff($this->config,$this->Zones,$old_dn);
-
/* Update dns to current object dn */
$tmp = DNS::getDNSZoneEntriesDiff($this->config,$this->Zones,$old_dn);
$tmp2 = array();
foreach($tmp['zoneUpdates'] as $dn => $attrs){
$ldap->cd($dn);
$ldap->modify($attrs);
- new log("modfiy","unknown/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Updating of system server/dns with dn '%s' failed."),$this->dn));
+ new log("modify","unknown/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
+ }
}
}
$ldap->cd($dn);
$ldap->rmdir_recursive($dn);
new log("remove","unknown/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of system server/dns with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_DEL, get_class()));
+ }
/* Handle Post events */
if(preg_match("/^zoneName=/",$dn)){
if($ldap->fetch()){
$ldap->cd($dn);
$ldap->modify ($attrs);
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of system server/dns with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
+ }
/* Handle Post events */
if(preg_match("/^zoneName=/",$dn)){
}else{
$ldap->cd($dn);
$ldap->add($attrs);
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of system server/dns with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_ADD, get_class()));
+ }
/* Handle Post events */
if(preg_match("/^zoneName=/",$dn)){
$attrs[$flag] = $value;
$this->$flag = $value;
$ldap->modify($attrs);
- show_ldap_error($ldap->get_error(), sprintf(_("Set status flag for system server/dns with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
+ }
$this->action_hook();
}
}