AAAAhome/academiac/www/administrator/components/com_finder/controllers/filters.php 0000644 00000002004 15145312614 0024106 0 ustar 00 true)) { $model = parent::getModel($name, $prefix, $config); return $model; } } home/academiac/www/administrator/components/com_finder/models/filters.php 0000644 00000007337 15145323311 0023035 0 ustar 00 getDbo(); $query = $db->getQuery(true); // Select all fields from the table. $query->select('a.*'); $query->from($db->quoteName('#__finder_filters') . ' AS a'); // Join over the users for the checked out user. $query->select('uc.name AS editor'); $query->join('LEFT', $db->quoteName('#__users') . ' AS uc ON uc.id=a.checked_out'); // Join over the users for the author. $query->select('ua.name AS user_name'); $query->join('LEFT', $db->quoteName('#__users') . ' AS ua ON ua.id = a.created_by'); // Check for a search filter. if ($this->getState('filter.search')) { $query->where('( ' . $db->quoteName('a.title') . ' LIKE \'%' . $db->escape($this->getState('filter.search')) . '%\' )'); } // If the model is set to check item state, add to the query. if (is_numeric($this->getState('filter.state'))) { $query->where($db->quoteName('a.state') . ' = ' . (int) $this->getState('filter.state')); } // Add the list ordering clause. $query->order($db->escape($this->getState('list.ordering') . ' ' . $db->escape($this->getState('list.direction')))); return $query; } /** * Method to get a store id based on model configuration state. * * This is necessary because the model is used by the component and * different modules that might need different sets of data or different * ordering requirements. * * @param string $id A prefix for the store id. [optional] * * @return string A store id. * * @since 2.5 */ protected function getStoreId($id = '') { // Compile the store id. $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.state'); return parent::getStoreId($id); } /** * Method to auto-populate the model state. Calling getState in this method will result in recursion. * * @param string $ordering An optional ordering field. [optional] * @param string $direction An optional direction. [optional] * * @return void * * @since 2.5 */ protected function populateState($ordering = null, $direction = null) { // Load the filter state. $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); $this->setState('filter.search', $search); $state = $this->getUserStateFromRequest($this->context . '.filter.state', 'filter_state', '', 'string'); $this->setState('filter.state', $state); // Load the parameters. $params = JComponentHelper::getParams('com_finder'); $this->setState('params', $params); // List state information. parent::populateState('a.title', 'asc'); } } home/academiac/www/administrator/components/com_config/models/fields/filters.php 0000644 00000011144 15146625213 0024277 0 ustar 00 getUserGroups(); // Build the form control. $html = array(); // Open the table. $html[] = '
| '; $html[] = ' '.JText::_('JGLOBAL_FILTER_GROUPS_LABEL').''; $html[] = ' | '; $html[] = ''; $html[] = ' '.JText::_('JGLOBAL_FILTER_TYPE_LABEL').''; $html[] = ' | '; $html[] = ''; $html[] = ' '.JText::_('JGLOBAL_FILTER_TAGS_LABEL').''; $html[] = ' | '; $html[] = ''; $html[] = ' '.JText::_('JGLOBAL_FILTER_ATTRIBUTES_LABEL').''; $html[] = ' | '; $html[] = '
|---|---|---|---|
| '; $html[] = ' '.str_repeat('|—', $group->level).$group->text; $html[] = ' | '; $html[] = ''; $html[] = ' '; $html[] = ' | '; $html[] = ''; $html[] = ' '; $html[] = ' | '; $html[] = ''; $html[] = ' '; $html[] = ' | '; $html[] = '