From 50f4f5f75726878bdd250724590997d7b1ad59d5 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 19 Jul 2017 17:38:22 +0200 Subject: [PATCH] allow to add SQL with nummeric keys to Storage\Base::read() argument, like in ::search or Db::select --- api/src/Storage/Base.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/src/Storage/Base.php b/api/src/Storage/Base.php index fcddaab0da..b38cd72476 100644 --- a/api/src/Storage/Base.php +++ b/api/src/Storage/Base.php @@ -549,6 +549,11 @@ class Base unset($query[$col]); } } + // copy direct SQL parts from $keys + for($i = 0; is_array($keys) && isset($keys[$i]); ++$i) + { + $query[] = $keys[$i]; + } foreach($this->db->select($this->table_name,'*'.($extra_cols?','.(is_array($extra_cols)?implode(',',$extra_cols):$extra_cols):''), $query,__LINE__,__FILE__,False,'',$this->app,0,$join) as $row) {