Commit 56e98d20 authored by sylvieg's avatar sylvieg

[FIX]link: self_link (ex: in page history) with a page name with a comma....

[FIX]link: self_link (ex: in page history) with a page name with a comma. Dirty trick: the param page is never multivalued
parent 75934649
......@@ -51,8 +51,11 @@ function smarty_function_query($params, $smarty) {
foreach( $params as $param_name => $param_value ) {
// Arguments starting with an underscore are special and must not be included in URL
if ( $param_name[0] == '_' ) continue;
$list = explode(",",$param_value);
if ($param_name == 'page') {
$list = array($param_value);
} else {
$list = explode(",",$param_value);
}
if ( isset($_REQUEST[$param_name]) and in_array($_REQUEST[$param_name],$list) ) {
$query[$param_name] = $list[(array_search($_REQUEST[$param_name],$list)+1)%count($list)];
if ( $query[$param_name] === NULL or $query[$param_name] == 'NULL' ) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment