Merge pull request #89 from halkyon/modelascontroller_fix

BUGFIX Removed double check of find_old_page() in ModelAsController
This commit is contained in:
Ingo Schommer 2012-04-11 06:41:40 -07:00
commit bacbb8a8d0

View File

@ -104,7 +104,7 @@ class ModelAsController extends Controller implements NestedController {
// 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 @@ class ModelAsController extends Controller implements NestedController {
}
}
}
}