mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-27 20:10:18 +02:00
[ticket/11997] Remove obsolete function get_controller_redirect_url()
PHPBB3-11997
This commit is contained in:
@@ -184,30 +184,6 @@ class path_helper
|
|||||||
return $this->web_root_path = $this->phpbb_root_path . str_repeat('../', $corrections - 1);
|
return $this->web_root_path = $this->phpbb_root_path . str_repeat('../', $corrections - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the redirect URL for controllers
|
|
||||||
*
|
|
||||||
* @param string $url URL to the controller
|
|
||||||
*
|
|
||||||
* @param string Redirect URL for controller
|
|
||||||
*/
|
|
||||||
public function get_controller_redirect_url($url)
|
|
||||||
{
|
|
||||||
// Remove predecing dots
|
|
||||||
$url = ltrim($this->remove_web_root_path($url), '.');
|
|
||||||
|
|
||||||
// Get position of URL delimiter
|
|
||||||
$delimiter_position = strpos($url, '/');
|
|
||||||
|
|
||||||
// Add URL delimiter in front of path if it doesn't exist
|
|
||||||
if ($delimiter_position === false || $delimiter_position > 1)
|
|
||||||
{
|
|
||||||
$url = '/' . $url;
|
|
||||||
}
|
|
||||||
|
|
||||||
return generate_board_url() . $url;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Eliminates useless . and .. components from specified URL
|
* Eliminates useless . and .. components from specified URL
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user