BUGFIX Removed double check of find_old_page() in ModelAsController

This commit is contained in:
Sean Harvey 2012-04-11 14:51:33 +12:00
parent bc4208097f
commit 8b44955c6e

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 {
}
}
}
}