Index: branches/5.3.x/core/units/helpers/search_helper.php =================================================================== diff -u -N -r15483 -r15698 --- branches/5.3.x/core/units/helpers/search_helper.php (.../search_helper.php) (revision 15483) +++ branches/5.3.x/core/units/helpers/search_helper.php (.../search_helper.php) (revision 15698) @@ -1,6 +1,6 @@ Application->getUnitOption('stop-word', 'TableName') . ' + FROM ' . $this->Application->getUnitConfig('stop-word')->getTableName() . ' ORDER BY LENGTH(StopWord) DESC, StopWord ASC'; $stop_words = $this->Conn->GetCol($sql); @@ -246,8 +246,8 @@ function processAutomaticFilters($event, $search_keyword, $custom_filter) { $grid_name = $this->Application->GetVar('grid_name'); - $grids = $this->Application->getUnitOption($event->Prefix, 'Grids'); - $search_fields = array_keys($grids[$grid_name]['Fields']); + $grid = $event->getUnitConfig()->getGridByName($grid_name); + $search_fields = array_keys($grid['Fields']); $search_filter = Array(); @@ -464,7 +464,8 @@ } $object = $event->getObject(); // don't recall it each time in getCustomFilterSearchClause - $grid_info = $this->Application->getUnitOption($event->Prefix.'.'.$grid_name, 'Grids'); + $grid_info = $event->getUnitConfig()->getGridByName($grid_name); + foreach ($custom_filter as $field_name => $field_options) { list ($filter_type, $field_options) = each($field_options); $field_options['grid_options'] = $grid_info['Fields'][$field_name];