1
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2025-07-29 22:41:11 +03:00

PFAHandler:

- read_from_db(), getList(): 
  - add $searchmode parameter (_before_ $limit and $offset!) to be able to 
    use query different query modes, not only "="
  - add a warning that $condition will be changed to array only in the future
- getList(): filter $condition for fields that are available to the user
  to avoid information leaks by using search parameters
  (filter is only applied if $condition is an array!)

functions.inc.php: 
- db_where_clause():
  - add $additional_raw_where parameter for additional query parameters
  - add $searchmode parameter to be able to use query different
    query modes, not only "=" (see $allowed_operators)
  - check for allowed operators in $searchmode
  - split query into WHERE and HAVING (if a parameter has
    $struct[select] set, HAVING is used)

list-virtual.php:
- adopt getList() call to the new syntax

AliasHandler:
- adopt getList() definition and call to the new syntax

 


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1731 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
Christian Boltz
2014-11-02 22:45:22 +00:00
parent b76511628d
commit 13f1a28b6e
4 changed files with 72 additions and 18 deletions

View File

@ -287,10 +287,10 @@ class AliasHandler extends PFAHandler {
return $db_result;
}
public function getList($condition, $limit=-1, $offset=-1) {
public function getList($condition, $searchmode = array(), $limit=-1, $offset=-1) {
# only list aliases that do not belong to mailboxes
# TODO: breaks if $condition is an array
return parent::getList( "__mailbox_username IS NULL AND ( $condition )", $limit, $offset);
return parent::getList( "__mailbox_username IS NULL AND ( $condition )", $searchmode, $limit, $offset);
}
protected function _validate_goto($field, $val) {