where("`show`='y'"); return $select; } protected function _getListPositions() { $select = $this->_db->select();; $select->from($this->_getPair(), 'id'); $select->where('`show` = "y"'); if (Qs_Array::get($this->_selectOptions, 'order')) { $select->order($this->_selectOptions['order']); } $positions = $this->_db->fetchCol($select); $positions = array_flip($positions); return $positions; } protected function _prepareSearchList(array &$list, array $providerOptions) { if (!empty($list)) { $positions = $this->_getListPositions(); $testimonialList = new App_Partner_List(array()); $ipp = $testimonialList->getDefaultIpp(); foreach ($list as &$row) { $position = (int) $positions[$row['id']]; $position++; $row['page'] = ceil($position / $ipp); if ($row['url']) { $url = parse_url($row['url']); $row['urlTitle'] = Qs_Text_Mark::markSearchWords($url['host'], $this->_filter['query']) ; } } } return parent::_prepareSearchList($list, $providerOptions); } }