From 3b754829b86c36edd598c0a6a5fa800c2f661c68 Mon Sep 17 00:00:00 2001 From: Johan Janssens Date: Tue, 26 May 2015 01:19:36 +0200 Subject: [PATCH] #50 - Remove search term logging functionality and user interface. --- .../components/com_search/access.xml | 8 - .../components/com_search/config.xml | 68 ------ .../components/com_search/controller.php | 45 ---- .../com_search/controllers/index.html | 1 - .../com_search/controllers/searches.php | 40 ---- .../components/com_search/helpers/index.html | 1 - .../components/com_search/helpers/search.php | 34 +-- .../components/com_search/helpers/site.php | 41 ---- .../components/com_search/index.html | 1 - .../components/com_search/models/index.html | 1 - .../components/com_search/models/searches.php | 195 ------------------ .../components/com_search/search.php | 19 -- .../components/com_search/search.xml | 43 ---- .../components/com_search/views/index.html | 1 - .../com_search/views/searches/index.html | 1 - .../views/searches/tmpl/default.php | 113 ---------- .../com_search/views/searches/tmpl/index.html | 1 - .../com_search/views/searches/view.html.php | 74 ------- .../language/en-GB/en-GB.com_search.ini | 43 ---- .../language/en-GB/en-GB.com_search.sys.ini | 10 - administrator/language/en-GB/en-GB.ini | 1 - administrator/language/en-GB/install.xml | 2 - .../com_finder/views/search/view.html.php | 3 - .../com_search/views/search/view.html.php | 3 - installation/sql/mysql/joomla.sql | 13 -- installation/sql/mysql/sample_testing.sql | 2 - libraries/cms/search/helper.php | 72 ------- libraries/cms/search/index.html | 1 - tests/system/suite/acl/acl0001Test.php | 4 - .../webdriver/Pages/System/AdminPage.php | 1 - tests/unit/stubs/database/jos_assets.csv | 1 - .../unit/stubs/database/jos_update_sites.csv | 4 - .../database/jos_update_sites_extensions.csv | 4 - .../cms/search/JSearchHelperTest.php | 28 --- .../libraries/joomla/utilities/stubs/test.xml | 4 - 35 files changed, 2 insertions(+), 881 deletions(-) delete mode 100644 administrator/components/com_search/access.xml delete mode 100644 administrator/components/com_search/config.xml delete mode 100644 administrator/components/com_search/controller.php delete mode 100644 administrator/components/com_search/controllers/index.html delete mode 100644 administrator/components/com_search/controllers/searches.php delete mode 100644 administrator/components/com_search/helpers/index.html delete mode 100644 administrator/components/com_search/helpers/site.php delete mode 100644 administrator/components/com_search/index.html delete mode 100644 administrator/components/com_search/models/index.html delete mode 100644 administrator/components/com_search/models/searches.php delete mode 100644 administrator/components/com_search/search.php delete mode 100644 administrator/components/com_search/search.xml delete mode 100644 administrator/components/com_search/views/index.html delete mode 100644 administrator/components/com_search/views/searches/index.html delete mode 100644 administrator/components/com_search/views/searches/tmpl/default.php delete mode 100644 administrator/components/com_search/views/searches/tmpl/index.html delete mode 100644 administrator/components/com_search/views/searches/view.html.php delete mode 100644 administrator/language/en-GB/en-GB.com_search.ini delete mode 100644 administrator/language/en-GB/en-GB.com_search.sys.ini delete mode 100644 libraries/cms/search/helper.php delete mode 100644 libraries/cms/search/index.html delete mode 100644 tests/unit/stubs/database/jos_update_sites.csv delete mode 100644 tests/unit/stubs/database/jos_update_sites_extensions.csv delete mode 100644 tests/unit/suites/libraries/cms/search/JSearchHelperTest.php diff --git a/administrator/components/com_search/access.xml b/administrator/components/com_search/access.xml deleted file mode 100644 index 2c9a44e704..0000000000 --- a/administrator/components/com_search/access.xml +++ /dev/null @@ -1,8 +0,0 @@ - - -
- - - -
-
diff --git a/administrator/components/com_search/config.xml b/administrator/components/com_search/config.xml deleted file mode 100644 index 4f26819028..0000000000 --- a/administrator/components/com_search/config.xml +++ /dev/null @@ -1,68 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - -
- -
- - -
-
diff --git a/administrator/components/com_search/controller.php b/administrator/components/com_search/controller.php deleted file mode 100644 index d1b9d8fd00..0000000000 --- a/administrator/components/com_search/controller.php +++ /dev/null @@ -1,45 +0,0 @@ -input->get('view', 'searches')); - - parent::display(); - } -} diff --git a/administrator/components/com_search/controllers/index.html b/administrator/components/com_search/controllers/index.html deleted file mode 100644 index 2efb97f319..0000000000 --- a/administrator/components/com_search/controllers/index.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/administrator/components/com_search/controllers/searches.php b/administrator/components/com_search/controllers/searches.php deleted file mode 100644 index 82cfe356c0..0000000000 --- a/administrator/components/com_search/controllers/searches.php +++ /dev/null @@ -1,40 +0,0 @@ -getModel('Searches'); - - if (!$model->reset()) - { - JError::raiseWarning(500, $model->getError()); - } - - $this->setRedirect('index.php?option=com_search&view=searches'); - } -} diff --git a/administrator/components/com_search/helpers/index.html b/administrator/components/com_search/helpers/index.html deleted file mode 100644 index 2efb97f319..0000000000 --- a/administrator/components/com_search/helpers/index.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/administrator/components/com_search/helpers/search.php b/administrator/components/com_search/helpers/search.php index 7bf046e972..06a33ec062 100644 --- a/administrator/components/com_search/helpers/search.php +++ b/administrator/components/com_search/helpers/search.php @@ -18,35 +18,6 @@ */ class SearchHelper { - /** - * Configure the Linkbar. - * - * @param string The name of the active view. - * @since 1.6 - */ - public static function addSubmenu($vName) - { - // Not required. - } - - /** - * Gets a list of the actions that can be performed. - * - * @return JObject - * - * @deprecated 3.2 Use JHelperContent::getActions() instead - */ - public static function getActions() - { - // Log usage of deprecated function - JLog::add(__METHOD__ . '() is deprecated, use JHelperContent::getActions() with new arguments order instead.', JLog::WARNING, 'deprecated'); - - // Get list of actions - $result = JHelperContent::getActions('com_search'); - - return $result; - } - public static function santiseSearchWord(&$searchword, $searchphrase) { $ignored = false; @@ -129,13 +100,12 @@ public static function limitSearchWord(&$searchword) * @return void * * @since 1.5 - * @deprecated 4.0 Use JSearchHelper::logSearch() instead + * @deprecated */ public static function logSearch($search_term) { - JLog::add(__METHOD__ . '() is deprecated, use JSearchHelper::logSearch() instead.', JLog::WARNING, 'deprecated'); + JLog::add(__METHOD__ . '() is deprecated', JLog::WARNING, 'deprecated'); - JSearchHelper::logSearch($search_term, 'com_search'); } /** diff --git a/administrator/components/com_search/helpers/site.php b/administrator/components/com_search/helpers/site.php deleted file mode 100644 index 71c51e4300..0000000000 --- a/administrator/components/com_search/helpers/site.php +++ /dev/null @@ -1,41 +0,0 @@ - diff --git a/administrator/components/com_search/models/index.html b/administrator/components/com_search/models/index.html deleted file mode 100644 index 2efb97f319..0000000000 --- a/administrator/components/com_search/models/index.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/administrator/components/com_search/models/searches.php b/administrator/components/com_search/models/searches.php deleted file mode 100644 index b0441cac8a..0000000000 --- a/administrator/components/com_search/models/searches.php +++ /dev/null @@ -1,195 +0,0 @@ -getUserStateFromRequest($this->context . '.filter.search', 'filter_search', false, 'string', false); - $this->setState('filter.search', $search); - - $showResults = $this->getUserStateFromRequest($this->context . '.filter.results', 'filter_results', null, 'int', false); - $this->setState('filter.results', $showResults); - - // Load the parameters. - $params = JComponentHelper::getParams('com_search'); - $this->setState('params', $params); - - // List state information. - parent::populateState('a.hits', 'asc'); - } - - /** - * 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('filter.search'); - $id .= ':' . $this->getState('filter.results'); - - 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') . ' AS a'); - - // Filter by access level. - if ($access = $this->getState('filter.access')) - { - $query->where('a.access = ' . (int) $access); - } - - // Filter by search in title - $search = $this->getState('filter.search'); - if (!empty($search)) - { - $search = $db->quote('%' . str_replace(' ', '%', $db->escape(trim($search), true) . '%')); - $query->where('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'))); - - //echo nl2br(str_replace('#__','jos_',$query)); - return $query; - } - - /** - * Override the parnet 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('filter.results')) - { - JPluginHelper::importPlugin('search'); - $app = JFactory::getApplication(); - - if (!class_exists('JSite')) - { - // This fools the routers in the search plugins into thinking it's in the frontend - JLoader::register('JSite', JPATH_COMPONENT . '/helpers/site.php'); - } - - 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 seach 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/search.php b/administrator/components/com_search/search.php deleted file mode 100644 index c8fe65ccb1..0000000000 --- a/administrator/components/com_search/search.php +++ /dev/null @@ -1,19 +0,0 @@ -authorise('core.manage', 'com_search')) -{ - return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR')); -} - -$controller = JControllerLegacy::getInstance('Search'); -$controller->execute(JFactory::getApplication()->input->get('task')); -$controller->redirect(); diff --git a/administrator/components/com_search/search.xml b/administrator/components/com_search/search.xml deleted file mode 100644 index b54f334d3c..0000000000 --- a/administrator/components/com_search/search.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - com_search - Joomla! Project - April 2006 - (C) 2005 - 2014 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 - COM_SEARCH_XML_DESCRIPTION - - - controller.php - index.html - router.php - search.php - models - views - - - language/en-GB.com_search.ini - - - Search - - config.xml - controller.php - index.html - search.php - controllers - helpers - models - views - - - language/en-GB.com_search.ini - language/en-GB.com_search.sys.ini - - - diff --git a/administrator/components/com_search/views/index.html b/administrator/components/com_search/views/index.html deleted file mode 100644 index 2efb97f319..0000000000 --- a/administrator/components/com_search/views/index.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/administrator/components/com_search/views/searches/index.html b/administrator/components/com_search/views/searches/index.html deleted file mode 100644 index 2efb97f319..0000000000 --- a/administrator/components/com_search/views/searches/index.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/administrator/components/com_search/views/searches/tmpl/default.php b/administrator/components/com_search/views/searches/tmpl/default.php deleted file mode 100644 index 731613de4c..0000000000 --- a/administrator/components/com_search/views/searches/tmpl/default.php +++ /dev/null @@ -1,113 +0,0 @@ -escape($this->state->get('list.ordering')); -$listDirn = $this->escape($this->state->get('list.direction')); -?> -
-
- - -
- - pagination->getLimitBox(); ?> -
-
- - state->get('filter.results')) : ?> - - - - - - - -
-
-
- enabled) : ?> -
- × - -
- -
- × - -
- - items)) : ?> -
- -
- - - - - - - - - - - - - - - - items as $i => $item) : ?> - - - - - - - -
- - - - - -
- pagination->getListFooter(); ?> -
- escape($item->search_term); ?> - - hits; ?> - - state->get('filter.results')) : ?> - returns; ?> - - - -
- -
- - - - - -
-
diff --git a/administrator/components/com_search/views/searches/tmpl/index.html b/administrator/components/com_search/views/searches/tmpl/index.html deleted file mode 100644 index 2efb97f319..0000000000 --- a/administrator/components/com_search/views/searches/tmpl/index.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/administrator/components/com_search/views/searches/view.html.php b/administrator/components/com_search/views/searches/view.html.php deleted file mode 100644 index 55343b49c0..0000000000 --- a/administrator/components/com_search/views/searches/view.html.php +++ /dev/null @@ -1,74 +0,0 @@ -items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); - $this->state = $this->get('State'); - $this->enabled = $this->state->params->get('enabled'); - $this->canDo = JHelperContent::getActions('com_search'); - - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode("\n", $errors)); - return false; - } - - $this->addToolbar(); - parent::display($tpl); - } - - /** - * Add the page title and toolbar. - * - * @since 1.6 - */ - protected function addToolbar() - { - $canDo = $this->canDo; - - JToolbarHelper::title(JText::_('COM_SEARCH_MANAGER_SEARCHES'), 'search'); - - if ($canDo->get('core.edit.state')) - { - JToolbarHelper::custom('searches.reset', 'refresh.png', 'refresh_f2.png', 'JSEARCH_RESET', false); - } - JToolbarHelper::divider(); - if ($canDo->get('core.admin')) - { - JToolbarHelper::preferences('com_search'); - } - JToolbarHelper::divider(); - JToolbarHelper::help('JHELP_COMPONENTS_SEARCH'); - } -} 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 97d6597f60..0000000000 --- a/administrator/language/en-GB/en-GB.com_search.ini +++ /dev/null @@ -1,43 +0,0 @@ -; Joomla! Project -; Copyright (C) 2005 - 2014 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_DESC="Show Created Date" -COM_SEARCH_CONFIG_FIELD_CREATED_DATE_LABEL="Created Date" -COM_SEARCH_CONFIG_GATHER_SEARCH_STATISTICS_DESC="Record the search phrases submitted by visitors." -COM_SEARCH_CONFIG_GATHER_SEARCH_STATISTICS_LABEL="Gather Search Statistics" -COM_SEARCH_CONFIG_FIELD_OPENSEARCH_NAME_LABEL="OpenSearch Name" -COM_SEARCH_CONFIG_FIELD_OPENSEARCH_NAME_DESC="Name displayed for this site as a search provider." -COM_SEARCH_CONFIG_FIELD_OPENSEARCH_DESCRIPTON_LABEL="OpenSearch Description" -COM_SEARCH_CONFIG_FIELD_OPENSEARCH_DESCRIPTON_DESC="Description displayed for this site as a search provider." -COM_SEARCH_CONFIGURATION="Search Manager Options" -COM_SEARCH_EXACT_PHRASE="Exact phrase" -COM_SEARCH_FIELD_DESC="Word, words or phrase to search for" -COM_SEARCH_FIELD_LABEL="Search Term (Optional)" -COM_SEARCH_FIELD_SEARCH_AREAS_DESC="Show the search areas checkboxes" -COM_SEARCH_FIELD_SEARCH_AREAS_LABEL="Use Search Areas" -COM_SEARCH_FIELDSET_OPTIONAL_LABEL="Optional Search Term" -COM_SEARCH_FOR_DESC="The type of search" -COM_SEARCH_FOR_LABEL="Search for" -COM_SEARCH_HEADING_PHRASE="Search Phrase" -COM_SEARCH_HEADING_RESULTS="Results" -COM_SEARCH_HIDE_SEARCH_RESULTS="Hide Search Results" -COM_SEARCH_LOGGING_DISABLED="Gathering statistics disabled" -COM_SEARCH_LOGGING_ENABLED="Gathering statistics enabled" -COM_SEARCH_MANAGER_SEARCHES="Search Manager: 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_DESC="Defines what ordering results are listed in" -COM_SEARCH_ORDERING_LABEL="Results ordering" -COM_SEARCH_SAVED_SEARCH_OPTIONS="Saved search options" -COM_SEARCH_SEARCH_IN_PHRASE="Search in phrases." -COM_SEARCH_SHOW_SEARCH_RESULTS="Show 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 f3e9f40d49..0000000000 --- a/administrator/language/en-GB/en-GB.com_search.sys.ini +++ /dev/null @@ -1,10 +0,0 @@ -; Joomla! Project -; Copyright (C) 2005 - 2014 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 8d7802688f..43495f58b5 100644 --- a/administrator/language/en-GB/en-GB.ini +++ b/administrator/language/en-GB/en-GB.ini @@ -580,7 +580,6 @@ JHELP_COMPONENTS_COM_MENUS_OPTIONS="Components_Menus_Configuration" JHELP_COMPONENTS_COM_MODULES_OPTIONS="Components_Module_Manager_Options" JHELP_COMPONENTS_COM_PLUGINS_OPTIONS="Components_Plug-in_Manager_Options" JHELP_COMPONENTS_COM_POSTINSTALL_OPTIONS="Components_Post_installation_Messages_Configuration" -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/install.xml b/administrator/language/en-GB/install.xml index cb60734165..92d2d230b1 100644 --- a/administrator/language/en-GB/install.xml +++ b/administrator/language/en-GB/install.xml @@ -43,8 +43,6 @@ en-GB.com_modules.sys.ini en-GB.com_plugins.ini en-GB.com_plugins.sys.ini - en-GB.com_search.ini - en-GB.com_search.sys.ini en-GB.com_tags.ini en-GB.com_tags.sys.ini en-GB.com_templates.ini diff --git a/components/com_finder/views/search/view.html.php b/components/com_finder/views/search/view.html.php index 6c74e50308..18209b443e 100644 --- a/components/com_finder/views/search/view.html.php +++ b/components/com_finder/views/search/view.html.php @@ -85,9 +85,6 @@ public function display($tpl = null) } } - // Log the search - JSearchHelper::logSearch($this->query->input, 'com_finder'); - // Push out the query data. JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); $this->suggested = JHtml::_('query.suggested', $query); diff --git a/components/com_search/views/search/view.html.php b/components/com_search/views/search/view.html.php index 2ac1a05616..b5332581fe 100644 --- a/components/com_search/views/search/view.html.php +++ b/components/com_search/views/search/view.html.php @@ -106,9 +106,6 @@ public function display($tpl = null) $searchphrases[] = JHtml::_('select.option', 'exact', JText::_('COM_SEARCH_EXACT_PHRASE')); $lists['searchphrase'] = JHtml::_('select.radiolist', $searchphrases, 'searchphrase', '', 'value', 'text', $state->get('match')); - // Log the search - JSearchHelper::logSearch($searchword, 'com_search'); - // Limit searchword $lang = JFactory::getLanguage(); $upper_limit = $lang->getUpperLimitSearchWord(); diff --git a/installation/sql/mysql/joomla.sql b/installation/sql/mysql/joomla.sql index adc44991c2..bbcb64d27a 100644 --- a/installation/sql/mysql/joomla.sql +++ b/installation/sql/mysql/joomla.sql @@ -45,7 +45,6 @@ INSERT INTO `#__assets` (`id`, `parent_id`, `lft`, `rgt`, `level`, `name`, `titl (16, 1, 35, 36, 1, 'com_menus', 'com_menus', '{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'), (18, 1, 39, 70, 1, 'com_modules', 'com_modules', '{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'), (20, 1, 75, 76, 1, 'com_plugins', 'com_plugins', '{"core.admin":{"7":1},"core.manage":[],"core.edit":[],"core.edit.state":[]}'), -(22, 1, 79, 80, 1, 'com_search', 'com_search', '{"core.admin":{"7":1},"core.manage":{"6":1}}'), (23, 1, 81, 82, 1, 'com_templates', 'com_templates', '{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'), (24, 1, 83, 86, 1, 'com_users', 'com_users', '{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'), (27, 8, 18, 19, 2, 'com_content.category.2', 'Uncategorised', '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[],"core.edit.own":[]}'), @@ -264,17 +263,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=utf8; - --- -------------------------------------------------------- - -- -- Table structure for table `#__extensions` -- @@ -320,7 +308,6 @@ INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder` (14, 'com_menus', 'component', 'com_menus', '', 1, 1, 1, 1, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0), (16, 'com_modules', 'component', 'com_modules', '', 1, 1, 1, 1, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0), (18, 'com_plugins', 'component', 'com_plugins', '', 1, 1, 1, 1, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0), -(19, 'com_search', 'component', 'com_search', '', 1, 1, 1, 0, '', '{"enabled":"0","show_date":"1"}', '', '', 0, '0000-00-00 00:00:00', 0, 0), (20, 'com_templates', 'component', 'com_templates', '', 1, 1, 1, 1, '', '{"template_positions_display":"0","upload_limit":"2","image_formats":"gif,bmp,jpg,jpeg,png","source_formats":"txt,less,ini,xml,js,php,css","font_formats":"woff,ttf,otf","compressed_formats":"zip"}', '', '', 0, '0000-00-00 00:00:00', 0, 0), (22, '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_readmore":"1","show_readmore_title":"1","readmore_limit":"100","show_icons":"1","show_print_icon":"1","show_email_icon":"1","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_columns":"2","num_links":"4","multi_column_order":"0","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), (23, '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":"NONE","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), diff --git a/installation/sql/mysql/sample_testing.sql b/installation/sql/mysql/sample_testing.sql index 4c7b36f971..6936842317 100644 --- a/installation/sql/mysql/sample_testing.sql +++ b/installation/sql/mysql/sample_testing.sql @@ -28,7 +28,6 @@ INSERT IGNORE INTO `#__assets` (`id`, `parent_id`, `lft`, `rgt`, `level`, `name` (16, 1, 318, 319, 1, 'com_menus', 'com_menus', '{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'), (18, 1, 322, 323, 1, 'com_modules', 'com_modules', '{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'), (20, 1, 332, 333, 1, 'com_plugins', 'com_plugins', '{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'), -(22, 1, 336, 337, 1, 'com_search', 'com_search', '{"core.admin":{"7":1},"core.manage":{"6":1}}'), (23, 1, 338, 339, 1, 'com_templates', 'com_templates', '{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'), (24, 1, 340, 343, 1, 'com_users', 'com_users', '{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}'), (33, 1, 424, 425, 1, 'com_finder', 'com_finder', '{"core.admin":{"7":1},"core.manage":{"6":1}}'), @@ -245,7 +244,6 @@ INSERT INTO `#__contentitem_tag_map` (`type_alias`, `core_content_id`, `content_ INSERT IGNORE 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`) VALUES (1, '', 'Menu_Item_Root', 'root', '', '', '', '', 1, 0, 0, 0, 0, '0000-00-00 00:00:00', 0, 0, '', 0, '', 0, 275, 0, '*', 0), -(17, 'menu', 'com_search', 'Basic Search', '', 'Basic Search', 'index.php?option=com_search', 'component', 0, 1, 1, 19, 0, '0000-00-00 00:00:00', 0, 0, 'class:search', 0, '', 35, 36, 0, '*', 1), (21, 'menu', 'com_finder', 'Smart Search', '', 'Smart Search', 'index.php?option=com_finder', 'component', 0, 1, 1, 27, 0, '0000-00-00 00:00:00', 0, 0, 'class:finder', 0, '', 33, 34, 0, '*', 1), (201, 'usermenu', 'Your Profile', 'your-profile', '', 'your-profile', 'index.php?option=com_users&view=profile', 'component', 1, 1, 1, 25, 0, '0000-00-00 00:00:00', 0, 2, '', 0, '{"menu-anchor_title":"","menu-anchor_css":"","menu_image":"","menu_text":1,"page_title":"","show_page_heading":0,"page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}', 95, 96, 0, '*', 0), (207, 'top', 'Joomla.org', 'joomlaorg', '', 'joomlaorg', 'http://joomla.org', 'url', 1, 1, 1, 0, 0, '0000-00-00 00:00:00', 0, 1, '', 0, '{"menu-anchor_title":"","menu-anchor_css":"","menu_image":""}', 93, 94, 0, '*', 0), diff --git a/libraries/cms/search/helper.php b/libraries/cms/search/helper.php deleted file mode 100644 index 6742ba4e7f..0000000000 --- a/libraries/cms/search/helper.php +++ /dev/null @@ -1,72 +0,0 @@ -getQuery(true); - $enable_log_searches = JComponentHelper::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 = intval($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/libraries/cms/search/index.html b/libraries/cms/search/index.html deleted file mode 100644 index 2efb97f319..0000000000 --- a/libraries/cms/search/index.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/tests/system/suite/acl/acl0001Test.php b/tests/system/suite/acl/acl0001Test.php index 219623e483..e960f89aa4 100644 --- a/tests/system/suite/acl/acl0001Test.php +++ b/tests/system/suite/acl/acl0001Test.php @@ -22,8 +22,6 @@ function testAclGroupCreation() $this->assertTrue($this->isElementPresent("//ul[@id='menu-com-menus-menus']"), 'Menus should be visible'); - $this->assertTrue($this->isElementPresent("//a[@href='index.php?option=com_search']"), 'Search should be visible'); - $this->assertTrue($this->isElementPresent("//a[@href='index.php?option=com_installer']"), 'Extensions should be visible'); $this->assertTrue($this->isElementPresent("//ul[@id='menu-com-menus-menus']"), 'Menu Manager should not be visible'); @@ -64,8 +62,6 @@ function testAclGroupCreation() $this->assertFalse($this->isElementPresent("//ul[@id='menu-com-users-users']"), 'Users menu should not be visible'); $this->assertFalse($this->isElementPresent("//ul[@id='menu-com-users-groups']"), 'Groups should not be visible'); - $this->assertFalse($this->isElementPresent("//a[@href='index.php?option=com_search']"), 'Search should not be visible'); - $this->assertFalse($this->isElementPresent("//a[contains(@href, 'option=com_installer')]"), 'Extensions should not be visible'); $this->assertFalse($this->isElementPresent("//a[contains(@href, 'option=com_menus')]"), 'Menu Manager should not be visible'); $this->assertFalse($this->isElementPresent("//a[contains(@href, 'option=com_modules')]"), 'Module Manager should not be visible'); diff --git a/tests/system/webdriver/Pages/System/AdminPage.php b/tests/system/webdriver/Pages/System/AdminPage.php index ff10208b99..3314716ec6 100644 --- a/tests/system/webdriver/Pages/System/AdminPage.php +++ b/tests/system/webdriver/Pages/System/AdminPage.php @@ -109,7 +109,6 @@ abstract class AdminPage 'Featured Articles' => 'administrator/index.php?option=com_content&view=featured', 'Media Manager' => 'administrator/index.php?option=com_media', 'Components' => 'administrator/index.php#', - 'Search' => 'administrator/index.php?option=com_search', 'Smart Search' => 'administrator/index.php?option=com_finder', 'Weblinks' => 'administrator/index.php?option=com_weblinks', 'Links' => 'administrator/index.php?option=com_weblinks', diff --git a/tests/unit/stubs/database/jos_assets.csv b/tests/unit/stubs/database/jos_assets.csv index 64d0186b68..dbf1f4cf08 100644 --- a/tests/unit/stubs/database/jos_assets.csv +++ b/tests/unit/stubs/database/jos_assets.csv @@ -13,7 +13,6 @@ '16','1','312','313','1','com_menus','com_menus','{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}' '18','1','316','317','1','com_modules','com_modules','{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}' '20','1','326','327','1','com_plugins','com_plugins','{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}' -'22','1','330','331','1','com_search','com_search','{"core.admin":{"7":1},"core.manage":{"6":1}}' '23','1','332','333','1','com_templates','com_templates','{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}' '24','1','334','337','1','com_users','com_users','{"core.admin":{"7":1},"core.manage":[],"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[]}' '25','1','338','355','1','com_weblinks','com_weblinks','{"core.admin":{"7":1},"core.manage":{"6":1},"core.create":{"3":1,"10":0,"12":0},"core.delete":[],"core.edit":{"4":1},"core.edit.state":{"5":1}}' diff --git a/tests/unit/stubs/database/jos_update_sites.csv b/tests/unit/stubs/database/jos_update_sites.csv deleted file mode 100644 index c2bbb9dcdc..0000000000 --- a/tests/unit/stubs/database/jos_update_sites.csv +++ /dev/null @@ -1,4 +0,0 @@ -'update_site_id','name','type','location','enabled','last_check_timestamp' -'1','Joomla Core','collection','http://update.joomla.org/core/list.xml','1','0' -'2','Joomla Extension Directory','collection','http://update.joomla.org/jed/list.xml','1','0' -'3','Accredited Joomla! Translations','collection','http://update.joomla.org/language/translationlist_3.xml','1','0' diff --git a/tests/unit/stubs/database/jos_update_sites_extensions.csv b/tests/unit/stubs/database/jos_update_sites_extensions.csv deleted file mode 100644 index f80af626aa..0000000000 --- a/tests/unit/stubs/database/jos_update_sites_extensions.csv +++ /dev/null @@ -1,4 +0,0 @@ -'update_site_id','extension_id' -'1','700' -'2','700' -'3','600' diff --git a/tests/unit/suites/libraries/cms/search/JSearchHelperTest.php b/tests/unit/suites/libraries/cms/search/JSearchHelperTest.php deleted file mode 100644 index 5601210306..0000000000 --- a/tests/unit/suites/libraries/cms/search/JSearchHelperTest.php +++ /dev/null @@ -1,28 +0,0 @@ -markTestIncomplete('This test has not been implemented yet.' - ); - } -} diff --git a/tests/unit/suites/libraries/joomla/utilities/stubs/test.xml b/tests/unit/suites/libraries/joomla/utilities/stubs/test.xml index 222372b377..9722692cb5 100644 --- a/tests/unit/suites/libraries/joomla/utilities/stubs/test.xml +++ b/tests/unit/suites/libraries/joomla/utilities/stubs/test.xml @@ -308,10 +308,6 @@ rating_count lastip - - search_term - hits -
extension_idname