1
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2025-07-31 10:04:20 +03:00

reformat; fix some transition bugs

This commit is contained in:
David Goodwin
2019-01-06 21:03:43 +00:00
committed by David Goodwin
parent ea33d9951a
commit 1176c9ce78
11 changed files with 61 additions and 132 deletions

View File

@ -154,8 +154,8 @@ class AdminHandler extends PFAHandler {
'domain' => 'ALL',
);
$where = db_where_clause(array('username' => $this->id, 'domain' => 'ALL'), $this->struct);
$result = db_query("SELECT username from " . table_by_key('domain_admins') . " " . $where);
if ($result['rows'] == 0) {
$result = db_prepared_fetch_one("SELECT username from " . table_by_key('domain_admins') . " " . $where);
if(empty($result)) {
db_insert('domain_admins', $values, array('created'));
# TODO: check for errors
}