- md5
- b27e1fa7f592169054e0c632207e2206
- sha1
- b69e912b14c2fe88c4eda3b4841b7ad14bb73e4d
- sha256
- 52cfe8019b767cfd96d8e8cb325573ea01445d01dd9ea18e7199dedeeea64e66
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
<?php
/**
* @version $Id: controller.php 20264 2011-01-10 22:38:46Z chdemko $
* @package Joomla.Installation
* @copyright Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
jimport('joomla.application.component.controller');
jimport('joomla.application.component.helper');
/**
* Base controller class for the Joomla Core Installer.
*
* @package Joomla.Installation
* @since 1.6
*/
class JInstallationController extends JController
{
/**
* Method to display a view.
*
* @param boolean If true, the view output will be cached
* @param array An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
*
* @return JController This object to support chaining.
* @since 1.5
*/
public function display($cachable = false, $urlparams = false)
{
// Get the current URI to redirect to.
$uri = JURI::getInstance();
$redirect = base64_encode($uri);
// Get the document object.
$document = JFactory::getDocument();
// Set the default view name and format from the Request.
if (file_exists( JPATH_CONFIGURATION . DS . 'configuration.php' ) && (filesize( JPATH_CONFIGURATION . DS . 'configuration.php' ) > 10) && file_exists( JPATH_INSTALLATION . DS . 'index.php' )) {
$default_view = 'remove';
} else {
$default_view = 'language';
}
$vName = JRequest::getWord('view', $default_view);
$vFormat = $document->getType();
$lName = JRequest::getWord('layout', 'default');
if ($view = $this->getView($vName, $vFormat)) {
switch ($vName) {
default:
$model = $this->getModel('Setup', 'JInstallationModel', array('dbo' => null));
break;
}
// Push the model into the view (as default).
$view->setModel($model, true);
$view->setLayout($lName);
// Push document object into the view.
$view->assignRef('document', $document);
$view->display();
}
return $this;
}
}
The same content is in 7 releases, Joomla 1.6.0 to 1.6.6. See them all, or every version of this file.