Source for file database.php

Documentation is available at database.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.  * Installer Database Controller
  14.  *
  15.  * @package     Joomla.Administrator
  16.  * @subpackage  com_installer
  17.  * @since       2.5
  18.  */
  19. {
  20.     /**
  21.      * Tries to fix missing database updates
  22.      *
  23.      * @return  void 
  24.      *
  25.      * @since   2.5
  26.      * @todo    Purge updates has to be replaced with an events system
  27.      */
  28.     public function fix()
  29.     {
  30.         $model $this->getModel('database');
  31.         $model->fix();
  32.  
  33.         // Purge updates
  34.         JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR '/components/com_joomlaupdate/models''JoomlaupdateModel');
  35.         $updateModel JModelLegacy::getInstance('default''JoomlaupdateModel');
  36.         $updateModel->purge();
  37.  
  38.         // Refresh versionable assets cache
  39.         JFactory::getApplication()->flushAssets();
  40.  
  41.         $this->setRedirect(JRoute::_('index.php?option=com_installer&view=database'false));
  42.     }
  43. }

Documentation generated on Tue, 19 Nov 2013 14:57:52 +0100 by phpDocumentor 1.4.3