Skip to content

Commit

Permalink
Merge pull request joomla#416 from Bakual/staging
Browse files Browse the repository at this point in the history
Default Layout should not be set in JController->display() as it's already been set in the JView Constructor
  • Loading branch information
chdemko committed Oct 19, 2011
2 parents d4d956d + 19d728a commit 9cffa3c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions libraries/joomla/application/component/controller.php
Expand Up @@ -663,7 +663,7 @@ public function display($cachable = false, $urlparams = false)
$viewName = JRequest::getCmd('view', $this->default_view);
$viewLayout = JRequest::getCmd('layout', 'default');

$view = $this->getView($viewName, $viewType, '', array('base_path' => $this->basePath));
$view = $this->getView($viewName, $viewType, '', array('base_path' => $this->basePath, 'layout' => $viewLayout));

// Get/Create the model
if ($model = $this->getModel($viewName))
Expand All @@ -672,9 +672,6 @@ public function display($cachable = false, $urlparams = false)
$view->setModel($model, true);
}

// Set the layout
$view->setLayout($viewLayout);

$view->assignRef('document', $document);

$conf = JFactory::getConfig();
Expand Down

0 comments on commit 9cffa3c

Please sign in to comment.