setup.php: fix table_by_key issue for domain table

git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@489 a1433add-5e2c-0410-b055-b7f2511e0802
postfixadmin-2.3
David Goodwin 16 years ago
parent 482518548c
commit 2e2ae0c36b

@ -309,9 +309,10 @@ else
if (isset ($_POST['fPassword2'])) $fPassword2 = escape_string ($_POST['fPassword2']);
// XXX need to ensure domains table includes an 'ALL' entry.
$r = db_query("SELECT * FROM domain WHERE domain = 'ALL'");
$table_domain = table_by_key('domain');
$r = db_query("SELECT * FROM $table_domain WHERE domain = 'ALL'");
if($r['rows'] == 0) {
db_insert('domain', array('domain' => 'ALL')); // all other fields should default through the schema.
db_insert($table_domain, array('domain' => 'ALL')); // all other fields should default through the schema.
}
list ($error, $tMessage, $pAdminCreate_admin_username_text, $pAdminCreate_admin_password_text) = create_admin($fUsername, $fPassword, $fPassword2, array('ALL'), TRUE);

Loading…
Cancel
Save