Handle additional_conditions
authorJamie Cameron <jcameron@webmin.com>
Wed, 6 May 2009 20:41:05 +0000 (20:41 +0000)
committerJamie Cameron <jcameron@webmin.com>
Wed, 6 May 2009 20:41:05 +0000 (20:41 +0000)
postfix/postfix-lib.pl

index ed32956..c122497 100644 (file)
@@ -770,7 +770,8 @@ sub get_maps
                                       "select ".$conf->{'where_field'}.
                                       ",".$conf->{'select_field'}.
                                       " from ".$conf->{'table'}.
-                                      " ".$conf->{'additional_conditions'});
+                                      " where 1 = 1 ".
+                                      $conf->{'additional_conditions'});
                    if (!$cmd || !$cmd->execute()) {
                        &error(&text('mysql_elist',
                             "<tt>".&html_escape($dbh->errstr)."</tt>"));