- md5
- d96cd6cb2d3263a17e3fc3521f64ee63
- sha1
- 9c8f419f1fd9b0a834bd40fe0b191488c15ada22
- sha256
- 5608efc893c95f2acad78712b9e3eeb8be5ab3721acb13e4234f2c10f67e9040
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
<?php
/**
* @version $Id: controller.php 21766 2011-07-08 12:20:23Z eddieajau $
* @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 $cachable If true, the view output will be cached
* @param array $urlparams 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.'/configuration.php') && (filesize(JPATH_CONFIGURATION.'/configuration.php') > 10) && file_exists(JPATH_INSTALLATION.'/index.php')) {
$default_view = 'remove';
} else {
$default_view = 'language';
}
$vName = JRequest::getWord('view', $default_view);
$vFormat = $document->getType();
$lName = JRequest::getWord('layout', 'default');
if (strcmp($vName, $default_view) == 0) {
JRequest::setVar('view', $default_view);
}
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 6 releases, Joomla 1.7.0 to 1.7.5. See them all, or every version of this file.