Source for file install.php

Documentation is available at install.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Administrator
  4.  * @subpackage  com_installer
  5.  *
  6.  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
  7.  * @license     GNU General Public License version 2 or later; see LICENSE.txt
  8.  */
  9.  
  10. defined('_JEXEC'or die;
  11.  
  12. /**
  13.  * @package     Joomla.Administrator
  14.  * @subpackage  com_installer
  15.  */
  16. {
  17.     /**
  18.      * Install an extension.
  19.      *
  20.      * @return  void 
  21.      * @since   1.5
  22.      */
  23.     public function install()
  24.     {
  25.         // Check for request forgeries
  26.         JSession::checkToken(or jexit(JText::_('JINVALID_TOKEN'));
  27.  
  28.         $model $this->getModel('install');
  29.         if ($model->install())
  30.         {
  31.             $cache JFactory::getCache('mod_menu');
  32.             $cache->clean();
  33.             // TODO: Reset the users acl here as well to kill off any missing bits
  34.         }
  35.  
  36.         $app JFactory::getApplication();
  37.         $redirect_url $app->getUserState('com_installer.redirect_url');
  38.         if (empty($redirect_url))
  39.         {
  40.             $redirect_url JRoute::_('index.php?option=com_installer&view=install'false);
  41.         else
  42.         {
  43.             // wipe out the user state when we're going to redirect
  44.             $app->setUserState('com_installer.redirect_url''');
  45.             $app->setUserState('com_installer.message''');
  46.             $app->setUserState('com_installer.extension_message''');
  47.         }
  48.         $this->setRedirect($redirect_url);
  49.     }
  50. }

Documentation generated on Tue, 19 Nov 2013 15:05:39 +0100 by phpDocumentor 1.4.3