'sort_name', 'title' => 'sort_title', ); $order = strtolower($this->options['order']); $field = empty($special_sort_fields[$this->real_field]) ? $this->real_field : $special_sort_fields[$this->real_field]; $exposed_data = $this->view->exposed_data; $handler = $this->view->sort[$exposed_data['sort_by']]; $this->query->add_sort($field, $order, !empty($handler->options['exposed'])); } }