Revert part of commit 05ce70f1a8 because it breaks codes where result of search function expecting to be an array instead of Db2DataIterator (eg. timesheet)

This commit is contained in:
Hadi Nategh 2019-01-28 12:35:20 +01:00
parent fdfcc15c6b
commit b3f2d7b102

View File

@ -1643,7 +1643,6 @@ class Base
} }
if (!$order) $order = current($cols); if (!$order) $order = current($cols);
$this->search_return_iterator = true;
if (($search =& $this->search(array(),($key_col ? $key_col.',' : 'DISTINCT ').implode(',',$value_col),$order,'','',false,'AND',false,$filter))) if (($search =& $this->search(array(),($key_col ? $key_col.',' : 'DISTINCT ').implode(',',$value_col),$order,'','',false,'AND',false,$filter)))
{ {
if (preg_match('/AS ([a-z_0-9]+)$/i',$key_col,$matches)) if (preg_match('/AS ([a-z_0-9]+)$/i',$key_col,$matches))
@ -1671,7 +1670,6 @@ class Base
if ($data) $ret[$row[$key_col]] = $data; if ($data) $ret[$row[$key_col]] = $data;
} }
} }
$this->search_return_iterator = false;
return $cache[$cache_key] =& $ret; return $cache[$cache_key] =& $ret;
} }