From 2e2ae0c36b4f7497910804e048a8d1b4382f8d25 Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Tue, 25 Nov 2008 09:51:51 +0000 Subject: [PATCH] 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 --- setup.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.php b/setup.php index 844aafef..2e1096c4 100644 --- a/setup.php +++ b/setup.php @@ -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);