0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-19 19:22:14 +02:00

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
This commit is contained in:
Christian Boltz 2011-11-27 21:29:00 +00:00
parent 3baf1a61c9
commit 0f0b7d336c

View File

@ -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