CoreFiles by mySites.guru
SearchesController.php44 lines, 976 bytes, from Joomla_4.0.0-beta4-Beta-Full_Package.zip
Raw History Compare with 4.0.0-beta3
md5
691a33d60aeb09f122084289955399c8
sha1
c303e41253978a3b1f52865128d2320d12fd7dae
sha256
2d8b14fb211dd56ef74f1aa8be5cf52af9077260738a970c1908f4ce004e64cc
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_finder
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\Component\Finder\Administrator\Controller;

\defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Session\Session;

/**
 * Methods supporting a list of search terms.
 *
 * @since  4.0.0
 */
class SearchesController extends BaseController
{
	/**
	 * Method to reset the search log table.
	 *
	 * @return  void
	 */
	public function reset()
	{
		// Check for request forgeries.
		Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));

		$model = $this->getModel('Searches');

		if (!$model->reset())
		{
			$this->app->enqueueMessage($model->getError(), 'error');
		}

		$this->setRedirect('index.php?option=com_finder&view=searches');
	}
}

The same content is in 5 releases, Joomla 4.0.0-beta to 4.0.0-beta5. See them all, or every version of this file.