summaryrefslogtreecommitdiff
path: root/framework/Data/ActiveRecord
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Data/ActiveRecord')
-rw-r--r--framework/Data/ActiveRecord/Scaffold/TScaffoldSearch.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/framework/Data/ActiveRecord/Scaffold/TScaffoldSearch.php b/framework/Data/ActiveRecord/Scaffold/TScaffoldSearch.php
index d1a5980f..e09e99d7 100644
--- a/framework/Data/ActiveRecord/Scaffold/TScaffoldSearch.php
+++ b/framework/Data/ActiveRecord/Scaffold/TScaffoldSearch.php
@@ -95,7 +95,10 @@ class TScaffoldSearch extends TScaffoldBase
{
$table = $this->getTableInfo();
if(strlen($str=$this->getSearchText()->getText()) > 0)
- return $table->getSearchRegExpCriteria($this->getFields(), $str);
+ {
+ $builder = $table->createCommandBuilder($this->getRecordFinder()->getDbConnection());
+ return $builder->getSearchExpression($this->getFields(), $str);
+ }
}
/**
@@ -106,7 +109,7 @@ class TScaffoldSearch extends TScaffoldBase
if(strlen(trim($str=$this->getSearchableFields()))>0)
$fields = preg_split('/\s*,\s*/', $str);
else
- $fields = array_keys($this->getTableInfo()->getColumns());
+ $fields = $this->getTableInfo()->getColumns()->getKeys();
return $fields;
}