403Webshell
Server IP : 217.160.0.15  /  Your IP : 216.73.216.227
Web Server : Apache
System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User : u37981780 ( 1696858)
PHP Version : 8.2.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /homepages/oneclick/joomla/3.6.2/1/scripts/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /homepages/oneclick/joomla/3.6.2/1/scripts/joomla-upgrade.php
<?php

function upgrade_joomla($psa_modify_hash)
{
	//First delete old joomla files (Plesk bug)
	// TODO Use Joomla! Installation to remove all files correctly - not only hard coded ones!
	deleteOldJoomlaFiles($psa_modify_hash['@@ROOT_DIR@@']);

	// Joomla! Core Fix functionality for the database update
	JLoad::loadFramework($psa_modify_hash['@@ROOT_DIR@@']);
	JFixDatabase::fixIt();
}

use Joomla\Registry\Registry;

Class JLoad
{
	public static function loadFramework($root_dir)
	{
		// Load the framework only once
		static $loaded = false;

		if(empty($loaded))
		{
			if(!defined('_JEXEC'))
			{
				define('_JEXEC', 1);
			}

			if(!defined('JPATH_BASE'))
			{
				define('JPATH_BASE', $root_dir);
			}

			// Deactivate error reporting to suppress possible warnings
			ini_set('error_reporting', 0);

			require_once JPATH_BASE.'/includes/defines.php';
			require_once JPATH_BASE.'/includes/framework.php';

			$jregistry = new Registry();
			$jregistry->def('session', false);

			// Instantiate the application.
			$app = new JApplicationAdministrator(null, $jregistry);
			JFactory::$application = $app;


			$app->initialise(false);

			$loaded = true;
		}
	}
}

Class JFixDatabase
{
	public static function fixIt()
	{
		// Load the correct model from the component
		JLoader::import('database', JPATH_ADMINISTRATOR.'/components/com_installer/models');
		$model = JModelLegacy::getInstance('database', 'InstallerModel');
		$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();
	}
}

Class JSetDefaultLanguage
{
	public static function setLanguage($language_id)
	{
		// We need to set the default language for the front- and backend
		$obj = new stdClass;
		$obj->id = 0;
		$obj->name = 'site';
		$obj->path = JPATH_SITE;

		JSetDefaultLanguage::publish($language_id, $obj);

		$obj = new stdClass;
		$obj->id = 1;
		$obj->name = 'administrator';
		$obj->path = JPATH_ADMINISTRATOR;

		JSetDefaultLanguage::publish($language_id, $obj);
	}

	private static function publish($cid, $client)
	{
		$params = JComponentHelper::getParams('com_languages');
		$params->set($client->name, $cid);

		$table = JTable::getInstance('extension');
		$id = $table->find(array('element' => 'com_languages'));

		$table->load($id);
		$table->params = (string)$params;

		// pre-save checks
		$table->check();

		// save the changes
		$table->store();
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit