joomla_test/components/com_search/router.php

41 lines
675 B
PHP
Raw Permalink Normal View History

2020-01-02 22:20:31 +07:00
<?php
/**
* @package Joomla.Site
* @subpackage com_search
*
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* @param array
* @return array
*/
function SearchBuildRoute(&$query)
{
$segments = array();
if (isset($query['view']))
{
unset($query['view']);
}
return $segments;
}
/**
* @param array
* @return array
*/
function SearchParseRoute($segments)
{
$vars = array();
$searchword = array_shift($segments);
$vars['searchword'] = $searchword;
$vars['view'] = 'search';
return $vars;
}