git-svn-id: https://192.168.0.254/svn/Proyectos.FundacionLQDVI_WebCongresos/trunk@2 94ccb1af-fd9d-d947-8d90-7f70ea60afc8
50 lines
1.0 KiB
PHP
50 lines
1.0 KiB
PHP
<?php
|
|
/**
|
|
* @version 2.0.9 alpharegistration $
|
|
* @package alpharegistration
|
|
* @copyright Copyright © 2009 - Bernard Gilly - All rights reserved.
|
|
* @license GNU/GPL
|
|
* @author Bernard Gilly
|
|
* @author mail contact@alphaplug.com
|
|
* @website www.alphaplug.com
|
|
*/
|
|
|
|
// no direct access
|
|
defined('_JEXEC') or die('Restricted access');
|
|
|
|
function AlpharegistrationBuildRoute(&$query)
|
|
{
|
|
$segments = array();
|
|
|
|
if(isset($query['view']))
|
|
{
|
|
if(empty($query['Itemid'])) {
|
|
$segments[] = $query['view'];
|
|
} else {
|
|
$menu = &JSite::getMenu();
|
|
$menuItem = &$menu->getItem( $query['Itemid'] );
|
|
if(!isset($menuItem->query['view']) || $menuItem->query['view'] != $query['view']) {
|
|
$segments[] = $query['view'];
|
|
}
|
|
}
|
|
unset($query['view']);
|
|
}
|
|
return $segments;
|
|
}
|
|
|
|
function AlpharegistrationParseRoute($segments)
|
|
{
|
|
$vars = array();
|
|
|
|
$count = count($segments);
|
|
if(!empty($count)) {
|
|
$vars['view'] = $segments[0];
|
|
}
|
|
|
|
if($count > 1) {
|
|
$vars['id'] = $segments[$count - 1];
|
|
}
|
|
|
|
return $vars;
|
|
}
|
|
?>
|