diff --git a/administrator/components/com_search/Controller/DisplayController.php b/administrator/components/com_search/Controller/DisplayController.php deleted file mode 100644 index 8f8ca6dac18a1..0000000000000 --- a/administrator/components/com_search/Controller/DisplayController.php +++ /dev/null @@ -1,47 +0,0 @@ -input->get('view', 'searches')); - - return parent::display(); - } -} diff --git a/administrator/components/com_search/Controller/SearchesController.php b/administrator/components/com_search/Controller/SearchesController.php deleted file mode 100644 index 3f26502a4f3da..0000000000000 --- a/administrator/components/com_search/Controller/SearchesController.php +++ /dev/null @@ -1,62 +0,0 @@ -checkToken(); - - $model = $this->getModel('Searches'); - - if (!$model->reset()) - { - $this->app->enqueueMessage($model->getError(), 'error'); - } - - $this->setRedirect('index.php?option=com_search&view=searches'); - } - - /** - * Method to toggle the view of results. - * - * @return boolean - */ - public function toggleResults() - { - // Check for request forgeries. - $this->checkToken(); - - if ($this->getModel('Searches')->getState('show_results', 1, 'int') === 0) - { - $this->setRedirect('index.php?option=com_search&view=searches&show_results=1'); - } - else - { - $this->setRedirect('index.php?option=com_search&view=searches&show_results=0'); - } - } -} diff --git a/administrator/components/com_search/Helper/SearchHelper.php b/administrator/components/com_search/Helper/SearchHelper.php deleted file mode 100644 index a1f47055312d6..0000000000000 --- a/administrator/components/com_search/Helper/SearchHelper.php +++ /dev/null @@ -1,276 +0,0 @@ -getTag(); - $search_ignore = $lang->getIgnoredSearchWords(); - $ignored = false; - - // Deprecated in 1.6 use $lang->getIgnoredSearchWords instead. - $ignoreFile = LanguageHelper::getLanguagePath() . '/' . $tag . '/' . $tag . '.ignore.php'; - - if (file_exists($ignoreFile)) - { - include $ignoreFile; - } - - // Check for words to ignore. - $aterms = explode(' ', StringHelper::strtolower($searchword)); - - // First case is single ignored word. - if (count($aterms) == 1 && in_array(StringHelper::strtolower($searchword), $search_ignore)) - { - $ignored = true; - } - - // Filter out search terms that are too small. - $lower_limit = $lang->getLowerLimitSearchWord(); - - foreach ($aterms as $aterm) - { - if (StringHelper::strlen($aterm) < $lower_limit) - { - $search_ignore[] = $aterm; - } - } - - // Next is to remove ignored words from type 'all' or 'any' (not exact) searches with multiple words. - if (count($aterms) > 1 && $searchphrase != 'exact') - { - $pruned = array_diff($aterms, $search_ignore); - $searchword = implode(' ', $pruned); - } - - return $ignored; - } - - /** - * Does search word need to be limited? - * - * @param string &$searchword Search word to be checked. - * - * @return boolean True if search word should be limited; false otherwise. - * - * @since 1.5 - */ - public static function limitSearchWord(&$searchword) - { - $restriction = false; - - $lang = Factory::getLanguage(); - - // Limit searchword to a maximum of characters. - $upper_limit = $lang->getUpperLimitSearchWord(); - - if (StringHelper::strlen($searchword) > $upper_limit) - { - $searchword = StringHelper::substr($searchword, 0, $upper_limit - 1); - $restriction = true; - } - - // Searchword must contain a minimum of characters. - if ($searchword && StringHelper::strlen($searchword) < $lang->getLowerLimitSearchWord()) - { - $searchword = ''; - $restriction = true; - } - - return $restriction; - } - - /** - * Prepares results from search for display. - * - * @param string $text The source string. - * @param string $searchword The searchword to select around. - * - * @return string - * - * @since 1.5 - */ - public static function prepareSearchContent($text, $searchword) - { - // Strips tags won't remove the actual jscript. - $text = preg_replace("']*>.*?'si", '', $text); - $text = preg_replace('/{.+?}/', '', $text); - - // $text = preg_replace('/]*>([^<]+)<\/a>/is','\2', $text); - - // Replace line breaking tags with whitespace. - $text = preg_replace("'<(br[^/>]*?/|hr[^/>]*?/|/(div|h[1-6]|li|p|td))>'si", ' ', $text); - - return self::_smartSubstr(strip_tags($text), $searchword); - } - - /** - * Checks an object for search terms (after stripping fields of HTML). - * - * @param object $object The object to check. - * @param string $searchTerm Search words to check for. - * @param array $fields List of object variables to check against. - * - * @return boolean True if searchTerm is in object, false otherwise. - */ - public static function checkNoHtml($object, $searchTerm, $fields) - { - $searchRegex = array( - '#]*>.*?#si', - '#]*>.*?#si', - '##si', - '#<[^>]*>#i' - ); - $terms = explode(' ', $searchTerm); - - if (empty($fields)) - { - return false; - } - - foreach ($fields as $field) - { - if (!isset($object->$field)) - { - continue; - } - - $text = self::remove_accents($object->$field); - - foreach ($searchRegex as $regex) - { - $text = preg_replace($regex, '', $text); - } - - foreach ($terms as $term) - { - $term = self::remove_accents($term); - - if (StringHelper::stristr($text, $term) !== false) - { - return true; - } - } - } - - return false; - } - - /** - * Transliterates given text to ASCII. - * - * @param string $str String to remove accents from. - * - * @return string - * - * @since 3.2 - */ - public static function remove_accents($str) - { - $str = Transliterate::utf8_latin_to_ascii($str); - - // @TODO: remove other prefixes as well? - return preg_replace("/[\"'^]([a-z])/ui", '\1', $str); - } - - /** - * Returns substring of characters around a searchword. - * - * @param string $text The source string. - * @param integer $searchword Number of chars to return. - * - * @return string - * - * @since 1.5 - */ - public static function _smartSubstr($text, $searchword) - { - $lang = Factory::getLanguage(); - $length = $lang->getSearchDisplayedCharactersNumber(); - $ltext = self::remove_accents($text); - $textlen = StringHelper::strlen($ltext); - $lsearchword = StringHelper::strtolower(self::remove_accents($searchword)); - $wordfound = false; - $pos = 0; - - while ($wordfound === false && $pos < $textlen) - { - if (($wordpos = @StringHelper::strpos($ltext, ' ', $pos + $length)) !== false) - { - $chunk_size = $wordpos - $pos; - } - else - { - $chunk_size = $length; - } - - $chunk = StringHelper::substr($ltext, $pos, $chunk_size); - $wordfound = StringHelper::strpos(StringHelper::strtolower($chunk), $lsearchword); - - if ($wordfound === false) - { - $pos += $chunk_size + 1; - } - } - - if ($wordfound !== false) - { - return (($pos > 0) ? '... ' : '') . StringHelper::substr($text, $pos, $chunk_size) . ' ...'; - } - else - { - if (($wordpos = @StringHelper::strpos($text, ' ', $length)) !== false) - { - return StringHelper::substr($text, 0, $wordpos) . ' ...'; - } - else - { - return StringHelper::substr($text, 0, $length); - } - } - } -} diff --git a/administrator/components/com_search/Model/SearchesModel.php b/administrator/components/com_search/Model/SearchesModel.php deleted file mode 100644 index 69d8c8408b8ac..0000000000000 --- a/administrator/components/com_search/Model/SearchesModel.php +++ /dev/null @@ -1,191 +0,0 @@ -setState('show_results', $this->getUserStateFromRequest($this->context . '.show_results', 'show_results', 1, 'int')); - - // Load the parameters. - $params = ComponentHelper::getParams('com_search'); - $this->setState('params', $params); - - // List state information. - parent::populateState($ordering, $direction); - } - - /** - * 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. - * - * @return string A store id. - * - * @since 1.6 - */ - protected function getStoreId($id = '') - { - // Compile the store id. - $id .= ':' . $this->getState('show_results'); - $id .= ':' . $this->getState('filter.search'); - - return parent::getStoreId($id); - } - - /** - * Build an SQL query to load the list data. - * - * @return \JDatabaseQuery - * - * @since 1.6 - */ - protected function getListQuery() - { - // Create a new query object. - $db = $this->getDbo(); - $query = $db->getQuery(true); - - // Select the required fields from the table. - $query->select( - $this->getState( - 'list.select', - 'a.*' - ) - ); - $query->from($db->quoteName('#__core_log_searches', 'a')); - - // Filter by search in title - if ($search = $this->getState('filter.search')) - { - $search = $db->quote('%' . str_replace(' ', '%', $db->escape(trim($search), true) . '%')); - $query->where($db->quoteName('a.search_term') . ' LIKE ' . $search); - } - - // Add the list ordering clause. - $query->order($db->escape($this->getState('list.ordering', 'a.hits')) . ' ' . $db->escape($this->getState('list.direction', 'ASC'))); - - return $query; - } - - /** - * Override the parent getItems to inject optional data. - * - * @return mixed An array of objects on success, false on failure. - * - * @since 1.6 - */ - public function getItems() - { - $items = parent::getItems(); - - // Determine if number of results for search item should be calculated - // by default it is `off` as it is highly query intensive - if ($this->getState('show_results')) - { - PluginHelper::importPlugin('search'); - $app = Factory::getApplication(); - - foreach ($items as &$item) - { - $results = $app->triggerEvent('onContentSearch', array($item->search_term)); - $item->returns = 0; - - foreach ($results as $result) - { - $item->returns += count($result); - } - } - } - - return $items; - } - - /** - * Method to reset the search log table. - * - * @return boolean - * - * @since 1.6 - */ - public function reset() - { - $db = $this->getDbo(); - $query = $db->getQuery(true) - ->delete($db->quoteName('#__core_log_searches')); - $db->setQuery($query); - - try - { - $db->execute(); - } - catch (\RuntimeException $e) - { - $this->setError($e->getMessage()); - - return false; - } - - return true; - } -} diff --git a/administrator/components/com_search/View/Searches/HtmlView.php b/administrator/components/com_search/View/Searches/HtmlView.php deleted file mode 100644 index a2e0988a98acf..0000000000000 --- a/administrator/components/com_search/View/Searches/HtmlView.php +++ /dev/null @@ -1,157 +0,0 @@ -items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->filterForm = $this->get('FilterForm'); - $this->activeFilters = $this->get('ActiveFilters'); - $this->enabled = $this->state->params->get('enabled'); - $this->canDo = ContentHelper::getActions('com_search'); - - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - throw new GenericDataException(implode("\n", $errors), 500); - } - - // Check if plugin is enabled - if ($this->enabled) - { - $app->enqueueMessage(Text::_('COM_SEARCH_LOGGING_ENABLED'), 'notice'); - } - else - { - $app->enqueueMessage(Text::_('COM_SEARCH_LOGGING_DISABLED'), 'warning'); - } - - $this->addToolbar(); - parent::display($tpl); - } - - /** - * Add the page title and toolbar. - * - * @return void - * - * @since 1.6 - */ - protected function addToolbar() - { - $canDo = $this->canDo; - - ToolbarHelper::title(Text::_('COM_SEARCH_MANAGER_SEARCHES'), 'search'); - - $showResults = $this->state->get('show_results', 1, 'int'); - - if ($showResults === 0) - { - ToolbarHelper::custom('searches.toggleresults', 'zoom-in.png', null, 'COM_SEARCH_SHOW_SEARCH_RESULTS', false); - } - else - { - ToolbarHelper::custom('searches.toggleresults', 'zoom-out.png', null, 'COM_SEARCH_HIDE_SEARCH_RESULTS', false); - } - - if ($canDo->get('core.edit.state')) - { - ToolbarHelper::custom('searches.reset', 'refresh.png', 'refresh_f2.png', 'JSEARCH_RESET', false); - } - - ToolbarHelper::divider(); - - if ($canDo->get('core.admin') || $canDo->get('core.options')) - { - ToolbarHelper::preferences('com_search'); - } - - ToolbarHelper::divider(); - ToolbarHelper::help('JHELP_COMPONENTS_SEARCH'); - } -} diff --git a/administrator/components/com_search/access.xml b/administrator/components/com_search/access.xml deleted file mode 100644 index fe5ce1c7837cd..0000000000000 --- a/administrator/components/com_search/access.xml +++ /dev/null @@ -1,9 +0,0 @@ - - -
- - - - -
-
diff --git a/administrator/components/com_search/config.xml b/administrator/components/com_search/config.xml deleted file mode 100644 index 1fdbcca72c1a5..0000000000000 --- a/administrator/components/com_search/config.xml +++ /dev/null @@ -1,83 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - -
-
diff --git a/administrator/components/com_search/forms/filter_searches.xml b/administrator/components/com_search/forms/filter_searches.xml deleted file mode 100644 index 28afb72e392f7..0000000000000 --- a/administrator/components/com_search/forms/filter_searches.xml +++ /dev/null @@ -1,34 +0,0 @@ - -
- - - - - - - - - - - - - -
diff --git a/administrator/components/com_search/helpers/search.php b/administrator/components/com_search/helpers/search.php deleted file mode 100644 index 8b74a51cbdd4b..0000000000000 --- a/administrator/components/com_search/helpers/search.php +++ /dev/null @@ -1,22 +0,0 @@ - - - com_search - Joomla! Project - April 2006 - (C) 2005 - 2019 Open Source Matters. All rights reserved. - GNU General Public License version 2 or later; see LICENSE.txt - admin@joomla.org - www.joomla.org - 4.0.0 - COM_SEARCH_XML_DESCRIPTION - Joomla\Component\Search - - router.php - Controller - Model - tmpl - View - - - language/en-GB.com_search.ini - - - Search - - access.xml - config.xml - search.xml - Controller - forms - Helper - helpers - Model - services - tmpl - View - views - - - language/en-GB.com_search.ini - language/en-GB.com_search.sys.ini - - - diff --git a/administrator/components/com_search/services/provider.php b/administrator/components/com_search/services/provider.php deleted file mode 100644 index d1c394fdeecf3..0000000000000 --- a/administrator/components/com_search/services/provider.php +++ /dev/null @@ -1,52 +0,0 @@ -registerServiceProvider(new MVCFactory('\\Joomla\\Component\\Search')); - $container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Search')); - $container->set( - ComponentInterface::class, - function (Container $container) - { - $component = new MVCComponent($container->get(ComponentDispatcherFactoryInterface::class)); - $component->setMVCFactory($container->get(MVCFactoryInterface::class)); - - return $component; - } - ); - } -}; diff --git a/administrator/components/com_search/tmpl/searches/default.php b/administrator/components/com_search/tmpl/searches/default.php deleted file mode 100644 index d3f7b47d89c60..0000000000000 --- a/administrator/components/com_search/tmpl/searches/default.php +++ /dev/null @@ -1,81 +0,0 @@ -escape($this->state->get('list.ordering')); -$listDirn = $this->escape($this->state->get('list.direction')); -?> -
-
- $this, 'options' => array('filterButton' => false))); ?> - items)) : ?> -
- - -
- - - - - - - - - - - - items as $i => $item) : ?> - - - - state->get('show_results')) : ?> - - - - - - - -
- , -
- - - - - -
- escape($item->search_term); ?> - - hits; ?> - - - returns; ?> - - -
- - - pagination->getListFooter(); ?> - - - - - -
-
diff --git a/administrator/components/com_search/views/searches/tmpl/default.xml b/administrator/components/com_search/views/searches/tmpl/default.xml deleted file mode 100644 index ff4f089e29582..0000000000000 --- a/administrator/components/com_search/views/searches/tmpl/default.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/administrator/language/en-GB/en-GB.com_search.ini b/administrator/language/en-GB/en-GB.com_search.ini deleted file mode 100644 index fa6bf247ecd38..0000000000000 --- a/administrator/language/en-GB/en-GB.com_search.ini +++ /dev/null @@ -1,39 +0,0 @@ -; Joomla! Project -; Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved. -; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php -; Note : All ini files need to be saved as UTF-8 - -COM_SEARCH="Search" -COM_SEARCH_ALL_WORDS="All Words" -COM_SEARCH_ALPHABETICAL="Alphabetical" -COM_SEARCH_ANY_WORDS="Any Words" -COM_SEARCH_CONFIG_FIELD_CREATED_DATE_LABEL="Created Date" -COM_SEARCH_CONFIG_GATHER_SEARCH_STATISTICS_LABEL="Gather Search Statistics" -COM_SEARCH_CONFIG_FIELD_OPENSEARCH_NAME_LABEL="OpenSearch Name" -COM_SEARCH_CONFIG_FIELD_OPENSEARCH_DESCRIPTON_LABEL="OpenSearch Description" -COM_SEARCH_CONFIGURATION="Search: Options" -COM_SEARCH_EXACT_PHRASE="Exact phrase" -COM_SEARCH_FIELD_LABEL="Search Term (Optional)" -COM_SEARCH_FIELD_SEARCH_PHRASES_LABEL="Use Search Options" -COM_SEARCH_FIELD_SEARCH_AREAS_LABEL="Use Search Areas" -COM_SEARCH_FIELDSET_OPTIONAL_LABEL="Optional Search Term" -COM_SEARCH_FIELDSET_SEARCH_OPTIONS_LABEL="Search" -COM_SEARCH_FOR_LABEL="Search For" -COM_SEARCH_HEADING_PHRASE="Search Phrase" -COM_SEARCH_HEADING_SEARCH_TERM_ASC="Search Phrase ascending" -COM_SEARCH_HEADING_SEARCH_TERM_DESC="Search Phrase descending" -COM_SEARCH_HEADING_RESULTS="Results" -COM_SEARCH_HIDE_SEARCH_RESULTS="Hide Search Results" -COM_SEARCH_LOGGING_DISABLED="Gathering statistics disabled. Enable it in the Options." -COM_SEARCH_LOGGING_ENABLED="Gathering statistics enabled" -COM_SEARCH_MANAGER_SEARCHES="Search Term Analysis" -COM_SEARCH_MOST_POPULAR="Popularity" -COM_SEARCH_NEWEST_FIRST="Newest First" -COM_SEARCH_NO_RESULTS="Off" -COM_SEARCH_OLDEST_FIRST="Oldest First" -COM_SEARCH_ORDERING_LABEL="Results Ordering" -COM_SEARCH_SAVED_SEARCH_OPTIONS="Default Search Options" -COM_SEARCH_SEARCH_IN_PHRASE="Search in phrases." -COM_SEARCH_SHOW_SEARCH_RESULTS="Show Search Results" -COM_SEARCH_TABLE_CAPTION="Table of Search Results" -COM_SEARCH_XML_DESCRIPTION="Component for search functions." diff --git a/administrator/language/en-GB/en-GB.com_search.sys.ini b/administrator/language/en-GB/en-GB.com_search.sys.ini deleted file mode 100644 index 0d5b533644f41..0000000000000 --- a/administrator/language/en-GB/en-GB.com_search.sys.ini +++ /dev/null @@ -1,10 +0,0 @@ -; Joomla! Project -; Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved. -; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php -; Note : All ini files need to be saved as UTF-8 - -COM_SEARCH="Search" -COM_SEARCH_SEARCH_VIEW_DEFAULT_DESC="Display search results." -COM_SEARCH_SEARCH_VIEW_DEFAULT_OPTION="Default" -COM_SEARCH_SEARCH_VIEW_DEFAULT_TITLE="Search Form or Search Results" -COM_SEARCH_XML_DESCRIPTION="Component for search functions." diff --git a/administrator/language/en-GB/en-GB.ini b/administrator/language/en-GB/en-GB.ini index a603c104a782e..4039a5e33bb2a 100644 --- a/administrator/language/en-GB/en-GB.ini +++ b/administrator/language/en-GB/en-GB.ini @@ -676,7 +676,6 @@ JHELP_COMPONENTS_COM_PLUGINS_OPTIONS="Components_Plugin_Manager_Options" JHELP_COMPONENTS_COM_PRIVACY_OPTIONS="Components_Privacy_Options" JHELP_COMPONENTS_COM_POSTINSTALL_OPTIONS="Components_Post_installation_Messages_Configuration" JHELP_COMPONENTS_COM_REDIRECT_OPTIONS="Components_Redirect_Manager_Options" -JHELP_COMPONENTS_COM_SEARCH_OPTIONS="Components_Search_Manager_Options" JHELP_COMPONENTS_COM_TAGS_OPTIONS="Components_Tags_Manager_Options" JHELP_COMPONENTS_COM_TEMPLATES_OPTIONS="Components_Template_Manager_Options" JHELP_COMPONENTS_COM_USERS_OPTIONS="Components_Users_Configuration" diff --git a/administrator/language/en-GB/en-GB.plg_search_categories.ini b/administrator/language/en-GB/en-GB.plg_search_categories.ini deleted file mode 100644 index df48c6d533374..0000000000000 --- a/administrator/language/en-GB/en-GB.plg_search_categories.ini +++ /dev/null @@ -1,9 +0,0 @@ -; Joomla! Project -; Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved. -; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php -; Note : All ini files need to be saved as UTF-8 - - -PLG_SEARCH_CATEGORIES_CATEGORIES="Categories" -PLG_SEARCH_CATEGORIES="Search - Categories" -PLG_SEARCH_CATEGORIES_XML_DESCRIPTION="Enables searching of Category information." \ No newline at end of file diff --git a/administrator/language/en-GB/en-GB.plg_search_categories.sys.ini b/administrator/language/en-GB/en-GB.plg_search_categories.sys.ini deleted file mode 100644 index ddca881322303..0000000000000 --- a/administrator/language/en-GB/en-GB.plg_search_categories.sys.ini +++ /dev/null @@ -1,7 +0,0 @@ -; Joomla! Project -; Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved. -; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php -; Note : All ini files need to be saved as UTF-8 - -PLG_SEARCH_CATEGORIES="Search - Categories" -PLG_SEARCH_CATEGORIES_XML_DESCRIPTION="Enables searching of Category information." \ No newline at end of file diff --git a/administrator/language/en-GB/en-GB.plg_search_contacts.ini b/administrator/language/en-GB/en-GB.plg_search_contacts.ini deleted file mode 100644 index f0b3fc96c1102..0000000000000 --- a/administrator/language/en-GB/en-GB.plg_search_contacts.ini +++ /dev/null @@ -1,8 +0,0 @@ -; Joomla! Project -; Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved. -; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php -; Note : All ini files need to be saved as UTF-8 - -PLG_SEARCH_CONTACTS="Search - Contacts" -PLG_SEARCH_CONTACTS_CONTACTS="Contacts" -PLG_SEARCH_CONTACTS_XML_DESCRIPTION="Enables searching of the Contact Component." \ No newline at end of file diff --git a/administrator/language/en-GB/en-GB.plg_search_contacts.sys.ini b/administrator/language/en-GB/en-GB.plg_search_contacts.sys.ini deleted file mode 100644 index 31dd829c98f63..0000000000000 --- a/administrator/language/en-GB/en-GB.plg_search_contacts.sys.ini +++ /dev/null @@ -1,7 +0,0 @@ -; Joomla! Project -; Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved. -; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php -; Note : All ini files need to be saved as UTF-8 - -PLG_SEARCH_CONTACTS="Search - Contacts" -PLG_SEARCH_CONTACTS_XML_DESCRIPTION="Enables searching of the Contact Component." \ No newline at end of file diff --git a/administrator/language/en-GB/en-GB.plg_search_content.ini b/administrator/language/en-GB/en-GB.plg_search_content.ini deleted file mode 100644 index a3245eaf7f783..0000000000000 --- a/administrator/language/en-GB/en-GB.plg_search_content.ini +++ /dev/null @@ -1,10 +0,0 @@ -; Joomla! Project -; Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved. -; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php -; Note : All ini files need to be saved as UTF-8 - -PLG_SEARCH_CONTENT="Search - Content" -PLG_SEARCH_CONTENT_FIELD_ARCHIVED_LABEL="Archived Articles" -PLG_SEARCH_CONTENT_FIELD_CONTENT_LABEL="Articles" -PLG_SEARCH_CONTENT_FIELD_SEARCHLIMIT_LABEL="Search Limit" -PLG_SEARCH_CONTENT_XML_DESCRIPTION="Enables searching in Articles." \ No newline at end of file diff --git a/administrator/language/en-GB/en-GB.plg_search_content.sys.ini b/administrator/language/en-GB/en-GB.plg_search_content.sys.ini deleted file mode 100644 index 909d79dc4b5d7..0000000000000 --- a/administrator/language/en-GB/en-GB.plg_search_content.sys.ini +++ /dev/null @@ -1,7 +0,0 @@ -; Joomla! Project -; Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved. -; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php -; Note : All ini files need to be saved as UTF-8 - -PLG_SEARCH_CONTENT="Search - Content" -PLG_SEARCH_CONTENT_XML_DESCRIPTION="Enables searching in Articles." \ No newline at end of file diff --git a/administrator/language/en-GB/en-GB.plg_search_newsfeeds.ini b/administrator/language/en-GB/en-GB.plg_search_newsfeeds.ini deleted file mode 100644 index 6317868306412..0000000000000 --- a/administrator/language/en-GB/en-GB.plg_search_newsfeeds.ini +++ /dev/null @@ -1,8 +0,0 @@ -; Joomla! Project -; Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved. -; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php -; Note : All ini files need to be saved as UTF-8 - -PLG_SEARCH_NEWSFEEDS="Search - News Feeds" -PLG_SEARCH_NEWSFEEDS_NEWSFEEDS="News Feeds" -PLG_SEARCH_NEWSFEEDS_XML_DESCRIPTION="Enables searching of News feeds." diff --git a/administrator/language/en-GB/en-GB.plg_search_newsfeeds.sys.ini b/administrator/language/en-GB/en-GB.plg_search_newsfeeds.sys.ini deleted file mode 100644 index 6339324881ef8..0000000000000 --- a/administrator/language/en-GB/en-GB.plg_search_newsfeeds.sys.ini +++ /dev/null @@ -1,8 +0,0 @@ -; Joomla! Project -; Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved. -; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php -; Note : All ini files need to be saved as UTF-8 - -PLG_SEARCH_NEWSFEEDS="Search - News Feeds" -PLG_SEARCH_NEWSFEEDS_XML_DESCRIPTION="Enables searching of news feeds." - diff --git a/administrator/language/en-GB/en-GB.plg_search_tags.ini b/administrator/language/en-GB/en-GB.plg_search_tags.ini deleted file mode 100644 index 30b7120073468..0000000000000 --- a/administrator/language/en-GB/en-GB.plg_search_tags.ini +++ /dev/null @@ -1,10 +0,0 @@ -; Joomla! Project -; Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved. -; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php -; Note : All ini files need to be saved as UTF-8 - -PLG_SEARCH_TAGS="Search - Tags" -PLG_SEARCH_TAGS_FIELD_SHOW_TAGGED_ITEMS_LABEL="Tagged Items" -PLG_SEARCH_TAGS_ITEM_TAGGED_WITH="%s tagged with: %s" -PLG_SEARCH_TAGS_TAGS="Tags" -PLG_SEARCH_TAGS_XML_DESCRIPTION="Enables searching in Tags." diff --git a/administrator/language/en-GB/en-GB.plg_search_tags.sys.ini b/administrator/language/en-GB/en-GB.plg_search_tags.sys.ini deleted file mode 100644 index b5736fc620bc3..0000000000000 --- a/administrator/language/en-GB/en-GB.plg_search_tags.sys.ini +++ /dev/null @@ -1,7 +0,0 @@ -; Joomla! Project -; Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved. -; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php -; Note : All ini files need to be saved as UTF-8 - -PLG_SEARCH_TAGS="Search - Tags" -PLG_SEARCH_TAGS_XML_DESCRIPTION="Enables searching in Tags." diff --git a/components/com_search/Controller/DisplayController.php b/components/com_search/Controller/DisplayController.php deleted file mode 100644 index 6b9c6b843ff92..0000000000000 --- a/components/com_search/Controller/DisplayController.php +++ /dev/null @@ -1,114 +0,0 @@ -input->set('view', 'search'); - - return parent::display($cachable, $urlparams); - } - - /** - * Search - * - * @return void - * - * @throws \Exception - */ - public function search() - { - // Slashes cause errors, <> get stripped anyway later on. # causes problems. - $badchars = array('#', '>', '<', '\\'); - $searchword = trim(str_replace($badchars, '', $this->input->post->getString('searchword'))); - - // If searchword enclosed in double quotes, strip quotes and do exact match - if (substr($searchword, 0, 1) === '"' && substr($searchword, -1) === '"') - { - $post['searchword'] = substr($searchword, 1, -1); - $this->input->set('searchphrase', 'exact'); - } - else - { - $post['searchword'] = $searchword; - } - - $post['ordering'] = $this->input->post->getWord('ordering'); - $post['searchphrase'] = $this->input->post->getWord('searchphrase', 'all'); - $post['limit'] = $this->input->post->getUInt('limit'); - - if ($post['limit'] === null) - { - unset($post['limit']); - } - - $areas = $this->input->post->get('areas', null, 'array'); - - if ($areas) - { - foreach ($areas as $area) - { - $post['areas'][] = \JFilterInput::getInstance()->clean($area, 'cmd'); - } - } - - // The Itemid from the request, we will use this if it's a search page or if there is no search page available - $post['Itemid'] = $this->input->getInt('Itemid'); - - // Set Itemid id for links from menu - $menu = $this->app->getMenu(); - $item = $menu->getItem($post['Itemid']); - - // The requested Item is not a search page so we need to find one - if ($item && ($item->component !== 'com_search' || $item->query['view'] !== 'search')) - { - // Get item based on component, not link. link is not reliable. - $item = $menu->getItems('component', 'com_search', true); - - // If we found a search page, use that. - if (!empty($item)) - { - $post['Itemid'] = $item->id; - } - } - - unset($post['task'], $post['submit']); - - $uri = Uri::getInstance(); - $uri->setQuery($post); - $uri->setVar('option', 'com_search'); - - $this->setRedirect(Route::_('index.php' . $uri->toString(array('query', 'fragment')), false)); - } -} diff --git a/components/com_search/Model/SearchModel.php b/components/com_search/Model/SearchModel.php deleted file mode 100644 index 7827c566a1e0b..0000000000000 --- a/components/com_search/Model/SearchModel.php +++ /dev/null @@ -1,249 +0,0 @@ -setState('limit', $app->getUserStateFromRequest('com_search.limit', 'limit', $app->get('list_limit'), 'uint')); - $this->setState('limitstart', $app->input->get('limitstart', 0, 'uint')); - - // Get parameters. - $params = $app->getParams(); - - if ($params->get('searchphrase') == 1) - { - $searchphrase = 'any'; - } - elseif ($params->get('searchphrase') == 2) - { - $searchphrase = 'exact'; - } - else - { - $searchphrase = 'all'; - } - - // Set the search parameters - $keyword = urldecode($app->input->getString('searchword')); - $match = $app->input->get('searchphrase', $searchphrase, 'word'); - $ordering = $app->input->get('ordering', $params->get('ordering', 'newest'), 'word'); - $this->setSearch($keyword, $match, $ordering); - - // Set the search areas - $areas = $app->input->get('areas', null, 'array'); - $this->setAreas($areas); - } - - /** - * Method to set the search parameters - * - * @param string $keyword string search string - * @param string $match matching option, exact|any|all - * @param string $ordering option, newest|oldest|popular|alpha|category - * - * @access public - * - * @return void - */ - public function setSearch($keyword, $match = 'all', $ordering = 'newest') - { - if (isset($keyword)) - { - $this->setState('origkeyword', $keyword); - - if ($match !== 'exact') - { - $keyword = preg_replace('#\xE3\x80\x80#', ' ', $keyword); - } - - $this->setState('keyword', $keyword); - } - - if (isset($match)) - { - $this->setState('match', $match); - } - - if (isset($ordering)) - { - $this->setState('ordering', $ordering); - } - } - - /** - * Method to get search results for a given query - * - * @access public - * @return array - */ - public function getData() - { - // Lets load the content if it doesn't already exist - if (empty($this->_data)) - { - $areas = $this->getAreas(); - - PluginHelper::importPlugin('search'); - $results = Factory::getApplication()->triggerEvent('onContentSearch', array( - $this->getState('keyword'), - $this->getState('match'), - $this->getState('ordering'), - $areas['active']) - ); - - $rows = array(); - - foreach ($results as $result) - { - $rows = array_merge((array) $rows, (array) $result); - } - - $this->_total = count($rows); - - if ($this->getState('limit') > 0) - { - $this->_data = array_splice($rows, $this->getState('limitstart'), $this->getState('limit')); - } - else - { - $this->_data = $rows; - } - } - - return $this->_data; - } - - /** - * Method to get the total number of weblink items for the category - * - * @access public - * - * @return integer - */ - public function getTotal() - { - return $this->_total; - } - - /** - * Method to set the search areas - * - * @param array $active areas - * @param array $search areas - * - * @return void - * - * @access public - */ - public function setAreas($active = array(), $search = array()) - { - $this->_areas['active'] = $active; - $this->_areas['search'] = $search; - } - - /** - * Method to get a pagination object of the weblink items for the category - * - * @return Pagination - */ - public function getPagination() - { - // Lets load the content if it doesn't already exist - if (empty($this->_pagination)) - { - $this->_pagination = new Pagination($this->getTotal(), $this->getState('limitstart'), $this->getState('limit')); - } - - return $this->_pagination; - } - - /** - * Method to get the search areas - * - * @return integer - * - * @since 1.5 - */ - public function getAreas() - { - // Load the Category data - if (empty($this->_areas['search'])) - { - $areas = array(); - - PluginHelper::importPlugin('search'); - $searchareas = Factory::getApplication()->triggerEvent('onContentSearchAreas'); - - foreach ($searchareas as $area) - { - if (is_array($area)) - { - $areas = array_merge($areas, $area); - } - } - - $this->_areas['search'] = $areas; - } - - return $this->_areas; - } -} diff --git a/components/com_search/View/Search/HtmlView.php b/components/com_search/View/Search/HtmlView.php deleted file mode 100644 index 70cc2c9a09ddf..0000000000000 --- a/components/com_search/View/Search/HtmlView.php +++ /dev/null @@ -1,423 +0,0 @@ -get('areas'); - $state = $this->get('state'); - $searchWord = $state->get('keyword'); - $params = $app->getParams(); - - $menu = $app->getMenu()->getActive(); - - if (!$menu) - { - $params->set('page_title', Text::_('COM_SEARCH_SEARCH')); - } - - $title = $params->get('page_title'); - - if ($app->get('sitename_pagetitles', 0) == 1) - { - $title = Text::sprintf('JPAGETITLE', $app->get('sitename'), $title); - } - elseif ($app->get('sitename_pagetitles', 0) == 2) - { - $title = Text::sprintf('JPAGETITLE', $title, $app->get('sitename')); - } - - $this->document->setTitle($title); - - if ($params->get('menu-meta_description')) - { - $this->document->setDescription($params->get('menu-meta_description')); - } - - if ($params->get('menu-meta_keywords')) - { - $this->document->setMetaData('keywords', $params->get('menu-meta_keywords')); - } - - if ($params->get('robots')) - { - $this->document->setMetaData('robots', $params->get('robots')); - } - - // Built select lists - $orders = array(); - $orders[] = HTMLHelper::_('select.option', 'newest', Text::_('COM_SEARCH_NEWEST_FIRST')); - $orders[] = HTMLHelper::_('select.option', 'oldest', Text::_('COM_SEARCH_OLDEST_FIRST')); - $orders[] = HTMLHelper::_('select.option', 'popular', Text::_('COM_SEARCH_MOST_POPULAR')); - $orders[] = HTMLHelper::_('select.option', 'alpha', Text::_('COM_SEARCH_ALPHABETICAL')); - $orders[] = HTMLHelper::_('select.option', 'category', Text::_('JCATEGORY')); - - $lists = array(); - $lists['ordering'] = HTMLHelper::_('select.genericlist', $orders, 'ordering', 'class="custom-select"', 'value', 'text', $state->get('ordering')); - - $searchphrases = array(); - $searchphrases[] = HTMLHelper::_('select.option', 'all', Text::_('COM_SEARCH_ALL_WORDS')); - $searchphrases[] = HTMLHelper::_('select.option', 'any', Text::_('COM_SEARCH_ANY_WORDS')); - $searchphrases[] = HTMLHelper::_('select.option', 'exact', Text::_('COM_SEARCH_EXACT_PHRASE')); - $lists['searchphrase'] = HTMLHelper::_('select.radiolist', $searchphrases, 'searchphrase', '', 'value', 'text', $state->get('match')); - - // Log the search - \Joomla\CMS\Helper\SearchHelper::logSearch($searchWord, 'com_search'); - - // Limit search-word - $lang = Factory::getLanguage(); - $upper_limit = $lang->getUpperLimitSearchWord(); - $lower_limit = $lang->getLowerLimitSearchWord(); - - if (SearchHelper::limitSearchWord($searchWord)) - { - $error = Text::sprintf('COM_SEARCH_ERROR_SEARCH_MESSAGE', $lower_limit, $upper_limit); - } - - // Sanitise search-word - if (SearchHelper::santiseSearchWord($searchWord, $state->get('match'))) - { - $error = Text::_('COM_SEARCH_ERROR_IGNOREKEYWORD'); - } - - if (!$searchWord && !empty($this->input) && count($this->input->post)) - { - // $error = Text::_('COM_SEARCH_ERROR_ENTERKEYWORD'); - } - - // Put the filtered results back into the model - // for next release, the checks should be done in the model perhaps... - $state->set('keyword', $searchWord); - - if ($error === null) - { - $results = $this->get('data'); - $total = $this->get('total'); - $pagination = $this->get('pagination'); - - // Flag indicates to not add limitstart=0 to URL - $pagination->hideEmptyLimitstart = true; - - if ($state->get('match') === 'exact') - { - $searchWords = array($searchWord); - $needle = $searchWord; - } - else - { - $searchWordA = preg_replace('#\xE3\x80\x80#', ' ', $searchWord); - $searchWords = preg_split("/\s+/u", $searchWordA); - $needle = $searchWords[0]; - } - - // Make sure there are no slashes in the needle - $needle = str_replace('/', '\/', $needle); - - for ($i = 0, $count = count($results); $i < $count; ++$i) - { - $rowTitle = &$results[$i]->title; - $rowTitleHighLighted = $this->highLight($rowTitle, $needle, $searchWords); - $rowText = &$results[$i]->text; - $rowTextHighLighted = $this->highLight($rowText, $needle, $searchWords); - - $result = &$results[$i]; - $created = ''; - - if ($result->created) - { - $created = HTMLHelper::_('date', $result->created, Text::_('DATE_FORMAT_LC3')); - } - - $result->title = $rowTitleHighLighted; - $result->text = HTMLHelper::_('content.prepare', $rowTextHighLighted, '', 'com_search.search'); - $result->created = $created; - $result->count = $i + 1; - } - } - - // Check for layout override - if (isset($menu->query['layout'])) - { - $this->setLayout($menu->query['layout']); - } - - // Escape strings for HTML output - $this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx')); - $this->pagination = &$pagination; - $this->results = &$results; - $this->lists = &$lists; - $this->params = &$params; - $this->ordering = $state->get('ordering'); - $this->searchword = $searchWord; - $this->origkeyword = $state->get('origkeyword'); - $this->searchphrase = $state->get('match'); - $this->searchareas = $areas; - $this->total = $total; - $this->error = $error; - $this->action = $uri; - - parent::display($tpl); - } - - /** - * Method to control the highlighting of keywords - * - * @param string $string text to be searched - * @param string $needle text to search for - * @param array $searchWords words to be searched - * - * @return mixed A string. - * - * @since 3.8.4 - */ - public function highLight($string, $needle, $searchWords) - { - $hl1 = ''; - $hl2 = ''; - $mbString = extension_loaded('mbstring'); - $highlighterLen = strlen($hl1 . $hl2); - - // Doing HTML entity decoding here, just in case we get any HTML entities here. - $quoteStyle = version_compare(PHP_VERSION, '5.4', '>=') ? ENT_NOQUOTES | ENT_HTML401 : ENT_NOQUOTES; - $row = html_entity_decode($string, $quoteStyle, 'UTF-8'); - $row = SearchHelper::prepareSearchContent($row, $needle); - $searchWords = array_values(array_unique($searchWords)); - $lowerCaseRow = $mbString ? mb_strtolower($row) : StringHelper::strtolower($row); - - $transliteratedLowerCaseRow = SearchHelper::remove_accents($lowerCaseRow); - - $posCollector = array(); - - foreach ($searchWords as $highlightWord) - { - $found = false; - - if ($mbString) - { - $lowerCaseHighlightWord = mb_strtolower($highlightWord); - - if (($pos = mb_strpos($lowerCaseRow, $lowerCaseHighlightWord)) !== false) - { - $found = true; - } - elseif (($pos = mb_strpos($transliteratedLowerCaseRow, $lowerCaseHighlightWord)) !== false) - { - $found = true; - } - } - else - { - $lowerCaseHighlightWord = StringHelper::strtolower($highlightWord); - - if (($pos = StringHelper::strpos($lowerCaseRow, $lowerCaseHighlightWord)) !== false) - { - $found = true; - } - elseif (($pos = StringHelper::strpos($transliteratedLowerCaseRow, $lowerCaseHighlightWord)) !== false) - { - $found = true; - } - } - - if ($found === true) - { - // Iconv transliterates '€' to 'EUR' - // TODO: add other expanding translations? - $eur_compensation = $pos > 0 ? substr_count($row, "\xE2\x82\xAC", 0, $pos) * 2 : 0; - $pos -= $eur_compensation; - - // Collect pos and search-word - $posCollector[$pos] = $highlightWord; - } - } - - if (count($posCollector)) - { - // Sort by pos. Easier to handle overlapping highlighter-spans - ksort($posCollector); - $cnt = 0; - $lastHighlighterEnd = -1; - - foreach ($posCollector as $pos => $highlightWord) - { - $pos += $cnt * $highlighterLen; - - /* - * Avoid overlapping/corrupted highlighter-spans - * TODO $chkOverlap could be used to highlight remaining part - * of search-word outside last highlighter-span. - * At the moment no additional highlighter is set. - */ - $chkOverlap = $pos - $lastHighlighterEnd; - - if ($chkOverlap >= 0) - { - // Set highlighter around search-word - if ($mbString) - { - $highlightWordLen = mb_strlen($highlightWord); - $row = mb_substr($row, 0, $pos) . $hl1 . mb_substr($row, $pos, $highlightWordLen) - . $hl2 . mb_substr($row, $pos + $highlightWordLen); - } - else - { - $highlightWordLen = StringHelper::strlen($highlightWord); - $row = StringHelper::substr($row, 0, $pos) - . $hl1 . StringHelper::substr($row, $pos, StringHelper::strlen($highlightWord)) - . $hl2 . StringHelper::substr($row, $pos + StringHelper::strlen($highlightWord)); - } - - $cnt++; - $lastHighlighterEnd = $pos + $highlightWordLen + $highlighterLen; - } - } - } - - return $row; - } -} diff --git a/components/com_search/View/Search/OpensearchView.php b/components/com_search/View/Search/OpensearchView.php deleted file mode 100644 index 9adfd5228c62c..0000000000000 --- a/components/com_search/View/Search/OpensearchView.php +++ /dev/null @@ -1,60 +0,0 @@ -setShortName($params->get('opensearch_name', $app->get('sitename'))); - $doc->setDescription($params->get('opensearch_description', $app->get('MetaDesc'))); - - // Add the URL for the search - $searchUri = Uri::base() . 'index.php?option=com_search&searchword={searchTerms}'; - - // Find the menu item for the search - $items = $app->getMenu()->getItems('link', 'index.php?option=com_search&view=search'); - - if (isset($items[0])) - { - $searchUri .= '&Itemid=' . $items[0]->id; - } - - $htmlSearch = new OpensearchUrl; - $htmlSearch->template = Route::_($searchUri); - $doc->addUrl($htmlSearch); - } -} diff --git a/components/com_search/router.php b/components/com_search/router.php deleted file mode 100644 index 5a050ca1a72da..0000000000000 --- a/components/com_search/router.php +++ /dev/null @@ -1,70 +0,0 @@ - - diff --git a/components/com_search/tmpl/search/default.xml b/components/com_search/tmpl/search/default.xml deleted file mode 100644 index a729aefcf09f6..0000000000000 --- a/components/com_search/tmpl/search/default.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - - -
- - -
-
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
diff --git a/components/com_search/tmpl/search/default_error.php b/components/com_search/tmpl/search/default_error.php deleted file mode 100644 index fad5ece9a7097..0000000000000 --- a/components/com_search/tmpl/search/default_error.php +++ /dev/null @@ -1,17 +0,0 @@ - -error) : ?> -
- escape($this->error); ?> -
- diff --git a/components/com_search/tmpl/search/default_form.php b/components/com_search/tmpl/search/default_form.php deleted file mode 100644 index 05dd55b0c8d5a..0000000000000 --- a/components/com_search/tmpl/search/default_form.php +++ /dev/null @@ -1,87 +0,0 @@ -getUpperLimitSearchWord(); - -?> -
-
-
- -
- -
-
- -
-
- searchword)) : ?> -

- ' . $this->total . ''); ?> -

- -
- params->get('search_phrases', 1)) : ?> -
- - - -
- lists['searchphrase']; ?> -
-
-
- - lists['ordering']; ?> -
-
-
-
- - params->get('search_areas', 1)) : ?> -
-
- - - - searchareas['search'] as $val => $txt) : ?> -
- searchareas['active']) && in_array($val, $this->searchareas['active']) ? 'checked="checked"' : ''; ?> - > - -
- -
-
-
- - total > 0) : ?> -
-
- - pagination->getLimitBox(); ?> -
-
-

pagination->getPagesCounter(); ?>

- -
diff --git a/components/com_search/tmpl/search/default_results.php b/components/com_search/tmpl/search/default_results.php deleted file mode 100644 index 8761a9148b815..0000000000000 --- a/components/com_search/tmpl/search/default_results.php +++ /dev/null @@ -1,51 +0,0 @@ - -
-results as $result) : ?> -
- pagination->limitstart + $result->count . '. '; ?> - href) : ?> - browsernav == 1) : ?> target="_blank"> - title should not be escaped in this case, as it may ?> - - - title; ?> - - - title ?> - title; ?> - -
- section) : ?> -
- - (escape($result->section); ?>) - -
- -
- text; ?> -
- params->get('show_date')) : ?> -
- created); ?> -
- - -
-
- pagination->getPagesLinks(); ?> -
diff --git a/installation/sql/mysql/joomla.sql b/installation/sql/mysql/joomla.sql index c9858b8d4a8cc..c316d02c4c016 100644 --- a/installation/sql/mysql/joomla.sql +++ b/installation/sql/mysql/joomla.sql @@ -52,7 +52,6 @@ INSERT INTO `#__assets` (`id`, `parent_id`, `lft`, `rgt`, `level`, `name`, `titl (19, 1, 95, 98, 1, 'com_newsfeeds', 'com_newsfeeds', '{"core.admin":{"7":1},"core.manage":{"6":1}}'), (20, 1, 99, 100, 1, 'com_plugins', 'com_plugins', '{"core.admin":{"7":1}}'), (21, 1, 101, 102, 1, 'com_redirect', 'com_redirect', '{"core.admin":{"7":1}}'), -(22, 1, 103, 104, 1, 'com_search', 'com_search', '{"core.admin":{"7":1},"core.manage":{"6":1}}'), (23, 1, 105, 106, 1, 'com_templates', 'com_templates', '{"core.admin":{"7":1}}'), (24, 1, 107, 110, 1, 'com_users', 'com_users', '{"core.admin":{"7":1}}'), (26, 1, 113, 114, 1, 'com_wrapper', 'com_wrapper', '{}'), @@ -456,17 +455,6 @@ CREATE TABLE IF NOT EXISTS `#__contentitem_tag_map` ( -- -------------------------------------------------------- --- --- Table structure for table `#__core_log_searches` --- - -CREATE TABLE IF NOT EXISTS `#__core_log_searches` ( - `search_term` varchar(128) NOT NULL DEFAULT '', - `hits` int(10) unsigned NOT NULL DEFAULT 0 -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; - --- -------------------------------------------------------- - -- -- Table structure for table `#__csp` -- @@ -537,7 +525,6 @@ INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, (0, 'com_modules', 'component', 'com_modules', '', 1, 1, 1, 1, '', '', 0, '0000-00-00 00:00:00', 0, 0), (0, 'com_newsfeeds', 'component', 'com_newsfeeds', '', 1, 1, 1, 0, '', '{"newsfeed_layout":"_:default","save_history":"1","history_limit":5,"show_feed_image":"1","show_feed_description":"1","show_item_description":"1","feed_character_count":"0","feed_display_order":"des","float_first":"right","float_second":"right","show_tags":"1","category_layout":"_:default","show_category_title":"1","show_description":"1","show_description_image":"1","maxLevel":"-1","show_empty_categories":"0","show_subcat_desc":"1","show_cat_items":"1","show_cat_tags":"1","show_base_description":"1","maxLevelcat":"-1","show_empty_categories_cat":"0","show_subcat_desc_cat":"1","show_cat_items_cat":"1","filter_field":"1","show_pagination_limit":"1","show_headings":"1","show_articles":"0","show_link":"1","show_pagination":"1","show_pagination_results":"1"}', 0, '0000-00-00 00:00:00', 0, 0), (0, 'com_plugins', 'component', 'com_plugins', '', 1, 1, 1, 1, '', '', 0, '0000-00-00 00:00:00', 0, 0), -(0, 'com_search', 'component', 'com_search', '', 1, 1, 1, 0, '', '{"enabled":"0","search_phrases":"1","search_areas":"1","show_date":"1","opensearch_name":"","opensearch_description":""}', 0, '0000-00-00 00:00:00', 0, 0), (0, 'com_templates', 'component', 'com_templates', '', 1, 1, 1, 1, '', '{"template_positions_display":"0","upload_limit":"10","image_formats":"gif,bmp,jpg,jpeg,png","source_formats":"txt,less,ini,xml,js,php,css,scss,sass,json","font_formats":"woff,ttf,otf","compressed_formats":"zip"}', 0, '0000-00-00 00:00:00', 0, 0), (0, 'com_content', 'component', 'com_content', '', 1, 1, 0, 1, '', '{"article_layout":"_:default","show_title":"1","link_titles":"1","show_intro":"1","show_category":"1","link_category":"1","show_parent_category":"0","link_parent_category":"0","show_author":"1","link_author":"0","show_create_date":"0","show_modify_date":"0","show_publish_date":"1","show_item_navigation":"1","show_vote":"0","show_tags":"1","show_readmore":"1","show_readmore_title":"1","readmore_limit":"100","show_hits":"1","show_noauth":"0","show_publishing_options":"1","show_article_options":"1","save_history":"1","history_limit":10,"show_urls_images_frontend":"0","show_urls_images_backend":"1","targeta":0,"targetb":0,"targetc":0,"float_intro":"left","float_fulltext":"left","category_layout":"_:blog","show_category_title":"0","show_description":"0","show_description_image":"0","maxLevel":"1","show_empty_categories":"0","show_no_articles":"1","show_subcat_desc":"1","show_cat_num_articles":"0","show_base_description":"1","maxLevelcat":"-1","show_empty_categories_cat":"0","show_subcat_desc_cat":"1","show_cat_num_articles_cat":"1","num_leading_articles":"1","num_intro_articles":"4","num_links":"4","show_subcategory_content":"0","show_pagination_limit":"1","filter_field":"hide","show_headings":"1","list_show_date":"0","date_format":"","list_show_hits":"1","list_show_author":"1","orderby_pri":"order","orderby_sec":"rdate","order_date":"published","show_pagination":"2","show_pagination_results":"1","show_feed_link":"1","feed_summary":"0"}', 0, '0000-00-00 00:00:00', 0, 0), (0, 'com_config', 'component', 'com_config', '', 1, 1, 0, 1, '', '{"filters":{"1":{"filter_type":"NH","filter_tags":"","filter_attributes":""},"6":{"filter_type":"BL","filter_tags":"","filter_attributes":""},"7":{"filter_type":"BL","filter_tags":"","filter_attributes":""},"2":{"filter_type":"NH","filter_tags":"","filter_attributes":""},"3":{"filter_type":"BL","filter_tags":"","filter_attributes":""},"4":{"filter_type":"BL","filter_tags":"","filter_attributes":""},"5":{"filter_type":"BL","filter_tags":"","filter_attributes":""},"10":{"filter_type":"BL","filter_tags":"","filter_attributes":""},"12":{"filter_type":"BL","filter_tags":"","filter_attributes":""},"8":{"filter_type":"NONE","filter_tags":"","filter_attributes":""}}}', 0, '0000-00-00 00:00:00', 0, 0), @@ -570,7 +557,6 @@ INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, (0, 'mod_articles_news', 'module', 'mod_articles_news', '', 0, 1, 1, 0, '', '', 0, '0000-00-00 00:00:00', 0, 0), (0, 'mod_random_image', 'module', 'mod_random_image', '', 0, 1, 1, 0, '', '', 0, '0000-00-00 00:00:00', 0, 0), (0, 'mod_related_items', 'module', 'mod_related_items', '', 0, 1, 1, 0, '', '', 0, '0000-00-00 00:00:00', 0, 0), -(0, 'mod_search', 'module', 'mod_search', '', 0, 1, 1, 0, '', '', 0, '0000-00-00 00:00:00', 0, 0), (0, 'mod_stats', 'module', 'mod_stats', '', 0, 1, 1, 0, '', '', 0, '0000-00-00 00:00:00', 0, 0), (0, 'mod_syndicate', 'module', 'mod_syndicate', '', 0, 1, 1, 1, '', '', 0, '0000-00-00 00:00:00', 0, 0), (0, 'mod_users_latest', 'module', 'mod_users_latest', '', 0, 1, 1, 0, '', '', 0, '0000-00-00 00:00:00', 0, 0), @@ -614,10 +600,6 @@ INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, (0, 'plg_editors-xtd_image', 'plugin', 'image', 'editors-xtd', 0, 1, 1, 0, '', '', 0, '0000-00-00 00:00:00', 2, 0), (0, 'plg_editors-xtd_pagebreak', 'plugin', 'pagebreak', 'editors-xtd', 0, 1, 1, 0, '', '', 0, '0000-00-00 00:00:00', 3, 0), (0, 'plg_editors-xtd_readmore', 'plugin', 'readmore', 'editors-xtd', 0, 1, 1, 0, '', '', 0, '0000-00-00 00:00:00', 4, 0), -(0, 'plg_search_categories', 'plugin', 'categories', 'search', 0, 1, 1, 0, '', '{"search_limit":"50","search_content":"1","search_archived":"1"}', 0, '0000-00-00 00:00:00', 0, 0), -(0, 'plg_search_contacts', 'plugin', 'contacts', 'search', 0, 1, 1, 0, '', '{"search_limit":"50","search_content":"1","search_archived":"1"}', 0, '0000-00-00 00:00:00', 0, 0), -(0, 'plg_search_content', 'plugin', 'content', 'search', 0, 1, 1, 0, '', '{"search_limit":"50","search_content":"1","search_archived":"1"}', 0, '0000-00-00 00:00:00', 0, 0), -(0, 'plg_search_newsfeeds', 'plugin', 'newsfeeds', 'search', 0, 1, 1, 0, '', '{"search_limit":"50","search_content":"1","search_archived":"1"}', 0, '0000-00-00 00:00:00', 0, 0), (0, 'plg_system_languagefilter', 'plugin', 'languagefilter', 'system', 0, 0, 1, 1, '', '', 0, '0000-00-00 00:00:00', 1, 0), (0, 'plg_system_cache', 'plugin', 'cache', 'system', 0, 0, 1, 1, '', '{"browsercache":"0","cachetime":"15"}', 0, '0000-00-00 00:00:00', 9, 0), (0, 'plg_system_debug', 'plugin', 'debug', 'system', 0, 1, 1, 0, '', '{"profile":"1","queries":"1","memory":"1","language_files":"1","language_strings":"1","strip-first":"1","strip-prefix":"","strip-suffix":""}', 0, '0000-00-00 00:00:00', 4, 0), @@ -645,7 +627,6 @@ INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, (0, 'plg_twofactorauth_totp', 'plugin', 'totp', 'twofactorauth', 0, 0, 1, 0, '', '', 0, '0000-00-00 00:00:00', 0, 0), (0, 'plg_authentication_cookie', 'plugin', 'cookie', 'authentication', 0, 1, 1, 0, '', '', 0, '0000-00-00 00:00:00', 0, 0), (0, 'plg_twofactorauth_yubikey', 'plugin', 'yubikey', 'twofactorauth', 0, 0, 1, 0, '', '', 0, '0000-00-00 00:00:00', 0, 0), -(0, 'plg_search_tags', 'plugin', 'tags', 'search', 0, 1, 1, 0, '', '{"search_limit":"50","show_tagged_items":"1"}', 0, '0000-00-00 00:00:00', 0, 0), (0, 'plg_system_updatenotification', 'plugin', 'updatenotification', 'system', 0, 1, 1, 0, '', '', 0, '0000-00-00 00:00:00', 0, 0), (0, 'plg_editors-xtd_module', 'plugin', 'module', 'editors-xtd', 0, 1, 1, 0, '', '', 0, '0000-00-00 00:00:00', 0, 0), (0, 'plg_system_stats', 'plugin', 'stats', 'system', 0, 1, 1, 0, '', '', 0, '0000-00-00 00:00:00', 0, 0), @@ -1341,8 +1322,6 @@ SELECT 15, 'main', 'com_newsfeeds_categories', 'Categories', '', 'News Feeds/Cat INSERT INTO `#__menu` (`id`, `menutype`, `title`, `alias`, `note`, `path`, `link`, `type`, `published`, `parent_id`, `level`, `component_id`, `checked_out`, `checked_out_time`, `browserNav`, `access`, `img`, `template_style_id`, `params`, `lft`, `rgt`, `home`, `language`, `client_id`) SELECT 16, 'main', 'com_redirect', 'Redirect', '', 'Redirect', 'index.php?option=com_redirect&view=links', 'component', 1, 1, 1, `extension_id`, 0, '0000-00-00 00:00:00', 0, 0, 'class:redirect', 0, '', 27, 28, 0, '*', 1 FROM `#__extensions` WHERE `name` = 'com_Redirect'; INSERT INTO `#__menu` (`id`, `menutype`, `title`, `alias`, `note`, `path`, `link`, `type`, `published`, `parent_id`, `level`, `component_id`, `checked_out`, `checked_out_time`, `browserNav`, `access`, `img`, `template_style_id`, `params`, `lft`, `rgt`, `home`, `language`, `client_id`) -SELECT 17, 'main', 'com_search', 'Basic Search', '', 'Basic Search', 'index.php?option=com_search&view=searches', 'component', 1, 1, 1, `extension_id`, 0, '0000-00-00 00:00:00', 0, 0, 'class:search', 0, '', 29, 30, 0, '*', 1 FROM `#__extensions` WHERE `name` = 'com_search'; -INSERT INTO `#__menu` (`id`, `menutype`, `title`, `alias`, `note`, `path`, `link`, `type`, `published`, `parent_id`, `level`, `component_id`, `checked_out`, `checked_out_time`, `browserNav`, `access`, `img`, `template_style_id`, `params`, `lft`, `rgt`, `home`, `language`, `client_id`) SELECT 18, 'main', 'com_finder', 'Smart Search', '', 'Smart Search', 'index.php?option=com_finder&view=index', 'component', 1, 1, 1, `extension_id`, 0, '0000-00-00 00:00:00', 0, 0, 'class:finder', 0, '', 31, 32, 0, '*', 1 FROM `#__extensions` WHERE `name` = 'com_finder'; INSERT INTO `#__menu` (`id`, `menutype`, `title`, `alias`, `note`, `path`, `link`, `type`, `published`, `parent_id`, `level`, `component_id`, `checked_out`, `checked_out_time`, `browserNav`, `access`, `img`, `template_style_id`, `params`, `lft`, `rgt`, `home`, `language`, `client_id`) SELECT 19, 'main', 'com_joomlaupdate', 'Joomla! Update', '', 'Joomla! Update', 'index.php?option=com_joomlaupdate', 'component', 1, 1, 1, `extension_id`, 0, '0000-00-00 00:00:00', 0, 0, 'class:joomlaupdate', 0, '', 33, 34, 0, '*', 1 FROM `#__extensions` WHERE `name` = 'com_joomlaupdate'; diff --git a/installation/sql/mysql/sample_testing.sql b/installation/sql/mysql/sample_testing.sql index 91730b6c570d4..17a44cd43b6e8 100644 --- a/installation/sql/mysql/sample_testing.sql +++ b/installation/sql/mysql/sample_testing.sql @@ -42,7 +42,6 @@ INSERT INTO `#__assets` (`id`, `parent_id`, `lft`, `rgt`, `level`, `name`, `titl (19, 1, 366, 373, 1, 'com_newsfeeds', 'com_newsfeeds', '{"core.admin":{"7":1},"core.manage":{"6":1}}'), (20, 1, 374, 375, 1, 'com_plugins', 'com_plugins', '{"core.admin":{"7":1}}'), (21, 1, 376, 377, 1, 'com_redirect', 'com_redirect', '{"core.admin":{"7":1}}'), -(22, 1, 378, 379, 1, 'com_search', 'com_search', '{"core.admin":{"7":1},"core.manage":{"6":1}}'), (23, 1, 380, 381, 1, 'com_templates', 'com_templates', '{"core.admin":{"7":1}}'), (24, 1, 382, 385, 1, 'com_users', 'com_users', '{"core.admin":{"7":1}}'), (26, 1, 404, 405, 1, 'com_wrapper', 'com_wrapper', '{}'), @@ -437,7 +436,6 @@ INSERT INTO `#__menu` (`id`, `menutype`, `title`, `alias`, `note`, `path`, `link (14, 'main', 'com_newsfeeds_feeds', 'Feeds', '', 'News Feeds/Feeds', 'index.php?option=com_newsfeeds', 'component', 1, 13, 2, 17, 0, '0000-00-00 00:00:00', 0, 0, 'class:newsfeeds', 0, '', 26, 27, 0, '*', 1), (15, 'main', 'com_newsfeeds_categories', 'Categories', '', 'News Feeds/Categories', 'index.php?option=com_categories&extension=com_newsfeeds', 'component', 1, 13, 2, 6, 0, '0000-00-00 00:00:00', 0, 0, 'class:newsfeeds-cat', 0, '', 28, 29, 0, '*', 1), (16, 'main', 'com_redirect', 'Redirect', '', 'Redirect', 'index.php?option=com_redirect', 'component', 1, 1, 1, 24, 0, '0000-00-00 00:00:00', 0, 0, 'class:redirect', 0, '', 31, 32, 0, '*', 1), -(17, 'main', 'com_search', 'Basic Search', '', 'Basic Search', 'index.php?option=com_search', 'component', 1, 1, 1, 19, 0, '0000-00-00 00:00:00', 0, 0, 'class:search', 0, '', 33, 34, 0, '*', 1), (18, 'main', 'com_finder', 'Smart Search', '', 'Smart Search', 'index.php?option=com_finder', 'component', 1, 1, 1, 27, 0, '0000-00-00 00:00:00', 0, 0, 'class:finder', 0, '', 35, 36, 0, '*', 1), (19, 'main', 'com_joomlaupdate', 'Joomla! Update', '', 'Joomla! Update', 'index.php?option=com_joomlaupdate', 'component', 1, 1, 1, 28, 0, '0000-00-00 00:00:00', 0, 0, 'class:joomlaupdate', 0, '', 37, 38, 0, '*', 1), (20, 'main', 'com_tags', 'Tags', '', 'Tags', 'index.php?option=com_tags', 'component', 1, 1, 1, 29, 0, '0000-00-00 00:00:00', 0, 1, 'class:tags', 0, '', 39, 40, 0, '', 1), @@ -456,7 +454,6 @@ INSERT INTO `#__menu` (`id`, `menutype`, `title`, `alias`, `note`, `path`, `link (252, 'frontendviews', 'News Feed Categories', 'new-feed-categories', '', 'new-feed-categories', 'index.php?option=com_newsfeeds&view=categories&id=0', 'component', 1, 1, 1, 17, 0, '0000-00-00 00:00:00', 0, 1, '', 0, '{"show_base_description":"1","categories_description":"Because this links to the root category the \\"uncategorised\\" category is displayed. ","maxLevel":"-1","show_empty_categories":"1","show_description":"1","show_description_image":"1","show_cat_num_articles":"1","display_num":"","show_headings":"","orderby_pri":"","orderby_sec":"","order_date":"","show_pagination":"","show_noauth":"","show_feed_image":"","show_feed_description":"","show_item_description":"","feed_character_count":"0","show_feed_link":"","feed_summary":"","menu-anchor_title":"","menu-anchor_css":"","menu_image":"","show_page_heading":0,"page_title":"","page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}', 163, 164, 0, '*', 0), (253, 'frontendviews', 'News Feed Category', 'news-feed-category', '', 'news-feed-category', 'index.php?option=com_newsfeeds&view=category&id=17', 'component', 1, 1, 1, 17, 0, '0000-00-00 00:00:00', 0, 1, '', 0, '{"maxLevel":"-1","show_empty_categories":"","show_description":"","show_description_image":"","show_cat_num_articles":"","display_num":"","show_headings":"","orderby_pri":"","orderby_sec":"","order_date":"","show_pagination":"","show_noauth":"","show_feed_image":"","show_feed_description":"","show_item_description":"","feed_character_count":"0","show_feed_link":"","feed_summary":"","menu-anchor_title":"","menu-anchor_css":"","menu_image":"","show_page_heading":0,"page_title":"","page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}', 167, 168, 0, '*', 0), (254, 'frontendviews', 'Single News Feed', 'single-news-feed', '', 'single-news-feed', 'index.php?option=com_newsfeeds&view=newsfeed&id=1', 'component', 1, 1, 1, 17, 0, '0000-00-00 00:00:00', 0, 1, '', 0, '{"show_feed_image":"","show_feed_description":"","show_item_description":"","feed_character_count":"0","menu-anchor_title":"","menu-anchor_css":"","menu_image":"","show_page_heading":0,"page_title":"","page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}', 165, 166, 0, '*', 0), -(255, 'frontendviews', 'Search', 'search', '', 'search', 'index.php?option=com_search&view=search', 'component', 1, 1, 1, 19, 0, '0000-00-00 00:00:00', 0, 1, '', 0, '{"search_areas":"1","show_date":"1","menu-anchor_title":"","menu-anchor_css":"","menu_image":"","show_page_heading":0,"page_title":"","page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}', 185, 186, 0, '*', 0), (256, 'frontendviews', 'Archived Articles', 'archived-articles', '', 'archived-articles', 'index.php?option=com_content&view=archive', 'component', 1, 1, 1, 22, 0, '0000-00-00 00:00:00', 0, 1, '', 0, '{"orderby_sec":"","order_date":"","display_num":"","filter_field":"","show_category":"1","link_category":"1","show_title":"1","link_titles":"1","show_intro":"1","show_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_readmore":"","show_hits":"","menu-anchor_title":"","menu-anchor_css":"","menu_image":"","show_page_heading":0,"page_title":"","page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}', 147, 148, 0, '*', 0), (257, 'frontendviews', 'Single Article', 'single-article', '', 'single-article', 'index.php?option=com_content&view=article&id=6', 'component', 1, 1, 1, 22, 0, '0000-00-00 00:00:00', 0, 1, '', 0, '{"show_noauth":"","show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_hits":"","robots":"","rights":"","menu-anchor_title":"","menu-anchor_css":"","menu_image":"","show_page_heading":0,"page_title":"","page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","secure":0}', 137, 138, 0, '*', 0), (259, 'frontendviews', 'Article Category Blog', 'article-category-blog', '', 'article-category-blog', 'index.php?option=com_content&view=category&layout=blog&id=27', 'component', 1, 1, 1, 22, 0, '0000-00-00 00:00:00', 0, 1, '', 0, '{"maxLevel":"","show_empty_categories":"","show_description":"0","show_description_image":"0","show_category_title":"","show_cat_num_articles":"","num_leading_articles":"1","num_intro_articles":"4","num_links":"4","orderby_pri":"","orderby_sec":"","order_date":"","show_pagination":"2","show_noauth":"","show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_readmore":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_hits":"","show_feed_link":"1","feed_summary":"","menu-anchor_title":"","menu-anchor_css":"","menu_image":"","show_page_heading":0,"page_title":"","page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}', 141, 142, 0, '*', 0), diff --git a/installation/sql/postgresql/joomla.sql b/installation/sql/postgresql/joomla.sql index 9c1ab7a94598e..746a3260107cd 100644 --- a/installation/sql/postgresql/joomla.sql +++ b/installation/sql/postgresql/joomla.sql @@ -56,7 +56,6 @@ INSERT INTO "#__assets" ("id", "parent_id", "lft", "rgt", "level", "name", "titl (19, 1, 95, 98, 1, 'com_newsfeeds', 'com_newsfeeds', '{"core.admin":{"7":1},"core.manage":{"6":1}}'), (20, 1, 99, 100, 1, 'com_plugins', 'com_plugins', '{"core.admin":{"7":1}}'), (21, 1, 101, 102, 1, 'com_redirect', 'com_redirect', '{"core.admin":{"7":1}}'), -(22, 1, 103, 104, 1, 'com_search', 'com_search', '{"core.admin":{"7":1},"core.manage":{"6":1}}'), (23, 1, 105, 106, 1, 'com_templates', 'com_templates', '{"core.admin":{"7":1}}'), (24, 1, 107, 110, 1, 'com_users', 'com_users', '{"core.admin":{"7":1}}'), (26, 1, 113, 114, 1, 'com_wrapper', 'com_wrapper', '{}'), @@ -470,15 +469,6 @@ COMMENT ON COLUMN "#__contentitem_tag_map"."type_id" IS 'PK from the content_typ -- -------------------------------------------------------- --- --- Table structure for table `#__core_log_searches` --- - -CREATE TABLE IF NOT EXISTS "#__core_log_searches" ( - "search_term" varchar(128) DEFAULT '' NOT NULL, - "hits" bigint DEFAULT 0 NOT NULL -); - -- -- Table structure for table `#__csp` -- @@ -548,7 +538,6 @@ INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", (0, 'com_modules', 'component', 'com_modules', '', 1, 1, 1, 1, '', '', 0, '1970-01-01 00:00:00', 0, 0), (0, 'com_newsfeeds', 'component', 'com_newsfeeds', '', 1, 1, 1, 0, '', '{"newsfeed_layout":"_:default","save_history":"1","history_limit":5,"show_feed_image":"1","show_feed_description":"1","show_item_description":"1","feed_character_count":"0","feed_display_order":"des","float_first":"right","float_second":"right","show_tags":"1","category_layout":"_:default","show_category_title":"1","show_description":"1","show_description_image":"1","maxLevel":"-1","show_empty_categories":"0","show_subcat_desc":"1","show_cat_items":"1","show_cat_tags":"1","show_base_description":"1","maxLevelcat":"-1","show_empty_categories_cat":"0","show_subcat_desc_cat":"1","show_cat_items_cat":"1","filter_field":"1","show_pagination_limit":"1","show_headings":"1","show_articles":"0","show_link":"1","show_pagination":"1","show_pagination_results":"1"}', 0, '1970-01-01 00:00:00', 0, 0), (0, 'com_plugins', 'component', 'com_plugins', '', 1, 1, 1, 1, '', '', 0, '1970-01-01 00:00:00', 0, 0), -(0, 'com_search', 'component', 'com_search', '', 1, 1, 1, 0, '', '{"enabled":"0","search_phrases":"1","search_areas":"1","show_date":"1","opensearch_name":"","opensearch_description":""}', 0, '1970-01-01 00:00:00', 0, 0), (0, 'com_templates', 'component', 'com_templates', '', 1, 1, 1, 1, '', '{"template_positions_display":"0","upload_limit":"10","image_formats":"gif,bmp,jpg,jpeg,png","source_formats":"txt,less,ini,xml,js,php,css,scss,sass,json","font_formats":"woff,ttf,otf","compressed_formats":"zip"}', 0, '1970-01-01 00:00:00', 0, 0), (0, 'com_content', 'component', 'com_content', '', 1, 1, 0, 1, '', '{"article_layout":"_:default","show_title":"1","link_titles":"1","show_intro":"1","show_category":"1","link_category":"1","show_parent_category":"0","link_parent_category":"0","show_author":"1","link_author":"0","show_create_date":"0","show_modify_date":"0","show_publish_date":"1","show_item_navigation":"1","show_vote":"0","show_tags":"1","show_readmore":"1","show_readmore_title":"1","readmore_limit":"100","show_hits":"1","show_noauth":"0","show_publishing_options":"1","show_article_options":"1","save_history":"1","history_limit":10,"show_urls_images_frontend":"0","show_urls_images_backend":"1","targeta":0,"targetb":0,"targetc":0,"float_intro":"left","float_fulltext":"left","category_layout":"_:blog","show_category_title":"0","show_description":"0","show_description_image":"0","maxLevel":"1","show_empty_categories":"0","show_no_articles":"1","show_subcat_desc":"1","show_cat_num_articles":"0","show_base_description":"1","maxLevelcat":"-1","show_empty_categories_cat":"0","show_subcat_desc_cat":"1","show_cat_num_articles_cat":"1","num_leading_articles":"1","num_intro_articles":"4","num_links":"4","show_subcategory_content":"0","show_pagination_limit":"1","filter_field":"hide","show_headings":"1","list_show_date":"0","date_format":"","list_show_hits":"1","list_show_author":"1","orderby_pri":"order","orderby_sec":"rdate","order_date":"published","show_pagination":"2","show_pagination_results":"1","show_feed_link":"1","feed_summary":"0"}', 0, '1970-01-01 00:00:00', 0, 0), (0, 'com_config', 'component', 'com_config', '', 1, 1, 0, 1, '', '{"filters":{"1":{"filter_type":"NH","filter_tags":"","filter_attributes":""},"6":{"filter_type":"BL","filter_tags":"","filter_attributes":""},"7":{"filter_type":"BL","filter_tags":"","filter_attributes":""},"2":{"filter_type":"NH","filter_tags":"","filter_attributes":""},"3":{"filter_type":"BL","filter_tags":"","filter_attributes":""},"4":{"filter_type":"BL","filter_tags":"","filter_attributes":""},"5":{"filter_type":"BL","filter_tags":"","filter_attributes":""},"10":{"filter_type":"BL","filter_tags":"","filter_attributes":""},"12":{"filter_type":"BL","filter_tags":"","filter_attributes":""},"8":{"filter_type":"NONE","filter_tags":"","filter_attributes":""}}}', 0, '1970-01-01 00:00:00', 0, 0), @@ -581,7 +570,6 @@ INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", (0, 'mod_articles_news', 'module', 'mod_articles_news', '', 0, 1, 1, 0, '', '', 0, '1970-01-01 00:00:00', 0, 0), (0, 'mod_random_image', 'module', 'mod_random_image', '', 0, 1, 1, 0, '', '', 0, '1970-01-01 00:00:00', 0, 0), (0, 'mod_related_items', 'module', 'mod_related_items', '', 0, 1, 1, 0, '', '', 0, '1970-01-01 00:00:00', 0, 0), -(0, 'mod_search', 'module', 'mod_search', '', 0, 1, 1, 0, '', '', 0, '1970-01-01 00:00:00', 0, 0), (0, 'mod_stats', 'module', 'mod_stats', '', 0, 1, 1, 0, '', '', 0, '1970-01-01 00:00:00', 0, 0), (0, 'mod_syndicate', 'module', 'mod_syndicate', '', 0, 1, 1, 1, '', '', 0, '1970-01-01 00:00:00', 0, 0), (0, 'mod_users_latest', 'module', 'mod_users_latest', '', 0, 1, 1, 0, '', '', 0, '1970-01-01 00:00:00', 0, 0), @@ -625,10 +613,6 @@ INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", (0, 'plg_editors-xtd_image', 'plugin', 'image', 'editors-xtd', 0, 1, 1, 0, '', '', 0, '1970-01-01 00:00:00', 2, 0), (0, 'plg_editors-xtd_pagebreak', 'plugin', 'pagebreak', 'editors-xtd', 0, 1, 1, 0, '', '', 0, '1970-01-01 00:00:00', 3, 0), (0, 'plg_editors-xtd_readmore', 'plugin', 'readmore', 'editors-xtd', 0, 1, 1, 0, '', '', 0, '1970-01-01 00:00:00', 4, 0), -(0, 'plg_search_categories', 'plugin', 'categories', 'search', 0, 1, 1, 0, '', '{"search_limit":"50","search_content":"1","search_archived":"1"}', 0, '1970-01-01 00:00:00', 0, 0), -(0, 'plg_search_contacts', 'plugin', 'contacts', 'search', 0, 1, 1, 0, '', '{"search_limit":"50","search_content":"1","search_archived":"1"}', 0, '1970-01-01 00:00:00', 0, 0), -(0, 'plg_search_content', 'plugin', 'content', 'search', 0, 1, 1, 0, '', '{"search_limit":"50","search_content":"1","search_archived":"1"}', 0, '1970-01-01 00:00:00', 0, 0), -(0, 'plg_search_newsfeeds', 'plugin', 'newsfeeds', 'search', 0, 1, 1, 0, '', '{"search_limit":"50","search_content":"1","search_archived":"1"}', 0, '1970-01-01 00:00:00', 0, 0), (0, 'plg_system_languagefilter', 'plugin', 'languagefilter', 'system', 0, 0, 1, 1, '', '', 0, '1970-01-01 00:00:00', 1, 0), (0, 'plg_system_cache', 'plugin', 'cache', 'system', 0, 0, 1, 1, '', '{"browsercache":"0","cachetime":"15"}', 0, '1970-01-01 00:00:00', 9, 0), (0, 'plg_system_debug', 'plugin', 'debug', 'system', 0, 1, 1, 0, '', '{"profile":"1","queries":"1","memory":"1","language_files":"1","language_strings":"1","strip-first":"1","strip-prefix":"","strip-suffix":""}', 0, '1970-01-01 00:00:00', 4, 0), @@ -656,7 +640,6 @@ INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", (0, 'plg_twofactorauth_totp', 'plugin', 'totp', 'twofactorauth', 0, 0, 1, 0, '', '', 0, '1970-01-01 00:00:00', 0, 0), (0, 'plg_authentication_cookie', 'plugin', 'cookie', 'authentication', 0, 1, 1, 0, '', '', 0, '1970-01-01 00:00:00', 0, 0), (0, 'plg_twofactorauth_yubikey', 'plugin', 'yubikey', 'twofactorauth', 0, 0, 1, 0, '', '', 0, '1970-01-01 00:00:00', 0, 0), -(0, 'plg_search_tags', 'plugin', 'tags', 'search', 0, 1, 1, 0, '', '{"search_limit":"50","show_tagged_items":"1"}', 0, '1970-01-01 00:00:00', 0, 0), (0, 'plg_system_updatenotification', 'plugin', 'updatenotification', 'system', 0, 1, 1, 0, '', '', 0, '1970-01-01 00:00:00', 0, 0), (0, 'plg_editors-xtd_module', 'plugin', 'module', 'editors-xtd', 0, 1, 1, 0, '', '', 0, '1970-01-01 00:00:00', 0, 0), (0, 'plg_system_stats', 'plugin', 'stats', 'system', 0, 1, 1, 0, '', '', 0, '1970-01-01 00:00:00', 0, 0), @@ -1344,8 +1327,6 @@ SELECT 15, 'main', 'com_newsfeeds_categories', 'Categories', '', 'News Feeds/Cat INSERT INTO "#__menu" ("id", "menutype", "title", "alias", "note", "path", "link", "type", "published", "parent_id", "level", "component_id", "checked_out", "checked_out_time", "browserNav", "access", "img", "template_style_id", "params", "lft", "rgt", "home", "language", "client_id") SELECT 16, 'main', 'com_redirect', 'Redirect', '', 'Redirect', 'index.php?option=com_redirect&view=links', 'component', 1, 1, 1, "extension_id", 0, '1970-01-01 00:00:00', 0, 0, 'class:redirect', 0, '', 27, 28, 0, '*', 1 FROM "#__extensions" WHERE "name" = 'com_redirect'; INSERT INTO "#__menu" ("id", "menutype", "title", "alias", "note", "path", "link", "type", "published", "parent_id", "level", "component_id", "checked_out", "checked_out_time", "browserNav", "access", "img", "template_style_id", "params", "lft", "rgt", "home", "language", "client_id") -SELECT 17, 'main', 'com_search', 'Basic Search', '', 'Basic Search', 'index.php?option=com_search&view=searches', 'component', 1, 1, 1, "extension_id", 0, '1970-01-01 00:00:00', 0, 0, 'class:search', 0, '', 29, 30, 0, '*', 1 FROM "#__extensions" WHERE "name" = 'com_search'; -INSERT INTO "#__menu" ("id", "menutype", "title", "alias", "note", "path", "link", "type", "published", "parent_id", "level", "component_id", "checked_out", "checked_out_time", "browserNav", "access", "img", "template_style_id", "params", "lft", "rgt", "home", "language", "client_id") SELECT 18, 'main', 'com_finder', 'Smart Search', '', 'Smart Search', 'index.php?option=com_finder&view=index', 'component', 1, 1, 1, "extension_id", 0, '1970-01-01 00:00:00', 0, 0, 'class:finder', 0, '', 31, 32, 0, '*', 1 FROM "#__extensions" WHERE "name" = 'com_finder'; INSERT INTO "#__menu" ("id", "menutype", "title", "alias", "note", "path", "link", "type", "published", "parent_id", "level", "component_id", "checked_out", "checked_out_time", "browserNav", "access", "img", "template_style_id", "params", "lft", "rgt", "home", "language", "client_id") SELECT 19, 'main', 'com_joomlaupdate', 'Joomla! Update', '', 'Joomla! Update', 'index.php?option=com_joomlaupdate', 'component', 1, 1, 1, "extension_id", 0, '1970-01-01 00:00:00', 0, 0, 'class:joomlaupdate', 0, '', 33, 34, 0, '*', 1 FROM "#__extensions" WHERE "name" = 'com_joomlaupdate'; diff --git a/installation/sql/postgresql/sample_testing.sql b/installation/sql/postgresql/sample_testing.sql index 75b7193d546dd..a39cac96a9d90 100644 --- a/installation/sql/postgresql/sample_testing.sql +++ b/installation/sql/postgresql/sample_testing.sql @@ -38,7 +38,6 @@ INSERT INTO "#__assets" ("id", "parent_id", "lft", "rgt", "level", "name", "titl (19, 1, 366, 373, 1, 'com_newsfeeds', 'com_newsfeeds', '{"core.admin":{"7":1},"core.manage":{"6":1}}'), (20, 1, 374, 375, 1, 'com_plugins', 'com_plugins', '{"core.admin":{"7":1}}'), (21, 1, 376, 377, 1, 'com_redirect', 'com_redirect', '{"core.admin":{"7":1}}'), -(22, 1, 378, 379, 1, 'com_search', 'com_search', '{"core.admin":{"7":1},"core.manage":{"6":1}}'), (23, 1, 380, 381, 1, 'com_templates', 'com_templates', '{"core.admin":{"7":1}}'), (24, 1, 382, 385, 1, 'com_users', 'com_users', '{"core.admin":{"7":1}}'), (26, 1, 404, 405, 1, 'com_wrapper', 'com_wrapper', '{}'), @@ -445,7 +444,6 @@ INSERT INTO "#__menu" ("id", "menutype", "title", "alias", "note", "path", "link (14, 'main', 'com_newsfeeds_feeds', 'Feeds', '', 'News Feeds/Feeds', 'index.php?option=com_newsfeeds', 'component', 1, 13, 2, 17, 0, '1970-01-01 00:00:00', 0, 0, 'class:newsfeeds', 0, '', 26, 27, 0, '*', 1), (15, 'main', 'com_newsfeeds_categories', 'Categories', '', 'News Feeds/Categories', 'index.php?option=com_categories&extension=com_newsfeeds', 'component', 1, 13, 2, 6, 0, '1970-01-01 00:00:00', 0, 0, 'class:newsfeeds-cat', 0, '', 28, 29, 0, '*', 1), (16, 'main', 'com_redirect', 'Redirect', '', 'Redirect', 'index.php?option=com_redirect', 'component', 1, 1, 1, 24, 0, '1970-01-01 00:00:00', 0, 0, 'class:redirect', 0, '', 31, 32, 0, '*', 1), -(17, 'main', 'com_search', 'Basic Search', '', 'Basic Search', 'index.php?option=com_search', 'component', 1, 1, 1, 19, 0, '1970-01-01 00:00:00', 0, 0, 'class:search', 0, '', 33, 34, 0, '*', 1), (18, 'main', 'com_finder', 'Smart Search', '', 'Smart Search', 'index.php?option=com_finder', 'component', 1, 1, 1, 27, 0, '1970-01-01 00:00:00', 0, 0, 'class:finder', 0, '', 35, 36, 0, '*', 1), (19, 'main', 'com_joomlaupdate', 'Joomla! Update', '', 'Joomla! Update', 'index.php?option=com_joomlaupdate', 'component', 1, 1, 1, 28, 0, '1970-01-01 00:00:00', 0, 0, 'class:joomlaupdate', 0, '', 37, 38, 0, '*', 1), (20, 'main', 'com_tags', 'Tags', '', 'Tags', 'index.php?option=com_tags', 'component', 1, 1, 1, 29, 0, '1970-01-01 00:00:00', 0, 1, 'class:tags', 0, '', 39, 40, 0, '', 1), @@ -464,7 +462,6 @@ INSERT INTO "#__menu" ("id", "menutype", "title", "alias", "note", "path", "link (252, 'frontendviews', 'News Feed Categories', 'new-feed-categories', '', 'new-feed-categories', 'index.php?option=com_newsfeeds&view=categories&id=0', 'component', 1, 1, 1, 17, 0, '1970-01-01 00:00:00', 0, 1, '', 0, '{"show_base_description":"1","categories_description":"Because this links to the root category the \\"uncategorised\\" category is displayed. ","maxLevel":"-1","show_empty_categories":"1","show_description":"1","show_description_image":"1","show_cat_num_articles":"1","display_num":"","show_headings":"","orderby_pri":"","orderby_sec":"","order_date":"","show_pagination":"","show_noauth":"","show_feed_image":"","show_feed_description":"","show_item_description":"","feed_character_count":"0","show_feed_link":"","feed_summary":"","menu-anchor_title":"","menu-anchor_css":"","menu_image":"","show_page_heading":0,"page_title":"","page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}', 163, 164, 0, '*', 0), (253, 'frontendviews', 'News Feed Category', 'news-feed-category', '', 'news-feed-category', 'index.php?option=com_newsfeeds&view=category&id=17', 'component', 1, 1, 1, 17, 0, '1970-01-01 00:00:00', 0, 1, '', 0, '{"maxLevel":"-1","show_empty_categories":"","show_description":"","show_description_image":"","show_cat_num_articles":"","display_num":"","show_headings":"","orderby_pri":"","orderby_sec":"","order_date":"","show_pagination":"","show_noauth":"","show_feed_image":"","show_feed_description":"","show_item_description":"","feed_character_count":"0","show_feed_link":"","feed_summary":"","menu-anchor_title":"","menu-anchor_css":"","menu_image":"","show_page_heading":0,"page_title":"","page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}', 167, 168, 0, '*', 0), (254, 'frontendviews', 'Single News Feed', 'single-news-feed', '', 'single-news-feed', 'index.php?option=com_newsfeeds&view=newsfeed&id=1', 'component', 1, 1, 1, 17, 0, '1970-01-01 00:00:00', 0, 1, '', 0, '{"show_feed_image":"","show_feed_description":"","show_item_description":"","feed_character_count":"0","menu-anchor_title":"","menu-anchor_css":"","menu_image":"","show_page_heading":0,"page_title":"","page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}', 165, 166, 0, '*', 0), -(255, 'frontendviews', 'Search', 'search', '', 'search', 'index.php?option=com_search&view=search', 'component', 1, 1, 1, 19, 0, '1970-01-01 00:00:00', 0, 1, '', 0, '{"search_areas":"1","show_date":"1","menu-anchor_title":"","menu-anchor_css":"","menu_image":"","show_page_heading":0,"page_title":"","page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}', 185, 186, 0, '*', 0), (256, 'frontendviews', 'Archived Articles', 'archived-articles', '', 'archived-articles', 'index.php?option=com_content&view=archive', 'component', 1, 1, 1, 22, 0, '1970-01-01 00:00:00', 0, 1, '', 0, '{"orderby_sec":"","order_date":"","display_num":"","filter_field":"","show_category":"1","link_category":"1","show_title":"1","link_titles":"1","show_intro":"1","show_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_readmore":"","show_hits":"","menu-anchor_title":"","menu-anchor_css":"","menu_image":"","show_page_heading":0,"page_title":"","page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}', 147, 148, 0, '*', 0), (257, 'frontendviews', 'Single Article', 'single-article', '', 'single-article', 'index.php?option=com_content&view=article&id=6', 'component', 1, 1, 1, 22, 0, '1970-01-01 00:00:00', 0, 1, '', 0, '{"show_noauth":"","show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_hits":"","robots":"","rights":"","menu-anchor_title":"","menu-anchor_css":"","menu_image":"","show_page_heading":0,"page_title":"","page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","secure":0}', 137, 138, 0, '*', 0), (259, 'frontendviews', 'Article Category Blog', 'article-category-blog', '', 'article-category-blog', 'index.php?option=com_content&view=category&layout=blog&id=27', 'component', 1, 1, 1, 22, 0, '1970-01-01 00:00:00', 0, 1, '', 0, '{"maxLevel":"","show_empty_categories":"","show_description":"0","show_description_image":"0","show_category_title":"","show_cat_num_articles":"","num_leading_articles":"1","num_intro_articles":"4","num_links":"4","orderby_pri":"","orderby_sec":"","order_date":"","show_pagination":"2","show_noauth":"","show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_readmore":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_hits":"","show_feed_link":"1","feed_summary":"","menu-anchor_title":"","menu-anchor_css":"","menu_image":"","show_page_heading":0,"page_title":"","page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}', 141, 142, 0, '*', 0), diff --git a/language/en-GB/en-GB.com_search.ini b/language/en-GB/en-GB.com_search.ini deleted file mode 100644 index cdada49d4090c..0000000000000 --- a/language/en-GB/en-GB.com_search.ini +++ /dev/null @@ -1,24 +0,0 @@ -; author Joomla! Project -; Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved. -; license GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php -; Note : All ini files need to be saved as UTF-8 - -COM_SEARCH_ALL_WORDS="All words" -COM_SEARCH_ALPHABETICAL="Alphabetical" -COM_SEARCH_ANY_WORDS="Any words" -COM_SEARCH_ERROR_ENTERKEYWORD="Enter a search keyword" -COM_SEARCH_ERROR_IGNOREKEYWORD="One or more common words were ignored in the search." -COM_SEARCH_ERROR_SEARCH_MESSAGE="Search term must be a minimum of %1$s characters and a maximum of %2$s characters." -COM_SEARCH_EXACT_PHRASE="Exact Phrase" -COM_SEARCH_FIELD_SEARCH_PHRASES_LABEL="Use Search Options" -COM_SEARCH_FIELD_SEARCH_AREAS_LABEL="Use Search Areas" -COM_SEARCH_FOR="Search for:" -COM_SEARCH_MOST_POPULAR="Most Popular" -COM_SEARCH_NEWEST_FIRST="Newest First" -COM_SEARCH_OLDEST_FIRST="Oldest First" -COM_SEARCH_ORDERING="Ordering:" -COM_SEARCH_SEARCH="Search" -COM_SEARCH_SEARCH_KEYWORD="Search Keyword:" -COM_SEARCH_SEARCH_KEYWORD_N_RESULTS_1="Total: One result found." -COM_SEARCH_SEARCH_KEYWORD_N_RESULTS="Total: %s results found." -COM_SEARCH_SEARCH_ONLY="Search Only:" \ No newline at end of file diff --git a/language/en-GB/en-GB.localise.php b/language/en-GB/en-GB.localise.php index 77e11be263a8b..3855c912032f8 100644 --- a/language/en-GB/en-GB.localise.php +++ b/language/en-GB/en-GB.localise.php @@ -39,52 +39,4 @@ public static function getPluralSuffixes($count) return array('MORE'); } } - - /** - * Returns the ignored search words - * - * @return array An array of ignored search words. - * - * @since 1.6 - */ - public static function getIgnoredSearchWords() - { - return array('and', 'in', 'on'); - } - - /** - * Returns the lower length limit of search words - * - * @return integer The lower length limit of search words. - * - * @since 1.6 - */ - public static function getLowerLimitSearchWord() - { - return 3; - } - - /** - * Returns the upper length limit of search words - * - * @return integer The upper length limit of search words. - * - * @since 1.6 - */ - public static function getUpperLimitSearchWord() - { - return 20; - } - - /** - * Returns the number of chars to display when searching - * - * @return integer The number of chars to display when searching. - * - * @since 1.6 - */ - public static function getSearchDisplayedCharactersNumber() - { - return 200; - } } diff --git a/language/en-GB/en-GB.mod_search.ini b/language/en-GB/en-GB.mod_search.ini deleted file mode 100644 index 7876045e86638..0000000000000 --- a/language/en-GB/en-GB.mod_search.ini +++ /dev/null @@ -1,21 +0,0 @@ -; Joomla! Project -; Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved. -; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php -; Note : All ini files need to be saved as UTF-8 - -MOD_SEARCH="Search" -MOD_SEARCH_FIELD_BUTTON_LABEL="Search Button" -MOD_SEARCH_FIELD_BUTTONTEXT_LABEL="Button Text" -MOD_SEARCH_FIELD_IMAGEBUTTON_LABEL="Search Button Image" -MOD_SEARCH_FIELD_SETITEMID_LABEL="Set ItemID" -MOD_SEARCH_FIELD_LABEL_TEXT_DESC="The text that appears in the label of search box. If left blank, it will load 'label' string from your language file." -MOD_SEARCH_FIELD_LABEL_TEXT_LABEL="Box Label" -MOD_SEARCH_FIELD_OPENSEARCH_LABEL="OpenSearch Autodiscovery" -MOD_SEARCH_FIELD_OPENSEARCH_TEXT_LABEL="OpenSearch Title" -MOD_SEARCH_FIELD_TEXT_DESC="The text that appears in the search text box. If left blank, it will load the 'searchbox' string from your language file." -MOD_SEARCH_FIELD_TEXT_LABEL="Box Text" -MOD_SEARCH_LABEL_TEXT="Search ..." -MOD_SEARCH_SEARCHBOX_TEXT="Search ..." -MOD_SEARCH_SEARCHBUTTON_TEXT="Search" -MOD_SEARCH_SELECT_MENU_ITEMID="Select a menu item" -MOD_SEARCH_XML_DESCRIPTION="This module will display a search box." \ No newline at end of file diff --git a/language/en-GB/en-GB.mod_search.sys.ini b/language/en-GB/en-GB.mod_search.sys.ini deleted file mode 100644 index 8ee1912751c9c..0000000000000 --- a/language/en-GB/en-GB.mod_search.sys.ini +++ /dev/null @@ -1,9 +0,0 @@ -; Joomla! Project -; Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved. -; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php -; Note : All ini files need to be saved as UTF-8 - -MOD_SEARCH="Search" -MOD_SEARCH_XML_DESCRIPTION="This module will display a search box." -MOD_SEARCH_LAYOUT_DEFAULT="Default" - diff --git a/libraries/classmap.php b/libraries/classmap.php index 2ad66cbdef712..edab47e51f186 100644 --- a/libraries/classmap.php +++ b/libraries/classmap.php @@ -113,7 +113,6 @@ JLoader::registerAlias('JHelperMedia', '\\Joomla\\CMS\\Helper\\MediaHelper', '5.0'); JLoader::registerAlias('JModuleHelper', '\\Joomla\\CMS\\Helper\\ModuleHelper', '5.0'); JLoader::registerAlias('JHelperRoute', '\\Joomla\\CMS\\Helper\\RouteHelper', '5.0'); -JLoader::registerAlias('JSearchHelper', '\\Joomla\\CMS\\Helper\\SearchHelper', '5.0'); JLoader::registerAlias('JHelperTags', '\\Joomla\\CMS\\Helper\\TagsHelper', '5.0'); JLoader::registerAlias('JHelperUsergroups', '\\Joomla\\CMS\\Helper\\UserGroupsHelper', '5.0'); diff --git a/libraries/src/Extension/ExtensionHelper.php b/libraries/src/Extension/ExtensionHelper.php index cc0a357050b27..6a3403b40ea7a 100644 --- a/libraries/src/Extension/ExtensionHelper.php +++ b/libraries/src/Extension/ExtensionHelper.php @@ -77,7 +77,6 @@ class ExtensionHelper array('component', 'com_postinstall', '', 1), array('component', 'com_privacy', '', 1), array('component', 'com_redirect', '', 1), - array('component', 'com_search', '', 1), array('component', 'com_tags', '', 1), array('component', 'com_templates', '', 1), array('component', 'com_users', '', 1), @@ -134,7 +133,6 @@ class ExtensionHelper array('module', 'mod_menu', '', 0), array('module', 'mod_random_image', '', 0), array('module', 'mod_related_items', '', 0), - array('module', 'mod_search', '', 0), array('module', 'mod_stats', '', 0), array('module', 'mod_syndicate', '', 0), array('module', 'mod_tags_popular', '', 0), @@ -256,13 +254,6 @@ class ExtensionHelper array('plugin', 'blog', 'sampledata', 0), array('plugin', 'multilang', 'sampledata', 0), - // Core plugin extensions - search - array('plugin', 'categories', 'search', 0), - array('plugin', 'contacts', 'search', 0), - array('plugin', 'content', 'search', 0), - array('plugin', 'newsfeeds', 'search', 0), - array('plugin', 'tags', 'search', 0), - // Core plugin extensions - system array('plugin', 'actionlogs', 'system', 0), array('plugin', 'cache', 'system', 0), diff --git a/libraries/src/Helper/SearchHelper.php b/libraries/src/Helper/SearchHelper.php deleted file mode 100644 index bdd0adfd7d657..0000000000000 --- a/libraries/src/Helper/SearchHelper.php +++ /dev/null @@ -1,74 +0,0 @@ -getQuery(true); - $enable_log_searches = ComponentHelper::getParams($component)->get('enabled'); - - // Sanitise the term for the database - $search_term = $db->escape(trim(strtolower($term))); - - if ($enable_log_searches) - { - // Query the table to determine if the term has been searched previously - $query->select($db->quoteName('hits')) - ->from($db->quoteName('#__core_log_searches')) - ->where($db->quoteName('search_term') . ' = ' . $db->quote($search_term)); - $db->setQuery($query); - $hits = (int) $db->loadResult(); - - // Reset the $query object - $query->clear(); - - // Update the table based on the results - if ($hits) - { - $query->update($db->quoteName('#__core_log_searches')) - ->set('hits = (hits + 1)') - ->where($db->quoteName('search_term') . ' = ' . $db->quote($search_term)); - } - else - { - $query->insert($db->quoteName('#__core_log_searches')) - ->columns(array($db->quoteName('search_term'), $db->quoteName('hits'))) - ->values($db->quote($search_term) . ', 1'); - } - - // Execute the update query - $db->setQuery($query); - $db->execute(); - } - } -} diff --git a/modules/mod_search/Helper/SearchHelper.php b/modules/mod_search/Helper/SearchHelper.php deleted file mode 100644 index bba5bafe04242..0000000000000 --- a/modules/mod_search/Helper/SearchHelper.php +++ /dev/null @@ -1,36 +0,0 @@ -get('set_itemid', 0); -$mitemid = $set_Itemid > 0 ? $set_Itemid : $app->input->getInt('Itemid'); - -if ($params->get('opensearch', 1)) -{ - $ostitle = $params->get('opensearch_title', Text::_('MOD_SEARCH_SEARCHBUTTON_TEXT') . ' ' . $app->get('sitename')); - $app->getDocument()->addHeadLink( - Uri::getInstance()->toString(array('scheme', 'host', 'port')) . Route::_('&option=com_search&format=opensearch&Itemid=' . $mitemid), - 'search', - 'rel', - [ - 'title' => htmlspecialchars($ostitle, ENT_COMPAT, 'UTF-8'), - 'type' => 'application/opensearchdescription+xml' - ] - ); -} - -$upper_limit = $app->getLanguage()->getUpperLimitSearchWord(); -$button = $params->get('button', 0); -$imagebutton = $params->get('imagebutton', 0); -$button_text = htmlspecialchars($params->get('button_text', Text::_('MOD_SEARCH_SEARCHBUTTON_TEXT')), ENT_COMPAT, 'UTF-8'); -$maxlength = $upper_limit; -$text = htmlspecialchars($params->get('text', Text::_('MOD_SEARCH_SEARCHBOX_TEXT')), ENT_COMPAT, 'UTF-8'); -$label = htmlspecialchars($params->get('label', Text::_('MOD_SEARCH_LABEL_TEXT')), ENT_COMPAT, 'UTF-8'); - -if ($imagebutton) -{ - $img = SearchHelper::getSearchImage($button_text); -} - -require ModuleHelper::getLayoutPath('mod_search', $params->get('layout', 'default')); diff --git a/modules/mod_search/mod_search.xml b/modules/mod_search/mod_search.xml deleted file mode 100644 index 8f54ebbf9f779..0000000000000 --- a/modules/mod_search/mod_search.xml +++ /dev/null @@ -1,145 +0,0 @@ - - - mod_search - Joomla! Project - July 2004 - Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved. - GNU General Public License version 2 or later; see LICENSE.txt - admin@joomla.org - www.joomla.org - 3.0.0 - MOD_SEARCH_XML_DESCRIPTION - Joomla\Module\Search - - mod_search.php - tmpl - helper.php - - - en-GB.mod_search.ini - en-GB.mod_search.sys.ini - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - -
-
-
-
diff --git a/modules/mod_search/tmpl/default.php b/modules/mod_search/tmpl/default.php deleted file mode 100644 index 11ffc34b732fb..0000000000000 --- a/modules/mod_search/tmpl/default.php +++ /dev/null @@ -1,44 +0,0 @@ - - diff --git a/plugins/search/categories/categories.php b/plugins/search/categories/categories.php deleted file mode 100644 index 3793e178d9426..0000000000000 --- a/plugins/search/categories/categories.php +++ /dev/null @@ -1,201 +0,0 @@ - 'PLG_SEARCH_CATEGORIES_CATEGORIES' - ); - - return $areas; - } - - /** - * Search content (categories). - * - * The SQL must return the following fields that are used in a common display - * routine: href, title, section, created, text, browsernav. - * - * @param string $text Target search string. - * @param string $phrase Matching option (possible values: exact|any|all). Default is "any". - * @param string $ordering Ordering option (possible values: newest|oldest|popular|alpha|category). Default is "newest". - * @param mixed $areas An array if the search is to be restricted to areas or null to search all areas. - * - * @return array Search results. - * - * @since 1.6 - */ - public function onContentSearch($text, $phrase = '', $ordering = '', $areas = null) - { - $db = Factory::getDbo(); - $user = Factory::getUser(); - $app = Factory::getApplication(); - $groups = implode(',', $user->getAuthorisedViewLevels()); - $searchText = $text; - - if (is_array($areas) && !array_intersect($areas, array_keys($this->onContentSearchAreas()))) - { - return array(); - } - - $sContent = $this->params->get('search_content', 1); - $sArchived = $this->params->get('search_archived', 1); - $limit = $this->params->def('search_limit', 50); - $state = array(); - - if ($sContent) - { - $state[] = 1; - } - - if ($sArchived) - { - $state[] = 2; - } - - if (empty($state)) - { - return array(); - } - - $text = trim($text); - - if ($text === '') - { - return array(); - } - - /* TODO: The $where variable does not seem to be used at all - switch ($phrase) - { - case 'exact': - $text = $db->quote('%' . $db->escape($text, true) . '%', false); - $wheres2 = array(); - $wheres2[] = 'a.title LIKE ' . $text; - $wheres2[] = 'a.description LIKE ' . $text; - $where = '(' . implode(') OR (', $wheres2) . ')'; - break; - - case 'any': - case 'all'; - default: - $words = explode(' ', $text); - $wheres = array(); - foreach ($words as $word) - { - $word = $db->quote('%' . $db->escape($word, true) . '%', false); - $wheres2 = array(); - $wheres2[] = 'a.title LIKE ' . $word; - $wheres2[] = 'a.description LIKE ' . $word; - $wheres[] = implode(' OR ', $wheres2); - } - $where = '(' . implode(($phrase === 'all' ? ') AND (' : ') OR ('), $wheres) . ')'; - break; - } - */ - - switch ($ordering) - { - case 'alpha': - $order = 'a.title ASC'; - break; - - case 'category': - case 'popular': - case 'newest': - case 'oldest': - default: - $order = 'a.title DESC'; - } - - $text = $db->quote('%' . $db->escape($text, true) . '%', false); - $query = $db->getQuery(true); - - $case_when = ' CASE WHEN ' . $query->charLength('a.alias', '!=', '0') - . ' THEN ' . $query->concatenate(array($query->castAsChar('a.id'), 'a.alias'), ':') - . ' ELSE a.id END AS slug'; - - $query->select('a.title, a.description AS text, a.created_time AS created') - ->select($db->quote('2') . ' AS browsernav') - ->select('a.id AS catid, a.language AS category_language') - ->select($case_when) - ->from($db->quoteName('#__categories', 'a')) - ->where( - '(a.title LIKE ' . $text . ' OR a.description LIKE ' . $text . ') AND a.published IN (' . implode(',', $state) . ') AND a.extension = ' - . $db->quote('com_content') . 'AND a.access IN (' . $groups . ')' - ) - ->group('a.id, a.title, a.description, a.alias, a.created_time, a.language') - ->order($order); - - if ($app->isClient('site') && Multilanguage::isEnabled()) - { - $query->where('a.language in (' . $db->quote(Factory::getLanguage()->getTag()) . ',' . $db->quote('*') . ')'); - } - - $db->setQuery($query, 0, $limit); - - try - { - $rows = $db->loadObjectList(); - } - catch (RuntimeException $e) - { - $rows = array(); - Factory::getApplication()->enqueueMessage(Text::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error'); - } - - $return = array(); - - if ($rows) - { - foreach ($rows as $i => $row) - { - if (SearchHelper::checkNoHtml($row, $searchText, array('name', 'title', 'text'))) - { - $row->href = ContentHelperRoute::getCategoryRoute($row->slug, $row->category_language); - $row->section = Text::_('JCATEGORY'); - - $return[] = $row; - } - } - } - - return $return; - } -} diff --git a/plugins/search/categories/categories.xml b/plugins/search/categories/categories.xml deleted file mode 100644 index 543726a39c640..0000000000000 --- a/plugins/search/categories/categories.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - plg_search_categories - Joomla! Project - November 2005 - Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved. - GNU General Public License version 2 or later; see LICENSE.txt - admin@joomla.org - www.joomla.org - 3.0.0 - PLG_SEARCH_CATEGORIES_XML_DESCRIPTION - - categories.php - - - en-GB.plg_search_categories.ini - en-GB.plg_search_categories.sys.ini - - - - -
- - - - - - - - - - - -
- -
-
-
diff --git a/plugins/search/contacts/contacts.php b/plugins/search/contacts/contacts.php deleted file mode 100644 index 4f43899a4f86a..0000000000000 --- a/plugins/search/contacts/contacts.php +++ /dev/null @@ -1,186 +0,0 @@ - 'PLG_SEARCH_CONTACTS_CONTACTS' - ); - - return $areas; - } - - /** - * Search content (contacts). - * - * The SQL must return the following fields that are used in a common display - * routine: href, title, section, created, text, browsernav. - * - * @param string $text Target search string. - * @param string $phrase Matching option (possible values: exact|any|all). Default is "any". - * @param string $ordering Ordering option (possible values: newest|oldest|popular|alpha|category). Default is "newest". - * @param string $areas An array if the search is to be restricted to areas or null to search all areas. - * - * @return array Search results. - * - * @since 1.6 - */ - public function onContentSearch($text, $phrase = '', $ordering = '', $areas = null) - { - JLoader::register('ContactHelperRoute', JPATH_SITE . '/components/com_contact/helpers/route.php'); - - $db = Factory::getDbo(); - $app = Factory::getApplication(); - $user = Factory::getUser(); - $groups = implode(',', $user->getAuthorisedViewLevels()); - - if (is_array($areas) && !array_intersect($areas, array_keys($this->onContentSearchAreas()))) - { - return array(); - } - - $sContent = $this->params->get('search_content', 1); - $sArchived = $this->params->get('search_archived', 1); - $limit = $this->params->def('search_limit', 50); - $state = array(); - - if ($sContent) - { - $state[] = 1; - } - - if ($sArchived) - { - $state[] = 2; - } - - if (empty($state)) - { - return array(); - } - - $text = trim($text); - - if ($text === '') - { - return array(); - } - - $section = Text::_('PLG_SEARCH_CONTACTS_CONTACTS'); - - switch ($ordering) - { - case 'alpha': - $order = 'a.name ASC'; - break; - - case 'category': - $order = 'c.title ASC, a.name ASC'; - break; - - case 'popular': - case 'newest': - case 'oldest': - default: - $order = 'a.name DESC'; - } - - $text = $db->quote('%' . $db->escape($text, true) . '%', false); - - $query = $db->getQuery(true); - - $case_when = ' CASE WHEN ' . $query->charLength('a.alias', '!=', '0') - . ' THEN ' . $query->concatenate(array($query->castAsChar('a.id'), 'a.alias'), ':') - . ' ELSE a.id END AS slug'; - - $case_when1 = ' CASE WHEN ' . $query->charLength('c.alias', '!=', '0') - . ' THEN ' . $query->concatenate(array($query->castAsChar('c.id'), 'c.alias'), ':') - . ' ELSE c.id END AS catslug'; - - $query->select('a.name AS title') - ->select($db->quote('') . ' AS created, a.con_position, a.misc') - ->select($case_when) - ->select($case_when1) - ->select($query->concatenate(array('a.name', 'a.con_position', 'a.misc'), ',') . ' AS text') - ->select($query->concatenate(array($db->quote($section), 'c.title'), ' / ') . ' AS section') - ->select($db->quote('2') . ' AS browsernav') - ->from($db->quoteName('#__contact_details', 'a')) - ->innerJoin($db->quoteName('#__categories', 'c') . ' ON c.id = a.catid') - ->where( - '(a.name LIKE ' . $text . ' OR a.misc LIKE ' . $text . ' OR a.con_position LIKE ' . $text - . ' OR a.address LIKE ' . $text . ' OR a.suburb LIKE ' . $text . ' OR a.state LIKE ' . $text - . ' OR a.country LIKE ' . $text . ' OR a.postcode LIKE ' . $text . ' OR a.telephone LIKE ' . $text - . ' OR a.fax LIKE ' . $text . ') AND a.published IN (' . implode(',', $state) . ') AND c.published=1 ' - . ' AND a.access IN (' . $groups . ') AND c.access IN (' . $groups . ')' - ) - ->order($order); - - // Filter by language. - if ($app->isClient('site') && Multilanguage::isEnabled()) - { - $tag = Factory::getLanguage()->getTag(); - $query->where('a.language in (' . $db->quote($tag) . ',' . $db->quote('*') . ')') - ->where('c.language in (' . $db->quote($tag) . ',' . $db->quote('*') . ')'); - } - - $db->setQuery($query, 0, $limit); - - try - { - $rows = $db->loadObjectList(); - } - catch (RuntimeException $e) - { - $rows = array(); - Factory::getApplication()->enqueueMessage(Text::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error'); - } - - if ($rows) - { - foreach ($rows as $key => $row) - { - $rows[$key]->href = ContactHelperRoute::getContactRoute($row->slug, $row->catslug); - $rows[$key]->text = $row->title; - $rows[$key]->text .= $row->con_position ? ', ' . $row->con_position : ''; - $rows[$key]->text .= $row->misc ? ', ' . $row->misc : ''; - } - } - - return $rows; - } -} diff --git a/plugins/search/contacts/contacts.xml b/plugins/search/contacts/contacts.xml deleted file mode 100644 index 98788753e38df..0000000000000 --- a/plugins/search/contacts/contacts.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - plg_search_contacts - Joomla! Project - November 2005 - Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved. - GNU General Public License version 2 or later; see LICENSE.txt - admin@joomla.org - www.joomla.org - 3.0.0 - PLG_SEARCH_CONTACTS_XML_DESCRIPTION - - contacts.php - - - en-GB.plg_search_contacts.ini - en-GB.plg_search_contacts.sys.ini - - - -
- - - - - - - - - - - -
-
-
-
diff --git a/plugins/search/content/content.php b/plugins/search/content/content.php deleted file mode 100644 index ba3099c8b017f..0000000000000 --- a/plugins/search/content/content.php +++ /dev/null @@ -1,445 +0,0 @@ - 'JGLOBAL_ARTICLES' - ); - - return $areas; - } - - /** - * Search content (articles). - * The SQL must return the following fields that are used in a common display - * routine: href, title, section, created, text, browsernav. - * - * @param string $text Target search string. - * @param string $phrase Matching option (possible values: exact|any|all). Default is "any". - * @param string $ordering Ordering option (possible values: newest|oldest|popular|alpha|category). Default is "newest". - * @param mixed $areas An array if the search it to be restricted to areas or null to search all areas. - * - * @return array Search results. - * - * @since 1.6 - */ - public function onContentSearch($text, $phrase = '', $ordering = '', $areas = null) - { - $db = Factory::getDbo(); - $serverType = $db->getServerType(); - $app = Factory::getApplication(); - $user = Factory::getUser(); - $groups = implode(',', $user->getAuthorisedViewLevels()); - $tag = Factory::getLanguage()->getTag(); - - $searchText = $text; - - if (is_array($areas) && !array_intersect($areas, array_keys($this->onContentSearchAreas()))) - { - return array(); - } - - $sContent = $this->params->get('search_content', 1); - $sArchived = $this->params->get('search_archived', 1); - $limit = $this->params->def('search_limit', 50); - - $nullDate = $db->getNullDate(); - $date = Factory::getDate(); - $now = $date->toSql(); - - $text = trim($text); - - if ($text === '') - { - return array(); - } - - switch ($phrase) - { - case 'exact': - $text = $db->quote('%' . $db->escape($text, true) . '%', false); - $wheres2 = array(); - $wheres2[] = 'a.title LIKE ' . $text; - $wheres2[] = 'a.introtext LIKE ' . $text; - $wheres2[] = 'a.fulltext LIKE ' . $text; - $wheres2[] = 'a.metakey LIKE ' . $text; - $wheres2[] = 'a.metadesc LIKE ' . $text; - - $relevance[] = ' CASE WHEN ' . $wheres2[0] . ' THEN 5 ELSE 0 END '; - - // Join over Fields. - $subQuery = $db->getQuery(true); - $subQuery->select("cfv.item_id") - ->from("#__fields_values AS cfv") - ->join('LEFT', '#__fields AS f ON f.id = cfv.field_id') - ->where('(f.context IS NULL OR f.context = ' . $db->quote('com_content.article') . ')') - ->where('(f.state IS NULL OR f.state = 1)') - ->where('(f.access IS NULL OR f.access IN (' . $groups . '))') - ->where('cfv.value LIKE ' . $text); - - // Filter by language. - if ($app->isClient('site') && Multilanguage::isEnabled()) - { - $subQuery->where('(f.language IS NULL OR f.language in (' . $db->quote($tag) . ',' . $db->quote('*') . '))'); - } - - if ($serverType == "mysql") - { - /* This generates a dependent sub-query so do no use in MySQL prior to version 6.0 ! - * $wheres2[] = 'a.id IN( '. (string) $subQuery.')'; - */ - - $db->setQuery($subQuery); - $fieldids = $db->loadColumn(); - - if (count($fieldids)) - { - $wheres2[] = 'a.id IN(' . implode(",", $fieldids) . ')'; - } - } - else - { - $wheres2[] = $subQuery->castAsChar('a.id') . ' IN( ' . (string) $subQuery . ')'; - } - - $where = '(' . implode(') OR (', $wheres2) . ')'; - break; - - case 'all': - case 'any': - default: - $words = explode(' ', $text); - $wheres = array(); - $cfwhere = array(); - - foreach ($words as $word) - { - $word = $db->quote('%' . $db->escape($word, true) . '%', false); - $wheres2 = array(); - $wheres2[] = 'LOWER(a.title) LIKE LOWER(' . $word . ')'; - $wheres2[] = 'LOWER(a.introtext) LIKE LOWER(' . $word . ')'; - $wheres2[] = 'LOWER(a.fulltext) LIKE LOWER(' . $word . ')'; - $wheres2[] = 'LOWER(a.metakey) LIKE LOWER(' . $word . ')'; - $wheres2[] = 'LOWER(a.metadesc) LIKE LOWER(' . $word . ')'; - - $relevance[] = ' CASE WHEN ' . $wheres2[0] . ' THEN 5 ELSE 0 END '; - - if ($phrase === 'all') - { - // Join over Fields. - $subQuery = $db->getQuery(true); - $subQuery->select("cfv.item_id") - ->from("#__fields_values AS cfv") - ->join('LEFT', '#__fields AS f ON f.id = cfv.field_id') - ->where('(f.context IS NULL OR f.context = ' . $db->quote('com_content.article') . ')') - ->where('(f.state IS NULL OR f.state = 1)') - ->where('(f.access IS NULL OR f.access IN (' . $groups . '))') - ->where('LOWER(cfv.value) LIKE LOWER(' . $word . ')'); - - // Filter by language. - if ($app->isClient('site') && Multilanguage::isEnabled()) - { - $subQuery->where('(f.language IS NULL OR f.language in (' . $db->quote($tag) . ',' . $db->quote('*') . '))'); - } - - if ($serverType == "mysql") - { - $db->setQuery($subQuery); - $fieldids = $db->loadColumn(); - - if (count($fieldids)) - { - $wheres2[] = 'a.id IN(' . implode(",", $fieldids) . ')'; - } - } - else - { - $wheres2[] = $subQuery->castAsChar('a.id') . ' IN( ' . (string) $subQuery . ')'; - } - } - else - { - $cfwhere[] = 'LOWER(cfv.value) LIKE LOWER(' . $word . ')'; - } - - $wheres[] = implode(' OR ', $wheres2); - } - - if ($phrase === 'any') - { - // Join over Fields. - $subQuery = $db->getQuery(true); - $subQuery->select("cfv.item_id") - ->from("#__fields_values AS cfv") - ->join('LEFT', '#__fields AS f ON f.id = cfv.field_id') - ->where('(f.context IS NULL OR f.context = ' . $db->quote('com_content.article') . ')') - ->where('(f.state IS NULL OR f.state = 1)') - ->where('(f.access IS NULL OR f.access IN (' . $groups . '))') - ->where('(' . implode(($phrase === 'all' ? ') AND (' : ') OR ('), $cfwhere) . ')'); - - // Filter by language. - if ($app->isClient('site') && Multilanguage::isEnabled()) - { - $subQuery->where('(f.language IS NULL OR f.language in (' . $db->quote($tag) . ',' . $db->quote('*') . '))'); - } - - if ($serverType == "mysql") - { - $db->setQuery($subQuery); - $fieldids = $db->loadColumn(); - - if (count($fieldids)) - { - $wheres[] = 'a.id IN(' . implode(",", $fieldids) . ')'; - } - } - else - { - $wheres[] = $subQuery->castAsChar('a.id') . ' IN( ' . (string) $subQuery . ')'; - } - } - - $where = '(' . implode(($phrase === 'all' ? ') AND (' : ') OR ('), $wheres) . ')'; - break; - } - - switch ($ordering) - { - case 'oldest': - $order = 'a.created ASC'; - break; - - case 'popular': - $order = 'a.hits DESC'; - break; - - case 'alpha': - $order = 'a.title ASC'; - break; - - case 'category': - $order = 'c.title ASC, a.title ASC'; - break; - - case 'newest': - default: - $order = 'a.created DESC'; - break; - } - - $rows = array(); - $query = $db->getQuery(true); - - // Search articles. - if ($sContent && $limit > 0) - { - $query->clear(); - - $case_when = ' CASE WHEN ' . $query->charLength('a.alias', '!=', '0') - . ' THEN ' . $query->concatenate(array($query->castAsChar('a.id'), 'a.alias'), ':') - . ' ELSE ' . $query->castAsChar('a.id') . ' END AS slug'; - - $case_when1 = ' CASE WHEN ' . $query->charLength('c.alias', '!=', '0') - . ' THEN ' . $query->concatenate(array($query->castAsChar('c.id'), 'c.alias'), ':') - . ' ELSE ' . $query->castAsChar('c.id') . ' END AS catslug'; - - if (!empty($relevance)) - { - $query->select(implode(' + ', $relevance) . ' AS relevance'); - $order = ' relevance DESC, ' . $order; - } - - $query->select('a.title AS title, a.metadesc, a.metakey, a.created AS created, a.language, a.catid') - ->select($query->concatenate(array('a.introtext', 'a.fulltext')) . ' AS text') - ->select('c.title AS section') - ->select($case_when) - ->select($case_when1) - ->select($db->quote('2') . ' AS browsernav') - ->from($db->quoteName('#__content', 'a')) - ->innerJoin($db->quoteName('#__categories', 'c') . ' ON c.id = a.catid') - ->join('LEFT', '#__workflow_associations AS wa ON wa.item_id = a.id') - ->join('INNER', '#__workflow_stages AS ws ON ws.id = wa.stage_id') - ->where($db->quoteName('wa.extension') . '=' . $db->quote('com_content')) - ->where( - '(' . $where . ') AND c.published = 1 AND a.access IN (' . $groups . ') ' - . 'AND (ws.condition = ' . ContentComponent::CONDITION_PUBLISHED . ') ' - . 'AND c.access IN (' . $groups . ') ' - . 'AND (a.publish_up = ' . $db->quote($nullDate) . ' OR a.publish_up <= ' . $db->quote($now) . ') ' - . 'AND (a.publish_down = ' . $db->quote($nullDate) . ' OR a.publish_down >= ' . $db->quote($now) . ')' - ) - ->group('a.id, a.title, a.metadesc, a.metakey, a.created, a.language, a.catid, a.introtext, a.fulltext, c.title, a.alias, c.alias, c.id') - ->order($order); - - // Filter by language. - if ($app->isClient('site') && Multilanguage::isEnabled()) - { - $query->where('a.language in (' . $db->quote($tag) . ',' . $db->quote('*') . ')') - ->where('c.language in (' . $db->quote($tag) . ',' . $db->quote('*') . ')'); - } - - $db->setQuery($query, 0, $limit); - - try - { - $list = $db->loadObjectList(); - } - catch (RuntimeException $e) - { - $list = array(); - Factory::getApplication()->enqueueMessage(Text::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error'); - } - - $limit -= count($list); - - if (isset($list)) - { - foreach ($list as $key => $item) - { - $list[$key]->href = ContentHelperRoute::getArticleRoute($item->slug, $item->catid, $item->language); - } - } - - $rows[] = $list; - } - - // Search archived content. - if ($sArchived && $limit > 0) - { - $query->clear(); - - $case_when = ' CASE WHEN ' . $query->charLength('a.alias', '!=', '0') - . ' THEN ' . $query->concatenate(array($query->castAsChar('a.id'), 'a.alias'), ':') - . ' ELSE ' . $query->castAsChar('a.id') . ' END AS slug'; - - $case_when1 = ' CASE WHEN ' . $query->charLength('c.alias', '!=', '0') - . ' THEN ' . $query->concatenate(array($query->castAsChar('c.id'), 'c.alias'), ':') - . ' ELSE ' . $query->castAsChar('c.id') . ' END AS catslug'; - - if (!empty($relevance)) - { - $query->select(implode(' + ', $relevance) . ' AS relevance'); - $order = ' relevance DESC, ' . $order; - } - - $query->select('a.title AS title, a.metadesc, a.metakey, a.created AS created') - ->select($query->concatenate(array('a.introtext', 'a.fulltext')) . ' AS text') - ->select($case_when) - ->select($case_when1) - ->select('c.title AS section') - ->select($db->quote('2') . ' AS browsernav') - ->from($db->quoteName('#__content', 'a')) - ->innerJoin($db->quoteName('#__categories', 'c') . ' ON c.id = a.catid AND c.access IN (' . $groups . ')') - ->where( - '(' . $where . ') AND a.state = 2 AND c.published = 1 AND a.access IN (' . $groups - . ') AND c.access IN (' . $groups . ') ' - . 'AND (a.publish_up = ' . $db->quote($nullDate) . ' OR a.publish_up <= ' . $db->quote($now) . ') ' - . 'AND (a.publish_down = ' . $db->quote($nullDate) . ' OR a.publish_down >= ' . $db->quote($now) . ')' - ) - ->order($order); - - // Join over Fields is no longer neded - - // Filter by language. - if ($app->isClient('site') && Multilanguage::isEnabled()) - { - $query->where('a.language in (' . $db->quote($tag) . ',' . $db->quote('*') . ')') - ->where('c.language in (' . $db->quote($tag) . ',' . $db->quote('*') . ')'); - } - - $db->setQuery($query, 0, $limit); - - try - { - $list3 = $db->loadObjectList(); - } - catch (RuntimeException $e) - { - $list3 = array(); - Factory::getApplication()->enqueueMessage(Text::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error'); - } - - // Find an itemid for archived to use if there isn't another one. - $item = $app->getMenu()->getItems('link', 'index.php?option=com_content&view=archive', true); - $itemid = isset($item->id) ? '&Itemid=' . $item->id : ''; - - if (isset($list3)) - { - foreach ($list3 as $key => $item) - { - $date = Factory::getDate($item->created); - - $created_month = $date->format('n'); - $created_year = $date->format('Y'); - - $list3[$key]->href = Route::_('index.php?option=com_content&view=archive&year=' . $created_year . '&month=' . $created_month . $itemid); - } - } - - $rows[] = $list3; - } - - $results = array(); - - if (count($rows)) - { - foreach ($rows as $row) - { - $new_row = array(); - - foreach ($row as $article) - { - // Not efficient to get these ONE article at a TIME - // Lookup field values so they can be checked, GROUP_CONCAT would work in above queries, but isn't supported by non-MySQL DBs. - $query = $db->getQuery(true); - $query->select('fv.value') - ->from('#__fields_values as fv') - ->join('left', '#__fields as f on fv.field_id = f.id') - ->where('f.context = ' . $db->quote('com_content.article')) - ->where('fv.item_id = ' . $db->quote((int) $article->slug)); - $db->setQuery($query); - $article->jcfields = implode(',', $db->loadColumn()); - - if (SearchHelper::checkNoHtml($article, $searchText, array('text', 'title', 'jcfields', 'metadesc', 'metakey'))) - { - $new_row[] = $article; - } - } - - $results = array_merge($results, (array) $new_row); - } - } - - return $results; - } -} diff --git a/plugins/search/content/content.xml b/plugins/search/content/content.xml deleted file mode 100644 index c0c21a1336eb1..0000000000000 --- a/plugins/search/content/content.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - plg_search_content - Joomla! Project - November 2005 - Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved. - GNU General Public License version 2 or later; see LICENSE.txt - admin@joomla.org - www.joomla.org - 3.0.0 - PLG_SEARCH_CONTENT_XML_DESCRIPTION - - content.php - - - en-GB.plg_search_content.ini - en-GB.plg_search_content.sys.ini - - - -
- - - - - - - - - - - -
- -
-
-
diff --git a/plugins/search/newsfeeds/newsfeeds.php b/plugins/search/newsfeeds/newsfeeds.php deleted file mode 100644 index cba25589b1bdc..0000000000000 --- a/plugins/search/newsfeeds/newsfeeds.php +++ /dev/null @@ -1,201 +0,0 @@ - 'PLG_SEARCH_NEWSFEEDS_NEWSFEEDS' - ); - - return $areas; - } - - /** - * Search content (newsfeeds). - * - * The SQL must return the following fields that are used in a common display - * routine: href, title, section, created, text, browsernav. - * - * @param string $text Target search string. - * @param string $phrase Matching option (possible values: exact|any|all). Default is "any". - * @param string $ordering Ordering option (possible values: newest|oldest|popular|alpha|category). Default is "newest". - * @param mixed $areas An array if the search it to be restricted to areas or null to search all areas. - * - * @return array Search results. - * - * @since 1.6 - */ - public function onContentSearch($text, $phrase = '', $ordering = '', $areas = null) - { - $db = Factory::getDbo(); - $app = Factory::getApplication(); - $user = Factory::getUser(); - $groups = implode(',', $user->getAuthorisedViewLevels()); - - if (is_array($areas) && !array_intersect($areas, array_keys($this->onContentSearchAreas()))) - { - return array(); - } - - $sContent = $this->params->get('search_content', 1); - $sArchived = $this->params->get('search_archived', 1); - $limit = $this->params->def('search_limit', 50); - $state = array(); - - if ($sContent) - { - $state[] = 1; - } - - if ($sArchived) - { - $state[] = 2; - } - - if (empty($state)) - { - return array(); - } - - $text = trim($text); - - if ($text === '') - { - return array(); - } - - switch ($phrase) - { - case 'exact': - $text = $db->quote('%' . $db->escape($text, true) . '%', false); - $wheres2 = array(); - $wheres2[] = 'a.name LIKE ' . $text; - $wheres2[] = 'a.link LIKE ' . $text; - $where = '(' . implode(') OR (', $wheres2) . ')'; - break; - - case 'all': - case 'any': - default: - $words = explode(' ', $text); - $wheres = array(); - - foreach ($words as $word) - { - $word = $db->quote('%' . $db->escape($word, true) . '%', false); - $wheres2 = array(); - $wheres2[] = 'a.name LIKE ' . $word; - $wheres2[] = 'a.link LIKE ' . $word; - $wheres[] = implode(' OR ', $wheres2); - } - - $where = '(' . implode(($phrase === 'all' ? ') AND (' : ') OR ('), $wheres) . ')'; - break; - } - - switch ($ordering) - { - case 'alpha': - $order = 'a.name ASC'; - break; - - case 'category': - $order = 'c.title ASC, a.name ASC'; - break; - - case 'oldest': - case 'popular': - case 'newest': - default: - $order = 'a.name ASC'; - } - - $searchNewsfeeds = Text::_('PLG_SEARCH_NEWSFEEDS_NEWSFEEDS'); - - $query = $db->getQuery(true); - - $case_when = ' CASE WHEN ' . $query->charLength('a.alias', '!=', '0') - . ' THEN ' . $query->concatenate(array($query->castAsChar('a.id'), 'a.alias'), ':') - . ' ELSE a.id END AS slug'; - - $case_when1 = ' CASE WHEN ' . $query->charLength('c.alias', '!=', '0') - . ' THEN ' . $query->concatenate(array($query->castAsChar('c.id'), 'c.alias'), ':') - . ' ELSE c.id END AS catslug'; - - $query->select('a.name AS title') - ->select($db->quote('') . ' AS created, a.link AS text') - ->select($case_when) - ->select($case_when1) - ->select($query->concatenate(array($db->quote($searchNewsfeeds), 'c.title'), ' / ') . ' AS section') - ->select($db->quote('1') . ' AS browsernav') - ->from($db->quoteName('#__newsfeeds', 'a')) - ->innerJoin($db->quoteName('#__categories', 'c') . ' ON c.id = a.catid') - ->where('(' . $where . ') AND a.published IN (' . implode(',', $state) . ') AND c.published = 1 AND c.access IN (' . $groups . ')') - ->order($order); - - // Filter by language. - if ($app->isClient('site') && Multilanguage::isEnabled()) - { - $tag = Factory::getLanguage()->getTag(); - $query->where('a.language in (' . $db->quote($tag) . ',' . $db->quote('*') . ')') - ->where('c.language in (' . $db->quote($tag) . ',' . $db->quote('*') . ')'); - } - - $db->setQuery($query, 0, $limit); - - try - { - $rows = $db->loadObjectList(); - } - catch (RuntimeException $e) - { - $rows = array(); - Factory::getApplication()->enqueueMessage(Text::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error'); - } - - if ($rows) - { - foreach ($rows as $key => $row) - { - $rows[$key]->href = 'index.php?option=com_newsfeeds&view=newsfeed&catid=' . $row->catslug . '&id=' . $row->slug; - } - } - - return $rows; - } -} diff --git a/plugins/search/newsfeeds/newsfeeds.xml b/plugins/search/newsfeeds/newsfeeds.xml deleted file mode 100644 index aad74a086104f..0000000000000 --- a/plugins/search/newsfeeds/newsfeeds.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - plg_search_newsfeeds - Joomla! Project - November 2005 - Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved. - GNU General Public License version 2 or later; see LICENSE.txt - admin@joomla.org - www.joomla.org - 3.0.0 - PLG_SEARCH_NEWSFEEDS_XML_DESCRIPTION - - newsfeeds.php - - - en-GB.plg_search_newsfeeds.ini - en-GB.plg_search_newsfeeds.sys.ini - - - -
- - - - - - - - - - - -
-
-
-
diff --git a/plugins/search/tags/tags.php b/plugins/search/tags/tags.php deleted file mode 100644 index bf304ded5533d..0000000000000 --- a/plugins/search/tags/tags.php +++ /dev/null @@ -1,222 +0,0 @@ - 'PLG_SEARCH_TAGS_TAGS' - ); - - return $areas; - } - - /** - * Search content (tags). - * - * The SQL must return the following fields that are used in a common display - * routine: href, title, section, created, text, browsernav. - * - * @param string $text Target search string. - * @param string $phrase Matching option (possible values: exact|any|all). Default is "any". - * @param string $ordering Ordering option (possible values: newest|oldest|popular|alpha|category). Default is "newest". - * @param string $areas An array if the search is to be restricted to areas or null to search all areas. - * - * @return array Search results. - * - * @since 3.3 - */ - public function onContentSearch($text, $phrase = '', $ordering = '', $areas = null) - { - $db = Factory::getDbo(); - $query = $db->getQuery(true); - $app = Factory::getApplication(); - $user = Factory::getUser(); - $lang = Factory::getLanguage(); - - $section = Text::_('PLG_SEARCH_TAGS_TAGS'); - $limit = $this->params->def('search_limit', 50); - - if (is_array($areas) && !array_intersect($areas, array_keys($this->onContentSearchAreas()))) - { - return array(); - } - - $text = trim($text); - - if ($text === '') - { - return array(); - } - - $text = $db->quote('%' . $db->escape($text, true) . '%', false); - - switch ($ordering) - { - case 'alpha': - $order = 'a.title ASC'; - break; - - case 'newest': - $order = 'a.created_time DESC'; - break; - - case 'oldest': - $order = 'a.created_time ASC'; - break; - - case 'popular': - default: - $order = 'a.title DESC'; - } - - $query->select('a.id, a.title, a.alias, a.note, a.published, a.access' - . ', a.checked_out, a.checked_out_time, a.created_user_id' - . ', a.path, a.parent_id, a.level, a.lft, a.rgt' - . ', a.language, a.created_time AS created, a.description'); - - $case_when_item_alias = ' CASE WHEN '; - $case_when_item_alias .= $query->charLength('a.alias', '!=', '0'); - $case_when_item_alias .= ' THEN '; - $a_id = $query->castAsChar('a.id'); - $case_when_item_alias .= $query->concatenate(array($a_id, 'a.alias'), ':'); - $case_when_item_alias .= ' ELSE '; - $case_when_item_alias .= $a_id . ' END as slug'; - $query->select($case_when_item_alias); - - $query->from('#__tags AS a'); - $query->where('a.alias <> ' . $db->quote('root')); - - $query->where('(a.title LIKE ' . $text . ' OR a.alias LIKE ' . $text . ')'); - - $query->where($db->quoteName('a.published') . ' = 1'); - - if (!$user->authorise('core.admin')) - { - $groups = implode(',', $user->getAuthorisedViewLevels()); - $query->where('a.access IN (' . $groups . ')'); - } - - if ($app->isClient('site') && Multilanguage::isEnabled()) - { - $tag = Factory::getLanguage()->getTag(); - $query->where('a.language in (' . $db->quote($tag) . ',' . $db->quote('*') . ')'); - } - - $query->order($order); - - $db->setQuery($query, 0, $limit); - - try - { - $rows = $db->loadObjectList(); - } - catch (RuntimeException $e) - { - $rows = array(); - Factory::getApplication()->enqueueMessage(Text::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error'); - } - - if ($rows) - { - JLoader::register('TagsHelperRoute', JPATH_SITE . '/components/com_tags/helpers/route.php'); - - foreach ($rows as $key => $row) - { - $rows[$key]->href = TagsHelperRoute::getTagRoute($row->slug); - $rows[$key]->text = ($row->description !== '' ? $row->description : $row->title); - $rows[$key]->text .= $row->note; - $rows[$key]->section = $section; - $rows[$key]->created = $row->created; - $rows[$key]->browsernav = 0; - } - } - - if (!$this->params->get('show_tagged_items', 0)) - { - return $rows; - } - else - { - $final_items = $rows; - $tag_model = Factory::getApplication()->bootComponent('com_tags') - ->getMVCFactory()->createModel('Tag', 'Site'); - $tag_model->getState(); - - foreach ($rows as $key => $row) - { - $tag_model->setState('tag.id', $row->id); - $tagged_items = $tag_model->getItems(); - - if ($tagged_items) - { - foreach ($tagged_items as $k => $item) - { - // For 3rd party extensions we need to load the component strings from its sys.ini file - $parts = explode('.', $item->type_alias); - $comp = array_shift($parts); - $lang->load($comp, JPATH_SITE, null, false, true) - || $lang->load($comp, JPATH_SITE . '/components/' . $comp, null, false, true); - - // Making up the type string - $type = implode('_', $parts); - $type = $comp . '_CONTENT_TYPE_' . $type; - - $new_item = new stdClass; - $new_item->href = $item->link; - $new_item->title = $item->core_title; - $new_item->text = $item->core_body; - - if ($lang->hasKey($type)) - { - $new_item->section = Text::sprintf('PLG_SEARCH_TAGS_ITEM_TAGGED_WITH', Text::_($type), $row->title); - } - else - { - $new_item->section = Text::sprintf('PLG_SEARCH_TAGS_ITEM_TAGGED_WITH', $item->content_type_title, $row->title); - } - - $new_item->created = $item->displayDate; - $new_item->browsernav = 0; - $final_items[] = $new_item; - } - } - } - - return $final_items; - } - } -} diff --git a/plugins/search/tags/tags.xml b/plugins/search/tags/tags.xml deleted file mode 100644 index 351e89c310b5b..0000000000000 --- a/plugins/search/tags/tags.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - plg_search_tags - Joomla! Project - March 2014 - Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved. - GNU General Public License version 2 or later; see LICENSE.txt - admin@joomla.org - www.joomla.org - 3.0.0 - PLG_SEARCH_TAGS_XML_DESCRIPTION - - tags.php - - - en-GB.plg_search_tags.ini - en-GB.plg_search_tags.sys.ini - - - -
- - - - - - -
-
-
-