The conditions were clamped down too tight, as they prevented something like 'Table.field !='
git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716@433 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -423,14 +423,14 @@ class AppController extends Controller {
|
||||
}
|
||||
|
||||
$table = $field = null;
|
||||
if (preg_match("/^\w+\.\w+$/", $filter)) {
|
||||
if (preg_match("/^\w+\.\w+(\s*[!<>=]+)?$/", $filter)) {
|
||||
list($table, $field) = explode(".", $filter);
|
||||
}
|
||||
elseif (preg_match('/^[A-Z][A-Za-z]*$/', $filter)) {
|
||||
$table = $filter;
|
||||
$field = null;
|
||||
}
|
||||
elseif (preg_match('/^\w+$/', $filter)) {
|
||||
elseif (preg_match('/^\w+(\s*[!<>=]+)?$/', $filter)) {
|
||||
$table = $model->alias;
|
||||
$field = $filter;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user