From 5c9750e95716102b2c42e62d6c9c8ab3205d6b3a Mon Sep 17 00:00:00 2001 From: Deon George Date: Sat, 14 May 2011 17:36:20 +1000 Subject: [PATCH] Upstream patch: Enhancement so filters can be supplied to run_filter() --- includes/kohana/modules/orm/classes/kohana/orm.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/kohana/modules/orm/classes/kohana/orm.php b/includes/kohana/modules/orm/classes/kohana/orm.php index 4df7076e..c51bdebc 100644 --- a/includes/kohana/modules/orm/classes/kohana/orm.php +++ b/includes/kohana/modules/orm/classes/kohana/orm.php @@ -1127,9 +1127,10 @@ class Kohana_ORM extends Model implements serializable { * @param string $value The value to filter * @return string */ - protected function run_filter($field, $value) + protected function run_filter($field, $value, $filters=NULL) { - $filters = $this->filters(); + if (is_null($filters)) + $filters = $this->filters(); // Get the filters for this column $wildcards = empty($filters[TRUE]) ? array() : $filters[TRUE];