Heray-Was-Here
Server : Apache
System : Linux infong-uk56 4.4.400-icpu-108 #2 SMP Wed Feb 11 11:51:01 UTC 2026 x86_64
User : u78863098 ( 10368940)
PHP Version : 8.4.24
Disable Function : NONE
Directory :  /homepages/oneclick/joomla/3.3.6/1/scripts/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /homepages/oneclick/joomla/3.3.6/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();
}

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';

            $mainframe = JFactory::getApplication('site');
            $mainframe->initialise();

            $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();
    }
}

Hry