diff --git a/code/controllers/ContentController.php b/code/controllers/ContentController.php index f79c3560..0cf31236 100644 --- a/code/controllers/ContentController.php +++ b/code/controllers/ContentController.php @@ -136,7 +136,7 @@ class ContentController extends Controller { public function handleRequest(SS_HTTPRequest $request, DataModel $model = null) { $child = null; $action = $request->param('Action'); - $this->setModel($model); + $this->setDataModel($model); // If nested URLs are enabled, and there is no action handler for the current request then attempt to pass // control to a child controller. This allows for the creation of chains of controllers which correspond to a diff --git a/code/controllers/ModelAsController.php b/code/controllers/ModelAsController.php index a6ba308c..83eea1ed 100644 --- a/code/controllers/ModelAsController.php +++ b/code/controllers/ModelAsController.php @@ -38,7 +38,7 @@ class ModelAsController extends Controller implements NestedController { */ public function handleRequest(SS_HTTPRequest $request, DataModel $model) { $this->request = $request; - $this->setModel($model); + $this->setDataModel($model); $this->pushCurrent(); diff --git a/code/controllers/RootURLController.php b/code/controllers/RootURLController.php index b118da3e..23007ad6 100644 --- a/code/controllers/RootURLController.php +++ b/code/controllers/RootURLController.php @@ -106,7 +106,7 @@ class RootURLController extends Controller { */ public function handleRequest(SS_HTTPRequest $request, DataModel $model = null) { self::$is_at_root = true; - $this->setModel($model); + $this->setDataModel($model); $this->pushCurrent(); $this->init();