Skip to content

Commit

Permalink
Revert previous changes.
Browse files Browse the repository at this point in the history
Adding this parameter was a mistake. Remove it.
  • Loading branch information
markstory committed Jul 13, 2013
1 parent 8133f72 commit e016f11
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/Cake/Routing/Router.php
Expand Up @@ -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);
}
Expand All @@ -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;
Expand Down
3 changes: 0 additions & 3 deletions lib/Cake/Test/Case/Routing/RouterTest.php
Expand Up @@ -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();
Expand Down

0 comments on commit e016f11

Please sign in to comment.