CoreFiles by mySites.guru
database.php45 lines, 1,118 bytes, from Joomla_3.9.1-Stable-Full_Package.zip
Raw History Compare with 3.9.0
md5
9a7f6a5753f51f2a46e42007935b78ae
sha1
0532a88fd51498568f00661de09463b03e6c843b
sha256
30ecea9f7239ae41480e68cb4af7e6322595e7b204d788da29e8134611035318
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_installer
 *
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Installer Database Controller
 *
 * @since  2.5
 */
class InstallerControllerDatabase extends JControllerLegacy
{
	/**
	 * Tries to fix missing database updates
	 *
	 * @return  void
	 *
	 * @since   2.5
	 * @todo    Purge updates has to be replaced with an events system
	 */
	public function fix()
	{
		// Check for request forgeries.
		$this->checkToken();

		$model = $this->getModel('database');
		$model->fix();

		// Purge updates
		JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_joomlaupdate/models', 'JoomlaupdateModel');
		$updateModel = JModelLegacy::getInstance('default', 'JoomlaupdateModel');
		$updateModel->purge();

		// Refresh versionable assets cache
		JFactory::getApplication()->flushAssets();

		$this->setRedirect(JRoute::_('index.php?option=com_installer&view=database', false));
	}
}

The same content is in 6 releases, Joomla 3.8.13 to 3.9.1. See them all, or every version of this file.