From e97bad87abe66ae111de3d91777ef54a8e813269 Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Wed, 22 Apr 2009 14:56:28 +0000 Subject: [PATCH] broadcast-message.php: fix hard coded table names git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@643 a1433add-5e2c-0410-b055-b7f2511e0802 --- broadcast-message.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/broadcast-message.php b/broadcast-message.php index fbb145b3..e4d298fd 100644 --- a/broadcast-message.php +++ b/broadcast-message.php @@ -45,9 +45,11 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") } else { - $q = 'select username from mailbox union '. - 'select goto from alias '. - 'where goto not in (select username from mailbox)'; + $table_mailbox = table_by_key('mailbox'); + $table_alias = table_by_key('alias'); + + $q = "select username from $table_mailbox union select goto from $table_alias " . + "where goto not in (select username from $table_mailbox)"; $result = db_query ($q); if ($result['rows'] > 0)