mirror of
https://github.com/e107inc/e107.git
synced 2025-08-29 17:19:56 +02:00
- Custom Pages front-end almost completely rewritten, backend fixes, SEF URL support, introducing page batch shortcodes and templates (available per page), compatibility stylesheet added (core css and jayya theme), tagwords plugin links proper to new pages URLs;
- Large number of system stability fixes and obsolete code replacement
This commit is contained in:
@@ -1750,6 +1750,20 @@ class eRouter
|
||||
return call_user_func_array(array($obj, $callBack), $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert assembled url to shortcode
|
||||
*
|
||||
* @param string $route
|
||||
* @param array $params
|
||||
* @param array $options {@see eRouter::$_defaultAssembleOptions}
|
||||
*/
|
||||
public function assembleSc($route, $params = array(), $options = array())
|
||||
{
|
||||
//if(is_string($options)) parse_str($options, $options);
|
||||
$url = $this->assemble($route, $params, $options);
|
||||
return e107::getParser()->createConstants($url, 'mix');
|
||||
}
|
||||
|
||||
/**
|
||||
* Assemble system URL
|
||||
* Examples:
|
||||
@@ -1772,7 +1786,7 @@ class eRouter
|
||||
if(is_string($options)) parse_str($options, $options);
|
||||
$options = array_merge($this->_defaultAssembleOptions, $options);
|
||||
$base = ($options['full'] ? SITEURLBASE : '').$request->getBasePath();
|
||||
|
||||
|
||||
$anc = '';
|
||||
|
||||
if(is_string($params)) parse_str($params, $params);
|
||||
@@ -1782,6 +1796,30 @@ class eRouter
|
||||
usnet($params['#']);
|
||||
}
|
||||
|
||||
// Config independent - Deny parameter keys, useful for directly denying sensitive data e.g. password db fields
|
||||
if(isset($options['deny']))
|
||||
{
|
||||
$list = array_map('trim', explode(',', $options['deny']));
|
||||
foreach ($list as $value)
|
||||
{
|
||||
unset($params[$value]);
|
||||
}
|
||||
unset($list);
|
||||
}
|
||||
|
||||
// Config independent - allow parameter keys, useful to directly allow data (and not to rely on config allowVars) e.g. when retrieved from db
|
||||
if(isset($options['allow']))
|
||||
{
|
||||
$list = array_map('trim', explode(',', $options['allow']));
|
||||
$_params = $params;
|
||||
$params = array();
|
||||
foreach ($list as $value)
|
||||
{
|
||||
if(isset($_params[$value])) $params[$value] = $_params[$value];
|
||||
}
|
||||
unset($list, $_params);
|
||||
}
|
||||
|
||||
# Optional convenient masks for creating system URL's
|
||||
if($route === '/' || empty($route))
|
||||
{
|
||||
|
Reference in New Issue
Block a user