Skip to content
Permalink
Browse files

Revert previous changes.

Adding this parameter was a mistake. Remove it.
  • Loading branch information...
markstory committed Jul 13, 2013
1 parent 8133f72 commit e016f1156ff18b1324c3f8f4108aa6c0b8d3ae8b
Showing with 2 additions and 5 deletions.
  1. +2 −2 lib/Cake/Routing/Router.php
  2. +0 −3 lib/Cake/Test/Case/Routing/RouterTest.php
@@ -1053,7 +1053,7 @@ public static function reverse($params, $full = false) {
* @param array|string $url URL to normalize Either an array or a string URL.
* @return string Normalized URL
*/
public static function normalize($url = '/', $strip = true) {
public static function normalize($url = '/') {
if (is_array($url)) {
$url = Router::url($url);
}
@@ -1062,7 +1062,7 @@ public static function normalize($url = '/', $strip = true) {
}
$request = Router::getRequest();
if ($strip && !empty($request->base) && stristr($url, $request->base)) {
if (!empty($request->base) && stristr($url, $request->base)) {
$url = preg_replace('/^' . preg_quote($request->base, '/') . '/', '', $url, 1);
}
$url = '/' . $url;
@@ -284,9 +284,6 @@ public function testUrlNormalization() {
$result = Router::normalize('/us/users/logout/');
$this->assertEquals('/users/logout', $result);
$result = Router::normalize('/us/users/logout/', false);
$this->assertEquals('/us/users/logout', $result);
Router::reload();
$request = new CakeRequest();

0 comments on commit e016f11

Please sign in to comment.
You can’t perform that action at this time.