1
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2025-08-07 17:42:53 +03:00

PFAHandler:

- build_select_query(): add support for $search['_'] (searching if one
  of the $this->searchfields contains the search text)
- getList(): make sure '_' is kept in the search parameters

functions.inc.php:
- db_where_clause(): slightly relax checks - if $condition is empty,
  only error out if $additional_raw_where is also empty


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1772 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
Christian Boltz
2015-04-06 13:39:21 +00:00
parent 31006928b4
commit cc598d0f3f
2 changed files with 11 additions and 1 deletions

View File

@@ -1628,7 +1628,7 @@ function db_where_clause($condition, $struct, $additional_raw_where = '', $searc
die('db_where_cond: parameter $cond is not an array!');
} elseif(!is_array($searchmode)) {
die('db_where_cond: parameter $searchmode is not an array!');
} elseif (count($condition) == 0) {
} elseif (count($condition) == 0 && trim($additional_raw_where) == '') {
die("db_where_cond: parameter is an empty array!"); # die() might sound harsh, but can prevent information leaks
} elseif(!is_array($struct)) {
die('db_where_cond: parameter $struct is not an array!');