DomainHandler.php:

- better error/info messages
- remove superfluous (and never displayed) success message in storemore()

languages/*.lang:
- add texts for DomainHandler
- delete empty pAdminCreate_domain_defaultaliases_text



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1588 a1433add-5e2c-0410-b055-b7f2511e0802
pull/2/head
Christian Boltz 11 years ago
parent 801acc6cf2
commit 1688065fca

@ -232,13 +232,14 @@ $PALANG['pAdminCreate_domain_domain_text_error'] = 'The domain already exists!';
$PALANG['domain_does_not_exist'] = 'This domain does not exist!';
$PALANG['pAdminCreate_domain_domain_text_error2'] = 'The domain is invalid!';
$PALANG['pAdminCreate_domain_defaultaliases'] = 'Add default mail aliases';
$PALANG['pAdminCreate_domain_defaultaliases_text'] = '';
$PALANG['pAdminCreate_domain_button'] = 'Add Domain';
$PALANG['pAdminCreate_domain_result_error'] = 'Adding the domain %s failed!';
$PALANG['pAdminCreate_domain_result_success'] = 'The domain %s has been added.';
$PALANG['domain_updated'] = 'The domain %s has been updated.';
$PALANG['pAdminDelete_admin_error'] = 'Unable to delete admin!';
$PALANG['domain_postdel_failed'] = 'The domain postdeletion script failed, check the error log for details!';
$PALANG['domain_postcreate_failed'] = 'The domain postcreate script failed, check the error log for details!';
$PALANG['mailbox_postdel_failed'] = 'The mailbox postdeletion script failed, check the error log for details!';
$PALANG['mailbox_postedit_failed'] = 'The mailbox postedit script failed, check the error log for details!';
$PALANG['mailbox_postcreate_failed'] = 'The mailbox postcreate script failed, check the error log for details!';

@ -24,7 +24,6 @@ class DomainHandler extends PFAHandler {
# init $this->struct, $this->db_table and $this->id_field
protected function initStruct() {
# TODO: shorter PALANG labels ;-)
# TODO: hardcode 'default' to Config::read in pacol()?
$transp = Config::intbool('transport');
$quota = Config::intbool('quota');
@ -79,7 +78,7 @@ class DomainHandler extends PFAHandler {
} else {
$this->msg['logname'] = 'edit_domain';
$this->msg['store_error'] = 'pAdminEdit_domain_result_error';
$this->msg['successmessage'] = 'pAdminCreate_domain_result_success'; # TODO: better message for edit
$this->msg['successmessage'] = 'domain_updated';
}
}
@ -115,15 +114,10 @@ class DomainHandler extends PFAHandler {
# TODO: error checking
}
}
if ($this->new) {
$tMessage = Config::lang('pAdminCreate_domain_result_success') . " (" . $this->id . ")"; # TODO: tMessage is not used/returned anywhere
} else {
# TODO: success message for edit
}
if ($this->new) {
if (!$this->domain_postcreation()) {
$this->errormsg[] = Config::lang('pAdminCreate_domain_error');
$this->errormsg[] = Config::lang('domain_postcreate_failed');
}
} else {
# we don't have domain_postedit()

Loading…
Cancel
Save