[ Index ]

PHP Cross Reference of Joomla 2.5.4 DE

title

Body

[close]

/installation/ -> controller.php (source)

   1  <?php
   2  /**
   3   * @package        Joomla.Installation
   4   * @copyright    Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
   5   * @license        GNU General Public License version 2 or later; see LICENSE.txt
   6   */
   7  
   8  defined('_JEXEC') or die;
   9  
  10  jimport('joomla.application.component.controller');
  11  jimport('joomla.application.component.helper');
  12  
  13  /**
  14   * Base controller class for the Joomla Core Installer.
  15   *
  16   * @package        Joomla.Installation
  17   * @since        1.6
  18   */
  19  class JInstallationController extends JController
  20  {
  21      /**
  22       * Method to display a view.
  23       *
  24       * @param    boolean    $cachable    If true, the view output will be cached
  25       * @param    array    $urlparams    An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  26       *
  27       * @return    JController    This object to support chaining.
  28       * @since    1.5
  29       */
  30  	public function display($cachable = false, $urlparams = false)
  31      {
  32          // Get the current URI to redirect to.
  33          $uri        = JURI::getInstance();
  34          $redirect    = base64_encode($uri);
  35  
  36          // Get the document object.
  37          $document    = JFactory::getDocument();
  38  
  39          // Set the default view name and format from the Request.
  40          if (file_exists(JPATH_CONFIGURATION.'/configuration.php') && (filesize(JPATH_CONFIGURATION.'/configuration.php') > 10) && file_exists(JPATH_INSTALLATION.'/index.php')) {
  41              $default_view    = 'remove';
  42          } else {
  43              $default_view    = 'language';
  44          }
  45  
  46          $vName        = JRequest::getWord('view', $default_view);
  47          $vFormat    = $document->getType();
  48          $lName        = JRequest::getWord('layout', 'default');
  49  
  50          if (strcmp($vName, $default_view) == 0) {
  51              JRequest::setVar('view', $default_view);
  52          }
  53  
  54          if ($view = $this->getView($vName, $vFormat)) {
  55  
  56              switch ($vName) {
  57                  default:
  58                      $model = $this->getModel('Setup', 'JInstallationModel', array('dbo' => null));
  59                      break;
  60              }
  61  
  62              // Push the model into the view (as default).
  63              $view->setModel($model, true);
  64              $view->setLayout($lName);
  65  
  66              // Push document object into the view.
  67              $view->assignRef('document', $document);
  68  
  69              $view->display();
  70          }
  71  
  72          return $this;
  73      }
  74  }


Generated: Tue Apr 3 11:40:28 2012 Cross-referenced by PHPXref 0.7.1