Permalink
Browse files

Merge pull request #89 from halkyon/modelascontroller_fix

BUGFIX Removed double check of find_old_page() in ModelAsController
  • Loading branch information...
2 parents 5936676 + 8b44955 commit bacbb8a8d0fd5da4ab1643b684d046654e405e45 @chillu chillu committed Apr 11, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 code/controllers/ModelAsController.php
@@ -104,7 +104,7 @@ public function getNestedController() {
// If a root page has been renamed, redirect to the new location.
// See ContentController->handleRequest() for similiar logic.
$redirect = self::find_old_page($URLSegment);
- if($redirect = self::find_old_page($URLSegment)) {
+ if($redirect) {
$params = $request->getVars();
if(isset($params['url'])) unset($params['url']);
$this->response = new SS_HTTPResponse();
@@ -180,4 +180,4 @@ static function find_old_page($URLSegment,$parentID = 0, $ignoreNestedURLs = fal
}
}
-}
+}

0 comments on commit bacbb8a

Please sign in to comment.