PFAHandler:

- split code to handle domain_field == "" && admin_username != ""
  from __construct() to no_domain_field().
  Default behaviour stays to die(), but AdminHandler will override it


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1286 a1433add-5e2c-0410-b055-b7f2511e0802
pull/2/head
Christian Boltz 13 years ago
parent 3baf1a61c9
commit 0f0b7d336c

@ -29,7 +29,7 @@ class PFAHandler {
$this->admin_username = $admin_username;
if ($this->domain_field == "") {
if ($admin_username != "") die('Attemp to restrict domains without setting $this->domain_field!');
$this->no_domain_field();
} else {
if ($admin_username != "") {
$this->allowed_domains = list_domains_for_admin($admin_username);
@ -42,6 +42,10 @@ class PFAHandler {
$this->initMsg();
}
protected function no_domain_field() {
if ($this->admin_username != "") die('Attemp to restrict domains without setting $this->domain_field!');
}
/**
* initialize with $id and check if it is valid
* @param string $id

Loading…
Cancel
Save