Skip to content

Commit

Permalink
Eliminate URL-encoding of root_namespace
Browse files Browse the repository at this point in the history
This allows use of a root namespace more than one level deep.

Prior to this, use of e.g. `root:mantis` as namespace would result in a
mangled dokuwiki URL because the colon was encoded to `%3A`.

Fixes #24496
  • Loading branch information
rk4n3 authored and dregad committed Jun 5, 2018
1 parent 270ebdd commit 3a2caa0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions core/classes/MantisCoreWikiPlugin.class.php
Expand Up @@ -71,7 +71,7 @@ function base_url( $p_project_id = null ) {

$t_namespace = plugin_config_get( 'root_namespace' );
if( !is_blank( $t_namespace ) ) {
$t_base .= urlencode( $t_namespace ) . ':';
$t_base .= $t_namespace . ':';
}

if( !is_null( $p_project_id ) && $p_project_id != ALL_PROJECTS ) {
Expand Down Expand Up @@ -130,7 +130,7 @@ function base_url( $p_project_id = null ) {
if( !is_null( $p_project_id ) && $p_project_id != ALL_PROJECTS ) {
$t_base .= urlencode( project_get_name( $p_project_id ) ) . ':';
} else {
$t_base .= urlencode( plugin_config_get( 'root_namespace' ) );
$t_base .= plugin_config_get( 'root_namespace' );
}
return $t_base;
}
Expand Down Expand Up @@ -185,7 +185,7 @@ function base_url( $p_project_id = null ) {

$t_namespace = plugin_config_get( 'root_namespace' );
if( !is_blank( $t_namespace ) ) {
$t_base .= urlencode( $t_namespace ) . '/';
$t_base .= $t_namespace . '/';
}

if( !is_null( $p_project_id ) && $p_project_id != ALL_PROJECTS ) {
Expand Down Expand Up @@ -244,7 +244,7 @@ function base_url( $p_project_id = null ) {

$t_namespace = ucfirst( plugin_config_get( 'root_namespace' ) );
if( !is_blank( $t_namespace ) ) {
$t_base .= urlencode( $t_namespace );
$t_base .= $t_namespace;
}

if( !is_null( $p_project_id ) && $p_project_id != ALL_PROJECTS ) {
Expand Down Expand Up @@ -303,7 +303,7 @@ function base_url( $p_project_id = null ) {
if( !is_null( $p_project_id ) && $p_project_id != ALL_PROJECTS ) {
$t_base .= urlencode( project_get_name( $p_project_id ) ) . '/';
} else {
$t_base .= urlencode( plugin_config_get( 'root_namespace' ) );
$t_base .= plugin_config_get( 'root_namespace' );
}
return $t_base;
}
Expand Down

0 comments on commit 3a2caa0

Please sign in to comment.