[Jaws-commits] r13418 - in trunk/jaws/html/upgrade: . stages stages/0817To0818 stages/0817To0818/templates

afz at jaws-project.com afz at jaws-project.com
Mon Aug 13 16:13:52 UTC 2012


Author: afz
Date: 2012-08-13 16:13:52 +0000 (Mon, 13 Aug 2012)
New Revision: 13418

Added:
   trunk/jaws/html/upgrade/stages/0817To0818.php
   trunk/jaws/html/upgrade/stages/0817To0818/
   trunk/jaws/html/upgrade/stages/0817To0818/icon.png
   trunk/jaws/html/upgrade/stages/0817To0818/templates/
   trunk/jaws/html/upgrade/stages/0817To0818/templates/display.html
Removed:
   trunk/jaws/html/upgrade/stages/07To080.php
   trunk/jaws/html/upgrade/stages/07To080/
   trunk/jaws/html/upgrade/stages/0810To0811.php
   trunk/jaws/html/upgrade/stages/0810To0811/
   trunk/jaws/html/upgrade/stages/0811To0812.php
   trunk/jaws/html/upgrade/stages/0811To0812/
   trunk/jaws/html/upgrade/stages/0812To0813.php
   trunk/jaws/html/upgrade/stages/0812To0813/
   trunk/jaws/html/upgrade/stages/0813To0814.php
   trunk/jaws/html/upgrade/stages/0813To0814/
   trunk/jaws/html/upgrade/stages/082To083.php
   trunk/jaws/html/upgrade/stages/082To083/
   trunk/jaws/html/upgrade/stages/083To084.php
   trunk/jaws/html/upgrade/stages/083To084/
   trunk/jaws/html/upgrade/stages/084To085.php
   trunk/jaws/html/upgrade/stages/084To085/
   trunk/jaws/html/upgrade/stages/085To086.php
   trunk/jaws/html/upgrade/stages/085To086/
   trunk/jaws/html/upgrade/stages/086To087.php
   trunk/jaws/html/upgrade/stages/086To087/
   trunk/jaws/html/upgrade/stages/087To088.php
   trunk/jaws/html/upgrade/stages/087To088/
   trunk/jaws/html/upgrade/stages/088To089.php
   trunk/jaws/html/upgrade/stages/088To089/
   trunk/jaws/html/upgrade/stages/089To0810.php
   trunk/jaws/html/upgrade/stages/089To0810/
   trunk/jaws/html/upgrade/stages/08To081.php
   trunk/jaws/html/upgrade/stages/08To081/
Modified:
   trunk/jaws/html/upgrade/stagelist.php
   trunk/jaws/html/upgrade/stages/0816To0817.php
   trunk/jaws/html/upgrade/stages/Report.php
Log:
Fixed languages duplicate constant when upgrading from old versions

Modified: trunk/jaws/html/upgrade/stagelist.php
===================================================================
--- trunk/jaws/html/upgrade/stagelist.php	2012-08-13 16:11:10 UTC (rev 13417)
+++ trunk/jaws/html/upgrade/stagelist.php	2012-08-13 16:13:52 UTC (rev 13418)
@@ -43,90 +43,6 @@
     'file'  => 'Report',
 );
 
-// Does assorted stuff, such as a default gadget.
-$stages[] = array(
-    'name'  => _t('UPGRADE_VER_TO_VER', '0.7.x', '0.8.0'),
-    'file'  => '07To080',
-);
-
-// Upgrade from 0.8.0 to 0.8.1
-$stages[] = array(
-    'name'  => _t('UPGRADE_VER_TO_VER', '0.8.0', '0.8.1'),
-    'file'  => '08To081',
-);
-
-// Upgrade from 0.8.2 to 0.8.3
-$stages[] = array(
-    'name'  => _t('UPGRADE_VER_TO_VER', '0.8.2', '0.8.3'),
-    'file'  => '082To083',
-);
-
-// Upgrade from 0.8.3 to 0.8.4
-$stages[] = array(
-    'name'  => _t('UPGRADE_VER_TO_VER', '0.8.3', '0.8.4'),
-    'file'  => '083To084',
-);
-
-// Upgrade from 0.8.4 to 0.8.5
-$stages[] = array(
-    'name'  => _t('UPGRADE_VER_TO_VER', '0.8.4', '0.8.5'),
-    'file'  => '084To085',
-);
-
-// Upgrade from 0.8.5 to 0.8.6
-$stages[] = array(
-    'name'  => _t('UPGRADE_VER_TO_VER', '0.8.5', '0.8.6'),
-    'file'  => '085To086',
-);
-
-// Upgrade from 0.8.6 to 0.8.7
-$stages[] = array(
-    'name'  => _t('UPGRADE_VER_TO_VER', '0.8.6', '0.8.7'),
-    'file'  => '086To087',
-);
-
-// Upgrade from 0.8.7 to 0.8.8
-$stages[] = array(
-    'name'  => _t('UPGRADE_VER_TO_VER', '0.8.7', '0.8.8'),
-    'file'  => '087To088',
-);
-
-// Upgrade from 0.8.8 to 0.8.9
-$stages[] = array(
-    'name'  => _t('UPGRADE_VER_TO_VER', '0.8.8', '0.8.9'),
-    'file'  => '088To089',
-);
-
-// Upgrade from 0.8.9 to 0.8.10
-$stages[] = array(
-    'name'  => _t('UPGRADE_VER_TO_VER', '0.8.9', '0.8.10'),
-    'file'  => '089To0810',
-);
-
-// Upgrade from 0.8.10 to 0.8.11
-$stages[] = array(
-    'name'  => _t('UPGRADE_VER_TO_VER', '0.8.10', '0.8.11'),
-    'file'  => '0810To0811',
-);
-
-// Upgrade from 0.8.11 to 0.8.12
-$stages[] = array(
-    'name'  => _t('UPGRADE_VER_TO_VER', '0.8.11', '0.8.12'),
-    'file'  => '0811To0812',
-);
-
-// Upgrade from 0.8.12 to 0.8.13
-$stages[] = array(
-    'name'  => _t('UPGRADE_VER_TO_VER', '0.8.12', '0.8.13'),
-    'file'  => '0812To0813',
-);
-
-// Upgrade from 0.8.13 to 0.8.14
-$stages[] = array(
-    'name'  => _t('UPGRADE_VER_TO_VER', '0.8.13', '0.8.14'),
-    'file'  => '0813To0814',
-);
-
 // Upgrade from 0.8.14 to 0.8.15
 $stages[] = array(
     'name'  => _t('UPGRADE_VER_TO_VER', '0.8.14', '0.8.15'),
@@ -145,6 +61,12 @@
     'file'  => '0816To0817',
 );
 
+// Upgrade from 0.8.17 to 0.8.18
+$stages[] = array(
+    'name'  => _t('UPGRADE_VER_TO_VER', '0.8.17', '0.8.18'),
+    'file'  => '0817To0818',
+);
+
 // Saves the config file.
 $stages[] = array(
     'name'  => _t('UPGRADE_WRITECONFIG'),

Deleted: trunk/jaws/html/upgrade/stages/07To080.php
===================================================================
--- trunk/jaws/html/upgrade/stages/07To080.php	2012-08-13 16:11:10 UTC (rev 13417)
+++ trunk/jaws/html/upgrade/stages/07To080.php	2012-08-13 16:13:52 UTC (rev 13418)
@@ -1,301 +0,0 @@
-<?php
-/**
- * Jaws Upgrade Stage - From 0.7.x to 0.8.0
- *
- * @category   Application
- * @package    UpgradeStage
- * @author     Jonathan Hernandez <ion at suavizado.com>
- * @author     Ali Fazelzadeh <afz at php.net>
- * @copyright  2006-2012 Jaws Development Group
- * @license    http://www.gnu.org/copyleft/lesser.html
- */
-class Upgrader_07To080 extends JawsUpgraderStage
-{
-    /**
-     * Builds the upgader page.
-     *
-     * @access  public
-     * @return  string A block of valid XHTML to display an introduction and form.
-     */
-    function Display()
-    {
-        $tpl = new Jaws_Template(UPGRADE_PATH  . 'stages/07To080/templates/');
-        $tpl->Load('display.html', false, false);
-        $tpl->SetBlock('07To080');
-
-        $tpl->setVariable('lbl_info',  _t('UPGRADE_VER_INFO', '0.7.x', '0.8.0'));
-        $tpl->setVariable('lbl_notes', _t('UPGRADE_VER_NOTES'));
-        $tpl->SetVariable('next',      _t('GLOBAL_NEXT'));
-
-        $tpl->ParseBlock('07To080');
-        return $tpl->Get();
-    }
-
-    /**
-     * Does any actions required to finish the stage, such as DB queries.
-     *
-     * @access  public
-     * @return  bool|Jaws_Error  Either true on success, or a Jaws_Error
-     *                          containing the reason for failure.
-     */
-    function Run()
-    {
-        // Connect to database
-        require_once JAWS_PATH . 'include/Jaws/DB.php';
-        $GLOBALS['db'] = new Jaws_DB($_SESSION['upgrade']['Database']);
-        if (Jaws_Error::IsError($GLOBALS['db'])) {
-            _log(JAWS_LOG_DEBUG,"There was a problem connecting to the database, please check the details and try again");
-            return new Jaws_Error(_t('UPGRADE_DB_RESPONSE_CONNECT_FAILED'), 0, JAWS_ERROR_WARNING);
-        }
-        $GLOBALS['db']->dbc->loadModule('Function', null, true);
-
-        $sql = 'DELETE FROM [[session]]';
-        $res = $GLOBALS['db']->query($sql);
-        if (Jaws_Error::IsError($res)) {
-            return $res;
-        }
-
-        // remove duplicate records from registry table
-        $lower1 = $GLOBALS['db']->dbc->function->lower('a1.[name]');
-        $lower2 = $GLOBALS['db']->dbc->function->lower('a2.[name]');
-        $sql = "
-            SELECT [id] FROM [[registry]] a1
-            WHERE EXISTS (
-                SELECT *
-                FROM [[registry]] a2
-                WHERE
-                    a1.[id] != a2.[id]
-                  AND
-                    a1.[id] < a2.[id]
-                  AND
-                    $lower1 = $lower2)";
-        $dupls = $GLOBALS['db']->queryAll($sql);
-        if (Jaws_Error::IsError($dupls)) {
-            return $dupls;
-        }
-
-        $sql = 'DELETE FROM [[registry]] WHERE [id] = {id}';
-        foreach ($dupls as $rec) {
-            $res = $GLOBALS['db']->query($sql, array('id' => $rec['id']));
-        }
-
-        // remove duplicate records from acl table
-        $lower1 = $GLOBALS['db']->dbc->function->lower('a1.[name]');
-        $lower2 = $GLOBALS['db']->dbc->function->lower('a2.[name]');
-        $sql = "
-            SELECT [id] FROM [[acl]] a1
-            WHERE EXISTS (
-                SELECT *
-                FROM [[acl]] a2
-                WHERE
-                    a1.[id] != a2.[id]
-                  AND
-                    a1.[id] < a2.[id]
-                  AND
-                    $lower1 = $lower2)";
-        $dupls = $GLOBALS['db']->queryAll($sql);
-        if (Jaws_Error::IsError($dupls)) {
-            return $dupls;
-        }
-
-        $sql = 'DELETE FROM [[acl]] WHERE [id] = {id}';
-        foreach ($dupls as $rec) {
-            $res = $GLOBALS['db']->query($sql, array('id' => $rec['id']));
-        }
-
-        $old_schema = JAWS_PATH . 'upgrade/schema/0.7.4.xml';
-        $new_schema = JAWS_PATH . 'upgrade/schema/0.8.0.xml';
-        if (!file_exists($old_schema)) {
-            return new Jaws_Error(_t('GLOBAL_ERROR_SQLFILE_NOT_EXISTS', '0.7.4.xml'),0 , JAWS_ERROR_ERROR);
-        }
-
-        if (!file_exists($new_schema)) {
-            return new Jaws_Error(_t('GLOBAL_ERROR_SQLFILE_NOT_EXISTS', '0.8.0.xml'),0 , JAWS_ERROR_ERROR);
-        }
-
-        _log(JAWS_LOG_DEBUG,"Upgrading core schema");
-        $result = $GLOBALS['db']->installSchema($new_schema, '', $old_schema);
-        if (Jaws_Error::isError($result)) {
-            _log(JAWS_LOG_DEBUG,$result->getMessage());
-            return new Jaws_Error($result->getMessage(), 0, JAWS_ERROR_ERROR);
-        }
-
-        $tables = array('session_user_data');
-        foreach ($tables as $table) {
-            $res = $GLOBALS['db']->dropTable($table);
-            if (Jaws_Error::IsError($res)) {
-                // do nothing
-            }
-        }
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous registry and acl cache data files");
-        //Make sure user don't have any data/cache/registry|acl stuff
-        $path = JAWS_DATA . 'cache/registry';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        $path = JAWS_DATA . 'cache/acl';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        // Create application
-        include_once JAWS_PATH . 'include/Jaws.php';
-        $GLOBALS['app'] = new Jaws();
-        $GLOBALS['app']->create();
-        $GLOBALS['app']->OverwriteDefaults(array('language' => $_SESSION['upgrade']['language']));
-        $GLOBALS['app']->loadClass('ACL', 'Jaws_ACL');
-
-        // Input datas
-        $timestamp = $GLOBALS['db']->Date();
-
-        $robots = array('Yahoo! Slurp',
-                        'Baiduspider',
-                        'Googlebot',
-                        'msnbot',
-                        'Gigabot',
-                        'ia_archiver',
-                        'yacybot',
-                        'http://www.WISEnutbot.com',
-                        'psbot',
-                        'msnbot-media',
-                        'Ask Jeeves',
-                        );
-
-        //registry keys.
-        $result = $GLOBALS['app']->Registry->NewKeyEx(
-                    array('/config/frontend_ajaxed', 'false'),
-                    array('/config/http_auth', 'false'),
-                    array('/config/realm', 'Jaws Control Panel'),
-                    array('/config/calendar_language', 'en'),
-                    array('/config/timezone', '0'),
-                    array('/config/gzip_compression', 'false'),
-                    array('/config/browsers_flag', 'opera,firefox,ie7up,ie,safari,nav,konq,gecko,text'),
-                    array('/config/site_url', $GLOBALS['app']->Registry->Get('/config/url')),
-                    array('/config/site_keywords', ''),
-                    array('/config/site_language',  $GLOBALS['app']->Registry->Get('/config/language')),
-                    array('/config/admin_language', $GLOBALS['app']->Registry->Get('/config/language')),
-                    array('/config/cookie_precedence', 'false'),
-                    array('/config/robots', implode(',', $robots)),
-                    array('/config/connection_timeout', '5'),           // per second
-                    array('/policy/passwd_bad_count',         '7'),
-                    array('/policy/passwd_lockedout_time',    '60'),    // per second
-                    array('/policy/passwd_max_age',           '0'),     // per day  0 = resistant
-                    array('/policy/passwd_min_length',        '0'),
-                    array('/policy/passwd_complexity',        'no'),
-                    array('/policy/xss_parsing_level',        'paranoid'),
-                    array('/policy/session_idle_timeout',     '30'),    // per minute
-                    array('/policy/session_remember_timeout', '720'),   // hours = 1 month
-                    array('/gadgets/autoload_items', ''),
-                    array('/network/ftp_enabled', 'false'),
-                    array('/network/ftp_host', '127.0.0.1'),
-                    array('/network/ftp_port', '21'),
-                    array('/network/ftp_mode', 'passive'),
-                    array('/network/ftp_user', ''),
-                    array('/network/ftp_pass', ''),
-                    array('/network/ftp_root', ''),
-                    array('/network/proxy_enabled', 'false'),
-                    array('/network/proxy_type', 'http'),
-                    array('/network/proxy_host', ''),
-                    array('/network/proxy_port', '80'),
-                    array('/network/proxy_auth', 'false'),
-                    array('/network/proxy_user', ''),
-                    array('/network/proxy_pass', ''),
-                    array('/network/mailer', 'smtp'),
-                    array('/network/from_email', ''),
-                    array('/network/from_name', ''),
-                    array('/network/sendmail_path', '/usr/sbin/sendmail'),
-                    array('/network/sendmail_args', ''),
-                    array('/network/smtp_host', $GLOBALS['app']->Registry->Get('/Mailserver/hostname')),
-                    array('/network/smtp_port', $GLOBALS['app']->Registry->Get('/Mailserver/port')),
-                    array('/network/smtp_auth', 'false'),
-                    array('/network/pipelining', 'false'),
-                    array('/network/smtp_user', $GLOBALS['app']->Registry->Get('/Mailserver/username')),
-                    array('/network/smtp_pass', $GLOBALS['app']->Registry->Get('/Mailserver/password')),
-                    array('/crypt/enabled', $_SESSION['upgrade']['secure']? 'true' : 'false'),
-                    array('/crypt/pub_key', $_SESSION['pub_key']),
-                    array('/crypt/pvt_key', $_SESSION['pvt_key']),
-                    array('/crypt/key_len', '128'),
-                    array('/crypt/key_age', '86400'),
-                    array('/crypt/key_start_date', $_SESSION['upgrade']['secure']? time() : '0')
-        );
-        if (Jaws_Error::isError($result)) {
-            _log(JAWS_LOG_DEBUG,$result->getMessage());
-            //return new Jaws_Error(_t('GLOBAL_ERROR_FAILED_ADDING_REGISTRY_KEY'), 'CORE');
-        }
-
-        //registry keys
-        $GLOBALS['app']->Registry->Set('/version', JAWS_VERSION);
-        $GLOBALS['app']->Registry->Set('/last_update', $timestamp);
-        $GLOBALS['app']->Registry->Set('/config/editor','TextArea');
-        $GLOBALS['app']->Registry->Set('/config/cookie/version','0.3');
-
-        //delete registry keys
-        $GLOBALS['app']->Registry->DeleteKey('/config/url');
-        $GLOBALS['app']->Registry->DeleteKey('/config/language');
-        $GLOBALS['app']->Registry->DeleteKey('/Mailserver/use');
-        $GLOBALS['app']->Registry->DeleteKey('/Mailserver/hostname');
-        $GLOBALS['app']->Registry->DeleteKey('/Mailserver/port');
-        $GLOBALS['app']->Registry->DeleteKey('/Mailserver/username');
-        $GLOBALS['app']->Registry->DeleteKey('/Mailserver/password');
-        $GLOBALS['app']->Registry->DeleteKey('/Mailserver/enabled');
-
-        // Commit the changes so they get saved
-        $GLOBALS['app']->Registry->commit('core');
-
-        // ACL keys
-        // --------
-
-        $gadgets = array(
-            'Settings', 'Layout', 'Registry', 'ControlPanel',
-            'Jms', 'UrlMapper', 'Users', 'Policy',
-        );
-
-        require_once JAWS_PATH . 'include/Jaws/URLMapping.php';
-        $GLOBALS['app']->Map = new Jaws_URLMapping();
-
-        foreach ($gadgets as $gadget) {
-            $result = true;
-            if (!Jaws_Gadget::IsGadgetInstalled($gadget)) {
-                _log(JAWS_LOG_DEBUG,"Installing core gadget: ".$gadget);
-                $result = Jaws_Gadget::EnableGadget($gadget);
-            } elseif (!Jaws_Gadget::IsGadgetUpdated($gadget)) {
-                _log(JAWS_LOG_DEBUG,"Upgrading core gadget: ".$gadget);
-                $result = Jaws_Gadget::UpdateGadget($gadget);
-            }
-
-            if (Jaws_Error::IsError($result)) {
-                _log(JAWS_LOG_DEBUG,"There was a problem installing/upgrading core gadget: $gadget");
-                return new Jaws_Error(_t('UPGRADE_VER_RESPONSE_GADGET_FAILED', $gadget), 0, JAWS_ERROR_ERROR);
-            }
-        }
-
-        _log(JAWS_LOG_DEBUG,"Re-Cleaning previous registry and acl cache data files to fetch new data");
-        //Make sure user don't have any data/cache/registry|acl stuff
-        $path = JAWS_DATA . 'cache/registry';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        $path = JAWS_DATA . 'cache/acl';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-/*
-        _log(JAWS_LOG_DEBUG,"Upgrading new gadget requirements");
-        // Add keys
-        $gadgets = $GLOBALS['app']->Registry->get('/gadgets/enabled_items');
-        $core    = $GLOBALS['app']->Registry->get('/gadgets/core_items');
-        $gadgets = $core + $gadets;
-        foreach ($gadgets as $g) {
-            $info = $GLOBALS['app']->loadGadget($g, 'Info');
-            $req = $info->GetRequirements();
-            $requires = implode($req, ', ');
-            $GLOBALS['app']->Registry->NewKey('/gadgets/' . $g . '/requires', $requires);
-        }
-*/
-        return true;
-    }
-}

Deleted: trunk/jaws/html/upgrade/stages/0810To0811.php
===================================================================
--- trunk/jaws/html/upgrade/stages/0810To0811.php	2012-08-13 16:11:10 UTC (rev 13417)
+++ trunk/jaws/html/upgrade/stages/0810To0811.php	2012-08-13 16:13:52 UTC (rev 13418)
@@ -1,90 +0,0 @@
-<?php
-/**
- * Jaws Upgrade Stage - From 0.8.10 to 0.8.11
- *
- * @category   Application
- * @package    UpgradeStage
- * @author     Ali Fazelzadeh <afz at php.net>
- * @copyright  2010-2012 Jaws Development Group
- * @license    http://www.gnu.org/copyleft/lesser.html
- */
-class Upgrader_0810To0811 extends JawsUpgraderStage
-{
-    /**
-     * Builds the upgader page.
-     *
-     * @access  public
-     * @return  string A block of valid XHTML to display an introduction and form.
-     */
-    function Display()
-    {
-        $tpl = new Jaws_Template(UPGRADE_PATH  . 'stages/0810To0811/templates/');
-        $tpl->Load('display.html', false, false);
-        $tpl->SetBlock('0810To0811');
-
-        $tpl->setVariable('lbl_info',  _t('UPGRADE_VER_INFO', '0.8.10', '0.8.11'));
-        $tpl->setVariable('lbl_notes', _t('UPGRADE_VER_NOTES'));
-        $tpl->SetVariable('next',      _t('GLOBAL_NEXT'));
-
-        $tpl->ParseBlock('0810To0811');
-        return $tpl->Get();
-    }
-
-    /**
-     * Does any actions required to finish the stage, such as DB queries.
-     *
-     * @access  public
-     * @return  bool|Jaws_Error  Either true on success, or a Jaws_Error
-     *                          containing the reason for failure.
-     */
-    function Run()
-    {
-        // Connect to database
-        require_once JAWS_PATH . 'include/Jaws/DB.php';
-        $GLOBALS['db'] = new Jaws_DB($_SESSION['upgrade']['Database']);
-        if (Jaws_Error::IsError($GLOBALS['db'])) {
-            _log(JAWS_LOG_DEBUG,"There was a problem connecting to the database, please check the details and try again");
-            return new Jaws_Error(_t('UPGRADE_DB_RESPONSE_CONNECT_FAILED'), 0, JAWS_ERROR_WARNING);
-        }
-
-        // Create application
-        include_once JAWS_PATH . 'include/Jaws.php';
-        $GLOBALS['app'] = new Jaws();
-        $GLOBALS['app']->loadClass('ACL', 'Jaws_ACL');
-        $GLOBALS['app']->loadClass('Registry', 'Jaws_Registry');
-        $GLOBALS['app']->Registry->Init();
-
-        // Input datas
-        $timestamp = $GLOBALS['db']->Date();
-
-        //registry keys
-        $GLOBALS['app']->Registry->Set('/version', JAWS_VERSION);
-        $GLOBALS['app']->Registry->Set('/last_update', $timestamp);
-
-        // Commit the changes so they get saved
-        $GLOBALS['app']->Registry->commit('core');
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous maps cache data files - step 0.8.10->0.8.11");
-        //Make sure user don't have any data/maps stuff
-        $path = JAWS_DATA . 'maps';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous registry cache data files - step 0.8.10->0.8.11");
-        //Make sure user don't have any data/cache/registry stuff
-        $path = JAWS_DATA . 'cache/registry';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous acl cache data files - step 0.8.10->0.8.11");
-        //Make sure user don't have any data/cache/acl stuff
-        $path = JAWS_DATA . 'cache/acl';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        return true;
-    }
-}

Deleted: trunk/jaws/html/upgrade/stages/0811To0812.php
===================================================================
--- trunk/jaws/html/upgrade/stages/0811To0812.php	2012-08-13 16:11:10 UTC (rev 13417)
+++ trunk/jaws/html/upgrade/stages/0811To0812.php	2012-08-13 16:13:52 UTC (rev 13418)
@@ -1,130 +0,0 @@
-<?php
-/**
- * Jaws Upgrade Stage - From 0.8.11 to 0.8.12
- *
- * @category   Application
- * @package    UpgradeStage
- * @author     Ali Fazelzadeh <afz at php.net>
- * @copyright  2010-2012 Jaws Development Group
- * @license    http://www.gnu.org/copyleft/lesser.html
- */
-class Upgrader_0811To0812 extends JawsUpgraderStage
-{
-    /**
-     * Builds the upgader page.
-     *
-     * @access  public
-     * @return  string A block of valid XHTML to display an introduction and form.
-     */
-    function Display()
-    {
-        $tpl = new Jaws_Template(UPGRADE_PATH  . 'stages/0811To0812/templates/');
-        $tpl->Load('display.html', false, false);
-        $tpl->SetBlock('0811To0812');
-
-        $tpl->setVariable('lbl_info',  _t('UPGRADE_VER_INFO', '0.8.11', '0.8.12'));
-        $tpl->setVariable('lbl_notes', _t('UPGRADE_VER_NOTES'));
-        $tpl->SetVariable('next',      _t('GLOBAL_NEXT'));
-
-        $tpl->ParseBlock('0811To0812');
-        return $tpl->Get();
-    }
-
-    /**
-     * Does any actions required to finish the stage, such as DB queries.
-     *
-     * @access  public
-     * @return  bool|Jaws_Error  Either true on success, or a Jaws_Error
-     *                          containing the reason for failure.
-     */
-    function Run()
-    {
-        // Connect to database
-        require_once JAWS_PATH . 'include/Jaws/DB.php';
-        $GLOBALS['db'] = new Jaws_DB($_SESSION['upgrade']['Database']);
-        if (Jaws_Error::IsError($GLOBALS['db'])) {
-            _log(JAWS_LOG_DEBUG,"There was a problem connecting to the database, please check the details and try again");
-            return new Jaws_Error(_t('UPGRADE_DB_RESPONSE_CONNECT_FAILED'), 0, JAWS_ERROR_WARNING);
-        }
-
-        $sql = 'DELETE FROM [[session]]';
-        $res = $GLOBALS['db']->query($sql);
-        if (Jaws_Error::IsError($res)) {
-            return $res;
-        }
-
-        $old_schema = JAWS_PATH . 'upgrade/schema/0.8.0.xml';
-        $new_schema = JAWS_PATH . 'upgrade/schema/0.8.12.xml';
-        if (!file_exists($old_schema)) {
-            return new Jaws_Error(_t('GLOBAL_ERROR_SQLFILE_NOT_EXISTS', '0.8.0.xml'),0 , JAWS_ERROR_ERROR);
-        }
-
-        if (!file_exists($new_schema)) {
-            return new Jaws_Error(_t('GLOBAL_ERROR_SQLFILE_NOT_EXISTS', '0.8.12.xml'),0 , JAWS_ERROR_ERROR);
-        }
-
-        _log(JAWS_LOG_DEBUG,"Upgrading core schema");
-        $result = $GLOBALS['db']->installSchema($new_schema, '', $old_schema);
-        if (Jaws_Error::isError($result)) {
-            _log(JAWS_LOG_DEBUG,$result->getMessage());
-            return new Jaws_Error($result->getMessage(), 0, JAWS_ERROR_ERROR);
-        }
-
-        // Create application
-        include_once JAWS_PATH . 'include/Jaws.php';
-        $GLOBALS['app'] = new Jaws();
-        $GLOBALS['app']->loadClass('ACL', 'Jaws_ACL');
-        $GLOBALS['app']->loadClass('Registry', 'Jaws_Registry');
-        $GLOBALS['app']->loadClass('Translate', 'Jaws_Translate');
-        $GLOBALS['app']->Registry->Init();
-
-        // This is needed for most gadgets
-        require_once JAWS_PATH . 'include/Jaws/Gadget.php';
-        require_once JAWS_PATH . 'include/Jaws/Template.php';
-        require_once JAWS_PATH . 'include/Jaws/Header.php';
-        $GLOBALS['app']->loadClass('Map', 'Jaws_URLMapping');
-
-        // Input datas
-        $timestamp = $GLOBALS['db']->Date();
-
-        //registry keys
-        $GLOBALS['app']->Registry->Set('/config/cookie/version', '0.4');
-        $GLOBALS['app']->Registry->Set('/version', JAWS_VERSION);
-        $GLOBALS['app']->Registry->Set('/last_update', $timestamp);
-
-        // Commit the changes so they get saved
-        $GLOBALS['app']->Registry->commit('core');
-
-        $gadgets = array('UrlMapper', 'Users', 'Policy');
-        foreach ($gadgets as $gadget) {
-            $result = Jaws_Gadget::UpdateGadget($gadget);
-            if (Jaws_Error::IsError($result)) {
-                _log(JAWS_LOG_DEBUG,"There was a problem upgrading core gadget: $gadget");
-                return new Jaws_Error(_t('UPGRADE_VER_RESPONSE_GADGET_FAILED', $gadget), 0, JAWS_ERROR_ERROR);
-            }
-        }
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous maps cache data files - step 0.8.11->0.8.12");
-        //Make sure user don't have any data/maps stuff
-        $path = JAWS_DATA . 'maps';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous registry cache data files - step 0.8.11->0.8.12");
-        //Make sure user don't have any data/cache/registry stuff
-        $path = JAWS_DATA . 'cache/registry';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous acl cache data files - step 0.8.11->0.8.12");
-        //Make sure user don't have any data/cache/acl stuff
-        $path = JAWS_DATA . 'cache/acl';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        return true;
-    }
-}

Deleted: trunk/jaws/html/upgrade/stages/0812To0813.php
===================================================================
--- trunk/jaws/html/upgrade/stages/0812To0813.php	2012-08-13 16:11:10 UTC (rev 13417)
+++ trunk/jaws/html/upgrade/stages/0812To0813.php	2012-08-13 16:13:52 UTC (rev 13418)
@@ -1,91 +0,0 @@
-<?php
-/**
- * Jaws Upgrade Stage - From 0.8.12 to 0.8.13
- *
- * @category   Application
- * @package    UpgradeStage
- * @author     Ali Fazelzadeh <afz at php.net>
- * @copyright  2010-2012 Jaws Development Group
- * @license    http://www.gnu.org/copyleft/lesser.html
- */
-class Upgrader_0812To0813 extends JawsUpgraderStage
-{
-    /**
-     * Builds the upgader page.
-     *
-     * @access  public
-     * @return  string A block of valid XHTML to display an introduction and form.
-     */
-    function Display()
-    {
-        $tpl = new Jaws_Template(UPGRADE_PATH  . 'stages/0812To0813/templates/');
-        $tpl->Load('display.html', false, false);
-        $tpl->SetBlock('0812To0813');
-
-        $tpl->setVariable('lbl_info',  _t('UPGRADE_VER_INFO', '0.8.12', '0.8.13'));
-        $tpl->setVariable('lbl_notes', _t('UPGRADE_VER_NOTES'));
-        $tpl->SetVariable('next',      _t('GLOBAL_NEXT'));
-
-        $tpl->ParseBlock('0812To0813');
-        return $tpl->Get();
-    }
-
-    /**
-     * Does any actions required to finish the stage, such as DB queries.
-     *
-     * @access  public
-     * @return  bool|Jaws_Error  Either true on success, or a Jaws_Error
-     *                          containing the reason for failure.
-     */
-    function Run()
-    {
-        // Connect to database
-        require_once JAWS_PATH . 'include/Jaws/DB.php';
-        $GLOBALS['db'] = new Jaws_DB($_SESSION['upgrade']['Database']);
-        if (Jaws_Error::IsError($GLOBALS['db'])) {
-            _log(JAWS_LOG_DEBUG,"There was a problem connecting to the database, please check the details and try again");
-            return new Jaws_Error(_t('UPGRADE_DB_RESPONSE_CONNECT_FAILED'), 0, JAWS_ERROR_WARNING);
-        }
-
-        // Create application
-        include_once JAWS_PATH . 'include/Jaws.php';
-        $GLOBALS['app'] = new Jaws();
-        $GLOBALS['app']->loadClass('ACL', 'Jaws_ACL');
-        $GLOBALS['app']->loadClass('Registry', 'Jaws_Registry');
-        $GLOBALS['app']->Registry->Init();
-
-        // Input datas
-        $timestamp = $GLOBALS['db']->Date();
-
-        //registry keys
-        $GLOBALS['app']->Registry->Set('/version', JAWS_VERSION);
-        $GLOBALS['app']->Registry->Set('/last_update', $timestamp);
-
-        // Commit the changes so they get saved
-        $GLOBALS['app']->Registry->commit('core');
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous maps cache data files - step 0.8.12->0.8.13");
-        //Make sure user don't have any data/maps stuff
-        $path = JAWS_DATA . 'maps';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous registry cache data files - step 0.8.12->0.8.13");
-        //Make sure user don't have any data/cache/registry stuff
-        $path = JAWS_DATA . 'cache/registry';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous acl cache data files - step 0.8.12->0.8.13");
-        //Make sure user don't have any data/cache/acl stuff
-        $path = JAWS_DATA . 'cache/acl';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        return true;
-    }
-
-}
\ No newline at end of file

Deleted: trunk/jaws/html/upgrade/stages/0813To0814.php
===================================================================
--- trunk/jaws/html/upgrade/stages/0813To0814.php	2012-08-13 16:11:10 UTC (rev 13417)
+++ trunk/jaws/html/upgrade/stages/0813To0814.php	2012-08-13 16:13:52 UTC (rev 13418)
@@ -1,120 +0,0 @@
-<?php
-/**
- * Jaws Upgrade Stage - From 0.8.13 to 0.8.14
- *
- * @category   Application
- * @package    UpgradeStage
- * @author     Ali Fazelzadeh <afz at php.net>
- * @copyright  2010-2012 Jaws Development Group
- * @license    http://www.gnu.org/copyleft/lesser.html
- */
-class Upgrader_0813To0814 extends JawsUpgraderStage
-{
-    /**
-     * Builds the upgader page.
-     *
-     * @access  public
-     * @return  string A block of valid XHTML to display an introduction and form.
-     */
-    function Display()
-    {
-        $tpl = new Jaws_Template(UPGRADE_PATH  . 'stages/0813To0814/templates/');
-        $tpl->Load('display.html', false, false);
-        $tpl->SetBlock('0813To0814');
-
-        $tpl->setVariable('lbl_info',  _t('UPGRADE_VER_INFO', '0.8.13', '0.8.14'));
-        $tpl->setVariable('lbl_notes', _t('UPGRADE_VER_NOTES'));
-        $tpl->SetVariable('next',      _t('GLOBAL_NEXT'));
-
-        $tpl->ParseBlock('0813To0814');
-        return $tpl->Get();
-    }
-
-    /**
-     * Does any actions required to finish the stage, such as DB queries.
-     *
-     * @access  public
-     * @return  bool|Jaws_Error  Either true on success, or a Jaws_Error
-     *                          containing the reason for failure.
-     */
-    function Run()
-    {
-        // Connect to database
-        require_once JAWS_PATH . 'include/Jaws/DB.php';
-        $GLOBALS['db'] = new Jaws_DB($_SESSION['upgrade']['Database']);
-        if (Jaws_Error::IsError($GLOBALS['db'])) {
-            _log(JAWS_LOG_DEBUG,"There was a problem connecting to the database, please check the details and try again");
-            return new Jaws_Error(_t('UPGRADE_DB_RESPONSE_CONNECT_FAILED'), 0, JAWS_ERROR_WARNING);
-        }
-
-        // Create application
-        include_once JAWS_PATH . 'include/Jaws.php';
-        $GLOBALS['app'] = new Jaws();
-        $GLOBALS['app']->loadClass('ACL', 'Jaws_ACL');
-        $GLOBALS['app']->loadClass('Registry', 'Jaws_Registry');
-        $GLOBALS['app']->loadClass('Translate', 'Jaws_Translate');
-        $GLOBALS['app']->Registry->Init();
-
-        // This is needed for most gadgets
-        require_once JAWS_PATH . 'include/Jaws/Gadget.php';
-        require_once JAWS_PATH . 'include/Jaws/Template.php';
-        require_once JAWS_PATH . 'include/Jaws/Header.php';
-        $GLOBALS['app']->loadClass('Map', 'Jaws_URLMapping');
-
-        // Input datas
-        $timestamp = $GLOBALS['db']->Date();
-
-        //registry keys
-        $GLOBALS['app']->Registry->NewKey('/config/site_comment', '');
-        $GLOBALS['app']->Registry->NewKey('/config/site_favicon', 'images/jaws.png');
-        $GLOBALS['app']->Registry->NewKey('/config/site_author',
-                                          $GLOBALS['app']->Registry->Get('/config/owner_name'));
-
-        $from_email = $GLOBALS['app']->Registry->Get('/network/from_email');
-        $GLOBALS['app']->Registry->NewKey('/network/smtp_vrfy',  empty($from_email)? 'false' : 'true');
-        $GLOBALS['app']->Registry->NewKey('/network/site_email', empty($from_email)?
-                                                                 $GLOBALS['app']->Registry->Get('/config/owner_email'):
-                                                                 $from_email);
-        $GLOBALS['app']->Registry->NewKey('/network/email_name',
-                                          $GLOBALS['app']->Registry->Get('/network/from_name'));
-
-        $GLOBALS['app']->Registry->Set('/version', JAWS_VERSION);
-        $GLOBALS['app']->Registry->Set('/last_update', $timestamp);
-
-        // Commit the changes so they get saved
-        $GLOBALS['app']->Registry->commit('core');
-
-        $gadgets = array('ControlPanel', 'UrlMapper', 'Users');
-        foreach ($gadgets as $gadget) {
-            $result = Jaws_Gadget::UpdateGadget($gadget);
-            if (Jaws_Error::IsError($result)) {
-                _log(JAWS_LOG_DEBUG,"There was a problem upgrading core gadget: $gadget");
-                return new Jaws_Error(_t('UPGRADE_VER_RESPONSE_GADGET_FAILED', $gadget), 0, JAWS_ERROR_ERROR);
-            }
-        }
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous maps cache data files - step 0.8.13->0.8.14");
-        //Make sure user don't have any data/maps stuff
-        $path = JAWS_DATA . 'maps';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous registry cache data files - step 0.8.13->0.8.14");
-        //Make sure user don't have any data/cache/registry stuff
-        $path = JAWS_DATA . 'cache/registry';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous acl cache data files - step 0.8.13->0.8.14");
-        //Make sure user don't have any data/cache/acl stuff
-        $path = JAWS_DATA . 'cache/acl';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        return true;
-    }
-
-}
\ No newline at end of file

Modified: trunk/jaws/html/upgrade/stages/0816To0817.php
===================================================================
--- trunk/jaws/html/upgrade/stages/0816To0817.php	2012-08-13 16:11:10 UTC (rev 13417)
+++ trunk/jaws/html/upgrade/stages/0816To0817.php	2012-08-13 16:13:52 UTC (rev 13418)
@@ -39,57 +39,6 @@
      */
     function Run()
     {
-        if (is_dir(JAWS_DATA. "languages")) {
-            // transform customized translated files
-            $rootfiles = array('Global.php', 'Date.php', 'Install.php', 'Upgrade.php');
-            $languages = scandir(JAWS_DATA. 'languages');
-            foreach ($languages as $lang) {
-                if($lang == '.' || $lang == '..') {
-                    continue;
-                }
-
-                $ostr = "define('_".strtoupper($lang).'_';
-                $nstr = "define('_".strtoupper($lang).'_DATA_';
-
-                // gadgets
-                if (is_dir(JAWS_DATA. "languages/$lang/gadgets")) {
-                    $lGadgets = scandir(JAWS_DATA. "languages/$lang/gadgets");
-                    foreach ($lGadgets as $lGadget) {
-                        if($lGadget == '.' || $lGadget == '..') {
-                            continue;
-                        }
-
-                        $fstring = @file_get_contents(JAWS_DATA. "languages/$lang/gadgets/$lGadget");
-                        $fstring = strtr($fstring, array($nstr => $nstr, $ostr => $nstr));
-                        @file_put_contents(JAWS_DATA. "languages/$lang/gadgets/$lGadget", $fstring);
-                    }
-                }
-
-                // plugins
-                if (is_dir(JAWS_DATA. "languages/$lang/plugins")) {
-                    $lPlugins = scandir(JAWS_DATA. "languages/$lang/plugins");
-                    foreach ($lPlugins as $lPlugin) {
-                        if($lPlugin == '.' || $lPlugin == '..') {
-                            continue;
-                        }
-
-                        $fstring = @file_get_contents(JAWS_DATA. "languages/$lang/plugins/$lPlugin");
-                        $fstring = strtr($fstring, array($nstr => $nstr, $ostr => $nstr));
-                        @file_put_contents(JAWS_DATA. "languages/$lang/plugins/$lPlugin", $fstring);
-                    }
-                }
-            }
-
-            // others
-            foreach ($rootfiles as $rfile) {
-                if (file_exists(JAWS_DATA. "languages/$lang/$rfile")) {
-                    $fstring = @file_get_contents(JAWS_DATA. "languages/$lang/$rfile");
-                    $fstring = strtr($fstring, array($nstr => $nstr, $ostr => $nstr));
-                    @file_put_contents(JAWS_DATA. "languages/$lang/$rfile", $fstring);
-                }
-            }
-        }
-
         // Connect to database
         require_once JAWS_PATH . 'include/Jaws/DB.php';
         $GLOBALS['db'] = new Jaws_DB($_SESSION['upgrade']['Database']);

Added: trunk/jaws/html/upgrade/stages/0817To0818/icon.png
===================================================================
(Binary files differ)


Property changes on: trunk/jaws/html/upgrade/stages/0817To0818/icon.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/jaws/html/upgrade/stages/0817To0818/templates/display.html
===================================================================
--- trunk/jaws/html/upgrade/stages/0817To0818/templates/display.html	                        (rev 0)
+++ trunk/jaws/html/upgrade/stages/0817To0818/templates/display.html	2012-08-13 16:13:52 UTC (rev 13418)
@@ -0,0 +1,10 @@
+<!-- BEGIN 0817To0818 -->
+<p>{lbl_info}:</p>
+<ul>
+  <li></li>
+</ul>
+<div class="msg_warning">{lbl_notes}</div><br />
+<form method="post">
+<div class="buttons"><input type="submit" value="{next} >" name="0817To0818_complete" /></div>
+</form>
+<!-- END 0817To0818 -->

Added: trunk/jaws/html/upgrade/stages/0817To0818.php
===================================================================
--- trunk/jaws/html/upgrade/stages/0817To0818.php	                        (rev 0)
+++ trunk/jaws/html/upgrade/stages/0817To0818.php	2012-08-13 16:13:52 UTC (rev 13418)
@@ -0,0 +1,136 @@
+<?php
+/**
+ * Jaws Upgrade Stage - From 0.8.17 to 0.8.18
+ *
+ * @category   Application
+ * @package    UpgradeStage
+ * @author     Ali Fazelzadeh <afz at php.net>
+ * @copyright  2012 Jaws Development Group
+ * @license    http://www.gnu.org/copyleft/lesser.html
+ */
+class Upgrader_0817To0818 extends JawsUpgraderStage
+{
+    /**
+     * Builds the upgader page.
+     *
+     * @access  public
+     * @return  string A block of valid XHTML to display an introduction and form.
+     */
+    function Display()
+    {
+        $tpl = new Jaws_Template(UPGRADE_PATH  . 'stages/0817To0818/templates/');
+        $tpl->Load('display.html', false, false);
+        $tpl->SetBlock('0817To0818');
+
+        $tpl->setVariable('lbl_info',  _t('UPGRADE_VER_INFO', '0.8.17', '0.8.18'));
+        $tpl->setVariable('lbl_notes', _t('UPGRADE_VER_NOTES'));
+        $tpl->SetVariable('next',      _t('GLOBAL_NEXT'));
+
+        $tpl->ParseBlock('0817To0818');
+        return $tpl->Get();
+    }
+
+    /**
+     * Does any actions required to finish the stage, such as DB queries.
+     *
+     * @access  public
+     * @return  bool|Jaws_Error  Either true on success, or a Jaws_Error
+     *                          containing the reason for failure.
+     */
+    function Run()
+    {
+        // Connect to database
+        require_once JAWS_PATH . 'include/Jaws/DB.php';
+        $GLOBALS['db'] = new Jaws_DB($_SESSION['upgrade']['Database']);
+        if (Jaws_Error::IsError($GLOBALS['db'])) {
+            _log(JAWS_LOG_DEBUG,"There was a problem connecting to the database, please check the details and try again");
+            return new Jaws_Error(_t('UPGRADE_DB_RESPONSE_CONNECT_FAILED'), 0, JAWS_ERROR_WARNING);
+        }
+
+        _log(JAWS_LOG_DEBUG,"delete all record of session table");
+        $sql = 'DELETE FROM [[session]]';
+        $res = $GLOBALS['db']->query($sql);
+        if (Jaws_Error::IsError($res)) {
+            return $res;
+        }
+
+        // upgrade core database schema
+        $old_schema = JAWS_PATH . 'upgrade/schema/0.8.16.xml';
+        $new_schema = JAWS_PATH . 'upgrade/schema/schema.xml';
+        if (!file_exists($old_schema)) {
+            return new Jaws_Error(_t('GLOBAL_ERROR_SQLFILE_NOT_EXISTS', '0.8.16.xml'),0 , JAWS_ERROR_ERROR);
+        }
+
+        if (!file_exists($new_schema)) {
+            return new Jaws_Error(_t('GLOBAL_ERROR_SQLFILE_NOT_EXISTS', 'schema.xml'),0 , JAWS_ERROR_ERROR);
+        }
+
+        _log(JAWS_LOG_DEBUG,"Upgrading core schema");
+        $result = $GLOBALS['db']->installSchema($new_schema, '', $old_schema);
+        if (Jaws_Error::isError($result)) {
+            _log(JAWS_LOG_WARNING, $result->getMessage());
+            if ($result->getCode() !== MDB2_ERROR_ALREADY_EXISTS) {
+                return new Jaws_Error($result->getMessage(), 0, JAWS_ERROR_ERROR);
+            }
+        }
+
+        // Create application
+        include_once JAWS_PATH . 'include/Jaws.php';
+        $GLOBALS['app'] = new Jaws();
+        $GLOBALS['app']->loadClass('ACL', 'Jaws_ACL');
+        $GLOBALS['app']->loadClass('Registry', 'Jaws_Registry');
+        $GLOBALS['app']->loadClass('Translate', 'Jaws_Translate');
+        $GLOBALS['app']->Registry->Init();
+
+        // This is needed for most gadgets
+        require_once JAWS_PATH . 'include/Jaws/Gadget.php';
+        require_once JAWS_PATH . 'include/Jaws/Template.php';
+        require_once JAWS_PATH . 'include/Jaws/Header.php';
+        $GLOBALS['app']->loadClass('Map', 'Jaws_URLMapping');
+
+        // Input datas
+        $timestamp = $GLOBALS['db']->Date();
+
+        //registry keys
+        $GLOBALS['app']->Registry->NewKey('/config/editor_tinymce_toolbar', '');
+        $GLOBALS['app']->Registry->NewKey('/config/editor_ckeditor_toolbar', '');
+        $GLOBALS['app']->Registry->Set('/version', JAWS_VERSION);
+        $GLOBALS['app']->Registry->Set('/last_update', $timestamp);
+
+        // Commit the changes so they get saved
+        $GLOBALS['app']->Registry->commit('core');
+
+        $gadgets = array('Users');
+        foreach ($gadgets as $gadget) {
+            $result = Jaws_Gadget::UpdateGadget($gadget);
+            if (Jaws_Error::IsError($result)) {
+                _log(JAWS_LOG_DEBUG,"There was a problem upgrading core gadget: $gadget");
+                return new Jaws_Error(_t('UPGRADE_VER_RESPONSE_GADGET_FAILED', $gadget), 0, JAWS_ERROR_ERROR);
+            }
+        }
+
+        _log(JAWS_LOG_DEBUG,"Cleaning previous maps cache data files - step 0.8.17->0.8.18");
+        //Make sure user don't have any data/maps stuff
+        $path = JAWS_DATA . 'maps';
+        if (!Jaws_Utils::Delete($path, false)) {
+            _log(JAWS_LOG_DEBUG,"Can't delete $path");
+        }
+
+        _log(JAWS_LOG_DEBUG,"Cleaning previous registry cache data files - step 0.8.17->0.8.18");
+        //Make sure user don't have any data/cache/registry stuff
+        $path = JAWS_DATA . 'cache/registry';
+        if (!Jaws_Utils::Delete($path, false)) {
+            _log(JAWS_LOG_DEBUG,"Can't delete $path");
+        }
+
+        _log(JAWS_LOG_DEBUG,"Cleaning previous acl cache data files - step 0.8.17->0.8.18");
+        //Make sure user don't have any data/cache/acl stuff
+        $path = JAWS_DATA . 'cache/acl';
+        if (!Jaws_Utils::Delete($path, false)) {
+            _log(JAWS_LOG_DEBUG,"Can't delete $path");
+        }
+
+        return true;
+    }
+
+}
\ No newline at end of file

Deleted: trunk/jaws/html/upgrade/stages/082To083.php
===================================================================
--- trunk/jaws/html/upgrade/stages/082To083.php	2012-08-13 16:11:10 UTC (rev 13417)
+++ trunk/jaws/html/upgrade/stages/082To083.php	2012-08-13 16:13:52 UTC (rev 13418)
@@ -1,98 +0,0 @@
-<?php
-/**
- * Jaws Upgrade Stage - From 0.8.2 to 0.8.3
- *
- * @category   Application
- * @package    UpgradeStage
- * @author     Ali Fazelzadeh <afz at php.net>
- * @copyright  2008-2012 Jaws Development Group
- * @license    http://www.gnu.org/copyleft/lesser.html
- */
-class Upgrader_082To083 extends JawsUpgraderStage
-{
-    /**
-     * Builds the upgader page.
-     *
-     * @access  public
-     * @return  string A block of valid XHTML to display an introduction and form.
-     */
-    function Display()
-    {
-        $tpl = new Jaws_Template(UPGRADE_PATH  . 'stages/082To083/templates/');
-        $tpl->Load('display.html', false, false);
-        $tpl->SetBlock('082To083');
-
-        $tpl->setVariable('lbl_info',  _t('UPGRADE_VER_INFO', '0.8.2', '0.8.3'));
-        $tpl->setVariable('lbl_notes', _t('UPGRADE_VER_NOTES'));
-        $tpl->SetVariable('next',      _t('GLOBAL_NEXT'));
-
-        $tpl->ParseBlock('082To083');
-        return $tpl->Get();
-    }
-
-    /**
-     * Does any actions required to finish the stage, such as DB queries.
-     *
-     * @access  public
-     * @return  bool|Jaws_Error  Either true on success, or a Jaws_Error
-     *                          containing the reason for failure.
-     */
-    function Run()
-    {
-        // Connect to database
-        require_once JAWS_PATH . 'include/Jaws/DB.php';
-        $GLOBALS['db'] = new Jaws_DB($_SESSION['upgrade']['Database']);
-        if (Jaws_Error::IsError($GLOBALS['db'])) {
-            _log(JAWS_LOG_DEBUG,"There was a problem connecting to the database, please check the details and try again");
-            return new Jaws_Error(_t('UPGRADE_DB_RESPONSE_CONNECT_FAILED'), 0, JAWS_ERROR_WARNING);
-        }
-
-        // Create application
-        include_once JAWS_PATH . 'include/Jaws.php';
-        $GLOBALS['app'] = new Jaws();
-        $GLOBALS['app']->create();
-        $GLOBALS['app']->OverwriteDefaults(array('language' => $_SESSION['upgrade']['language']));
-        $GLOBALS['app']->loadClass('ACL', 'Jaws_ACL');
-        require_once JAWS_PATH . 'include/Jaws/URLMapping.php';
-        $GLOBALS['app']->Map = new Jaws_URLMapping();
-
-        $result = Jaws_Gadget::UpdateGadget('Layout');
-        if (Jaws_Error::IsError($result)) {
-            _log(JAWS_LOG_DEBUG,"There was a problem upgrading core gadget: Layout");
-            return new Jaws_Error(_t('UPGRADE_VER_RESPONSE_GADGET_FAILED', 'Layout'), 0, JAWS_ERROR_ERROR);
-        }
-
-        // Input datas
-        $timestamp = $GLOBALS['db']->Date();
-
-        //registry keys
-        $GLOBALS['app']->Registry->Set('/version', JAWS_VERSION);
-        $GLOBALS['app']->Registry->Set('/last_update', $timestamp);
-
-        // Commit the changes so they get saved
-        $GLOBALS['app']->Registry->commit('core');
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous maps cache data files - step 0.8.2->0.8.3");
-        //Make sure user don't have any data/maps stuff
-        $path = JAWS_DATA . 'maps';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous registry cache data files - step 0.8.2->0.8.3");
-        //Make sure user don't have any data/cache/registry stuff
-        $path = JAWS_DATA . 'cache/registry';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous acl cache data files - step 0.8.2->0.8.3");
-        //Make sure user don't have any data/cache/acl stuff
-        $path = JAWS_DATA . 'cache/acl';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        return true;
-    }
-}

Deleted: trunk/jaws/html/upgrade/stages/083To084.php
===================================================================
--- trunk/jaws/html/upgrade/stages/083To084.php	2012-08-13 16:11:10 UTC (rev 13417)
+++ trunk/jaws/html/upgrade/stages/083To084.php	2012-08-13 16:13:52 UTC (rev 13418)
@@ -1,98 +0,0 @@
-<?php
-/**
- * Jaws Upgrade Stage - From 0.8.3 to 0.8.4
- *
- * @category   Application
- * @package    UpgradeStage
- * @author     Ali Fazelzadeh <afz at php.net>
- * @copyright  2008-2012 Jaws Development Group
- * @license    http://www.gnu.org/copyleft/lesser.html
- */
-class Upgrader_083To084 extends JawsUpgraderStage
-{
-    /**
-     * Builds the upgader page.
-     *
-     * @access  public
-     * @return  string A block of valid XHTML to display an introduction and form.
-     */
-    function Display()
-    {
-        $tpl = new Jaws_Template(UPGRADE_PATH  . 'stages/083To084/templates/');
-        $tpl->Load('display.html', false, false);
-        $tpl->SetBlock('083To084');
-
-        $tpl->setVariable('lbl_info',  _t('UPGRADE_VER_INFO', '0.8.3', '0.8.4'));
-        $tpl->setVariable('lbl_notes', _t('UPGRADE_VER_NOTES'));
-        $tpl->SetVariable('next',      _t('GLOBAL_NEXT'));
-
-        $tpl->ParseBlock('083To084');
-        return $tpl->Get();
-    }
-
-    /**
-     * Does any actions required to finish the stage, such as DB queries.
-     *
-     * @access  public
-     * @return  bool|Jaws_Error  Either true on success, or a Jaws_Error
-     *                          containing the reason for failure.
-     */
-    function Run()
-    {
-        // Connect to database
-        require_once JAWS_PATH . 'include/Jaws/DB.php';
-        $GLOBALS['db'] = new Jaws_DB($_SESSION['upgrade']['Database']);
-        if (Jaws_Error::IsError($GLOBALS['db'])) {
-            _log(JAWS_LOG_DEBUG,"There was a problem connecting to the database, please check the details and try again");
-            return new Jaws_Error(_t('UPGRADE_DB_RESPONSE_CONNECT_FAILED'), 0, JAWS_ERROR_WARNING);
-        }
-
-        // Create application
-        include_once JAWS_PATH . 'include/Jaws.php';
-        $GLOBALS['app'] = new Jaws();
-        $GLOBALS['app']->create();
-        $GLOBALS['app']->OverwriteDefaults(array('language' => $_SESSION['upgrade']['language']));
-        $GLOBALS['app']->loadClass('ACL', 'Jaws_ACL');
-        require_once JAWS_PATH . 'include/Jaws/URLMapping.php';
-        $GLOBALS['app']->Map = new Jaws_URLMapping();
-
-        $result = Jaws_Gadget::UpdateGadget('Layout');
-        if (Jaws_Error::IsError($result)) {
-            _log(JAWS_LOG_DEBUG,"There was a problem upgrading core gadget: Layout");
-            return new Jaws_Error(_t('UPGRADE_VER_RESPONSE_GADGET_FAILED', 'Layout'), 0, JAWS_ERROR_ERROR);
-        }
-
-        // Input datas
-        $timestamp = $GLOBALS['db']->Date();
-
-        //registry keys
-        $GLOBALS['app']->Registry->Set('/version', JAWS_VERSION);
-        $GLOBALS['app']->Registry->Set('/last_update', $timestamp);
-
-        // Commit the changes so they get saved
-        $GLOBALS['app']->Registry->commit('core');
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous maps cache data files - step 0.8.3->0.8.4");
-        //Make sure user don't have any data/maps stuff
-        $path = JAWS_DATA . 'maps';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous registry cache data files - step 0.8.3->0.8.4");
-        //Make sure user don't have any data/cache/registry stuff
-        $path = JAWS_DATA . 'cache/registry';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous acl cache data files - step 0.8.3->0.8.4");
-        //Make sure user don't have any data/cache/acl stuff
-        $path = JAWS_DATA . 'cache/acl';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        return true;
-    }
-}

Deleted: trunk/jaws/html/upgrade/stages/084To085.php
===================================================================
--- trunk/jaws/html/upgrade/stages/084To085.php	2012-08-13 16:11:10 UTC (rev 13417)
+++ trunk/jaws/html/upgrade/stages/084To085.php	2012-08-13 16:13:52 UTC (rev 13418)
@@ -1,91 +0,0 @@
-<?php
-/**
- * Jaws Upgrade Stage - From 0.8.4 to 0.8.5
- *
- * @category   Application
- * @package    UpgradeStage
- * @author     Ali Fazelzadeh <afz at php.net>
- * @copyright  2008-2012 Jaws Development Group
- * @license    http://www.gnu.org/copyleft/lesser.html
- */
-class Upgrader_084To085 extends JawsUpgraderStage
-{
-    /**
-     * Builds the upgader page.
-     *
-     * @access  public
-     * @return  string A block of valid XHTML to display an introduction and form.
-     */
-    function Display()
-    {
-        $tpl = new Jaws_Template(UPGRADE_PATH  . 'stages/084To085/templates/');
-        $tpl->Load('display.html', false, false);
-        $tpl->SetBlock('084To085');
-
-        $tpl->setVariable('lbl_info',  _t('UPGRADE_VER_INFO', '0.8.4', '0.8.5'));
-        $tpl->setVariable('lbl_notes', _t('UPGRADE_VER_NOTES'));
-        $tpl->SetVariable('next',      _t('GLOBAL_NEXT'));
-
-        $tpl->ParseBlock('084To085');
-        return $tpl->Get();
-    }
-
-    /**
-     * Does any actions required to finish the stage, such as DB queries.
-     *
-     * @access  public
-     * @return  bool|Jaws_Error  Either true on success, or a Jaws_Error
-     *                          containing the reason for failure.
-     */
-    function Run()
-    {
-        // Connect to database
-        require_once JAWS_PATH . 'include/Jaws/DB.php';
-        $GLOBALS['db'] = new Jaws_DB($_SESSION['upgrade']['Database']);
-        if (Jaws_Error::IsError($GLOBALS['db'])) {
-            _log(JAWS_LOG_DEBUG,"There was a problem connecting to the database, please check the details and try again");
-            return new Jaws_Error(_t('UPGRADE_DB_RESPONSE_CONNECT_FAILED'), 0, JAWS_ERROR_WARNING);
-        }
-
-        // Create application
-        include_once JAWS_PATH . 'include/Jaws.php';
-        $GLOBALS['app'] = new Jaws();
-        $GLOBALS['app']->create();
-        $GLOBALS['app']->OverwriteDefaults(array('language' => $_SESSION['upgrade']['language']));
-        $GLOBALS['app']->loadClass('ACL', 'Jaws_ACL');
-
-        // Input datas
-        $timestamp = $GLOBALS['db']->Date();
-
-        //registry keys
-        $GLOBALS['app']->Registry->Set('/version', JAWS_VERSION);
-        $GLOBALS['app']->Registry->Set('/config/browsers_flag', 'opera,firefox,ie7up,ie,safari,nav,konq,gecko,text');
-        $GLOBALS['app']->Registry->Set('/last_update', $timestamp);
-
-        // Commit the changes so they get saved
-        $GLOBALS['app']->Registry->commit('core');
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous maps cache data files - step 0.8.4->0.8.5");
-        //Make sure user don't have any data/maps stuff
-        $path = JAWS_DATA . 'maps';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous registry cache data files - step 0.8.4->0.8.5");
-        //Make sure user don't have any data/cache/registry stuff
-        $path = JAWS_DATA . 'cache/registry';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous acl cache data files - step 0.8.4->0.8.5");
-        //Make sure user don't have any data/cache/acl stuff
-        $path = JAWS_DATA . 'cache/acl';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        return true;
-    }
-}

Deleted: trunk/jaws/html/upgrade/stages/085To086.php
===================================================================
--- trunk/jaws/html/upgrade/stages/085To086.php	2012-08-13 16:11:10 UTC (rev 13417)
+++ trunk/jaws/html/upgrade/stages/085To086.php	2012-08-13 16:13:52 UTC (rev 13418)
@@ -1,100 +0,0 @@
-<?php
-/**
- * Jaws Upgrade Stage - From 0.8.5 to 0.8.6
- *
- * @category   Application
- * @package    UpgradeStage
- * @author     Ali Fazelzadeh <afz at php.net>
- * @copyright  2008-2012 Jaws Development Group
- * @license    http://www.gnu.org/copyleft/lesser.html
- */
-class Upgrader_085To086 extends JawsUpgraderStage
-{
-    /**
-     * Builds the upgader page.
-     *
-     * @access  public
-     * @return  string A block of valid XHTML to display an introduction and form.
-     */
-    function Display()
-    {
-        $tpl = new Jaws_Template(UPGRADE_PATH  . 'stages/085To086/templates/');
-        $tpl->Load('display.html', false, false);
-        $tpl->SetBlock('085To086');
-
-        $tpl->setVariable('lbl_info',  _t('UPGRADE_VER_INFO', '0.8.5', '0.8.6'));
-        $tpl->setVariable('lbl_notes', _t('UPGRADE_VER_NOTES'));
-        $tpl->SetVariable('next',      _t('GLOBAL_NEXT'));
-
-        $tpl->ParseBlock('085To086');
-        return $tpl->Get();
-    }
-
-    /**
-     * Does any actions required to finish the stage, such as DB queries.
-     *
-     * @access  public
-     * @return  bool|Jaws_Error  Either true on success, or a Jaws_Error
-     *                          containing the reason for failure.
-     */
-    function Run()
-    {
-        // Connect to database
-        require_once JAWS_PATH . 'include/Jaws/DB.php';
-        $GLOBALS['db'] = new Jaws_DB($_SESSION['upgrade']['Database']);
-        if (Jaws_Error::IsError($GLOBALS['db'])) {
-            _log(JAWS_LOG_DEBUG,"There was a problem connecting to the database, please check the details and try again");
-            return new Jaws_Error(_t('UPGRADE_DB_RESPONSE_CONNECT_FAILED'), 0, JAWS_ERROR_WARNING);
-        }
-
-        // Create application
-        include_once JAWS_PATH . 'include/Jaws.php';
-        $GLOBALS['app'] = new Jaws();
-        $GLOBALS['app']->create();
-        $GLOBALS['app']->OverwriteDefaults(array('language' => $_SESSION['upgrade']['language']));
-        $GLOBALS['app']->loadClass('ACL', 'Jaws_ACL');
-
-        // Input datas
-        $timestamp = $GLOBALS['db']->Date();
-
-        //registry keys
-        $GLOBALS['app']->Registry->Set('/map/custom_precedence', 'false');
-        $GLOBALS['app']->Registry->Set('/version', JAWS_VERSION);
-        $GLOBALS['app']->Registry->Set('/last_update', $timestamp);
-
-        // Commit the changes so they get saved
-        $GLOBALS['app']->Registry->commit('core');
-
-        require_once JAWS_PATH . 'include/Jaws/URLMapping.php';
-        $GLOBALS['app']->Map = new Jaws_URLMapping();
-
-        $result = Jaws_Gadget::UpdateGadget('UrlMapper');
-        if (Jaws_Error::IsError($result)) {
-            _log(JAWS_LOG_DEBUG,"There was a problem upgrading core gadget: UrlMapper");
-            return new Jaws_Error(_t('UPGRADE_VER_RESPONSE_GADGET_FAILED', 'UrlMapper'), 0, JAWS_ERROR_ERROR);
-        }
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous maps cache data files - step 0.8.5->0.8.6");
-        //Make sure user don't have any data/maps stuff
-        $path = JAWS_DATA . 'maps';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous registry cache data files - step 0.8.5->0.8.6");
-        //Make sure user don't have any data/cache/registry stuff
-        $path = JAWS_DATA . 'cache/registry';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous acl cache data files - step 0.8.5->0.8.6");
-        //Make sure user don't have any data/cache/acl stuff
-        $path = JAWS_DATA . 'cache/acl';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        return true;
-    }
-}

Deleted: trunk/jaws/html/upgrade/stages/086To087.php
===================================================================
--- trunk/jaws/html/upgrade/stages/086To087.php	2012-08-13 16:11:10 UTC (rev 13417)
+++ trunk/jaws/html/upgrade/stages/086To087.php	2012-08-13 16:13:52 UTC (rev 13418)
@@ -1,107 +0,0 @@
-<?php
-/**
- * Jaws Upgrade Stage - From 0.8.6 to 0.8.7
- *
- * @category   Application
- * @package    UpgradeStage
- * @author     Ali Fazelzadeh <afz at php.net>
- * @copyright  2008-2012 Jaws Development Group
- * @license    http://www.gnu.org/copyleft/lesser.html
- */
-class Upgrader_086To087 extends JawsUpgraderStage
-{
-    /**
-     * Builds the upgader page.
-     *
-     * @access  public
-     * @return  string A block of valid XHTML to display an introduction and form.
-     */
-    function Display()
-    {
-        $tpl = new Jaws_Template(UPGRADE_PATH  . 'stages/086To087/templates/');
-        $tpl->Load('display.html', false, false);
-        $tpl->SetBlock('086To087');
-
-        $tpl->setVariable('lbl_info',  _t('UPGRADE_VER_INFO', '0.8.6', '0.8.7'));
-        $tpl->setVariable('lbl_notes', _t('UPGRADE_VER_NOTES'));
-        $tpl->SetVariable('next',      _t('GLOBAL_NEXT'));
-
-        $tpl->ParseBlock('086To087');
-        return $tpl->Get();
-    }
-
-    /**
-     * Does any actions required to finish the stage, such as DB queries.
-     *
-     * @access  public
-     * @return  bool|Jaws_Error  Either true on success, or a Jaws_Error
-     *                          containing the reason for failure.
-     */
-    function Run()
-    {
-        // Connect to database
-        require_once JAWS_PATH . 'include/Jaws/DB.php';
-        $GLOBALS['db'] = new Jaws_DB($_SESSION['upgrade']['Database']);
-        if (Jaws_Error::IsError($GLOBALS['db'])) {
-            _log(JAWS_LOG_DEBUG,"There was a problem connecting to the database, please check the details and try again");
-            return new Jaws_Error(_t('UPGRADE_DB_RESPONSE_CONNECT_FAILED'), 0, JAWS_ERROR_WARNING);
-        }
-
-        // Create application
-        include_once JAWS_PATH . 'include/Jaws.php';
-        $GLOBALS['app'] = new Jaws();
-        $GLOBALS['app']->create();
-        $GLOBALS['app']->OverwriteDefaults(array('language' => $_SESSION['upgrade']['language']));
-        $GLOBALS['app']->loadClass('ACL', 'Jaws_ACL');
-
-        // Input datas
-        $timestamp = $GLOBALS['db']->Date();
-
-        //registry keys
-        $result = $GLOBALS['app']->Registry->NewKeyEx(
-                    array('/config/anon_type', '2'),
-                    array('/config/anon_group', '')
-        );
-
-        //for fix issue in upgrade to 0.8.6
-        $GLOBALS['app']->Registry->NewKey('/map/custom_precedence', 'false');
-
-        $GLOBALS['app']->Registry->Set('/version', JAWS_VERSION);
-        $GLOBALS['app']->Registry->Set('/last_update', $timestamp);
-
-        // Commit the changes so they get saved
-        $GLOBALS['app']->Registry->commit('core');
-
-        require_once JAWS_PATH . 'include/Jaws/URLMapping.php';
-        $GLOBALS['app']->Map = new Jaws_URLMapping();
-
-        $result = Jaws_Gadget::UpdateGadget('Users');
-        if (Jaws_Error::IsError($result)) {
-            _log(JAWS_LOG_DEBUG,"There was a problem upgrading core gadget: Users");
-            return new Jaws_Error(_t('UPGRADE_VER_RESPONSE_GADGET_FAILED', 'Users'), 0, JAWS_ERROR_ERROR);
-        }
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous maps cache data files - step 0.8.6->0.8.7");
-        //Make sure user don't have any data/maps stuff
-        $path = JAWS_DATA . 'maps';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous registry cache data files - step 0.8.6->0.8.7");
-        //Make sure user don't have any data/cache/registry stuff
-        $path = JAWS_DATA . 'cache/registry';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous acl cache data files - step 0.8.6->0.8.7");
-        //Make sure user don't have any data/cache/acl stuff
-        $path = JAWS_DATA . 'cache/acl';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        return true;
-    }
-}

Deleted: trunk/jaws/html/upgrade/stages/087To088.php
===================================================================
--- trunk/jaws/html/upgrade/stages/087To088.php	2012-08-13 16:11:10 UTC (rev 13417)
+++ trunk/jaws/html/upgrade/stages/087To088.php	2012-08-13 16:13:52 UTC (rev 13418)
@@ -1,108 +0,0 @@
-<?php
-/**
- * Jaws Upgrade Stage - From 0.8.7 to 0.8.8
- *
- * @category   Application
- * @package    UpgradeStage
- * @author     Ali Fazelzadeh <afz at php.net>
- * @copyright  2009-2012 Jaws Development Group
- * @license    http://www.gnu.org/copyleft/lesser.html
- */
-class Upgrader_087To088 extends JawsUpgraderStage
-{
-    /**
-     * Builds the upgader page.
-     *
-     * @access  public
-     * @return  string A block of valid XHTML to display an introduction and form.
-     */
-    function Display()
-    {
-        $tpl = new Jaws_Template(UPGRADE_PATH  . 'stages/087To088/templates/');
-        $tpl->Load('display.html', false, false);
-        $tpl->SetBlock('087To088');
-
-        $tpl->setVariable('lbl_info',  _t('UPGRADE_VER_INFO', '0.8.7', '0.8.8'));
-        $tpl->setVariable('lbl_notes', _t('UPGRADE_VER_NOTES'));
-        $tpl->SetVariable('next',      _t('GLOBAL_NEXT'));
-
-        $tpl->ParseBlock('087To088');
-        return $tpl->Get();
-    }
-
-    /**
-     * Does any actions required to finish the stage, such as DB queries.
-     *
-     * @access  public
-     * @return  bool|Jaws_Error  Either true on success, or a Jaws_Error
-     *                          containing the reason for failure.
-     */
-    function Run()
-    {
-        // Connect to database
-        require_once JAWS_PATH . 'include/Jaws/DB.php';
-        $GLOBALS['db'] = new Jaws_DB($_SESSION['upgrade']['Database']);
-        if (Jaws_Error::IsError($GLOBALS['db'])) {
-            _log(JAWS_LOG_DEBUG,"There was a problem connecting to the database, please check the details and try again");
-            return new Jaws_Error(_t('UPGRADE_DB_RESPONSE_CONNECT_FAILED'), 0, JAWS_ERROR_WARNING);
-        }
-
-        // Create application
-        include_once JAWS_PATH . 'include/Jaws.php';
-        $GLOBALS['app'] = new Jaws();
-        $GLOBALS['app']->create();
-        $GLOBALS['app']->OverwriteDefaults(array('language' => $_SESSION['upgrade']['language']));
-        $GLOBALS['app']->loadClass('ACL', 'Jaws_ACL');
-
-        // Input datas
-        $timestamp = $GLOBALS['db']->Date();
-
-        //registry keys
-        $result = $GLOBALS['app']->Registry->NewKeyEx(
-                    array('/config/admin_script', ''),
-                    array('/config/site_status', 'enabled')
-        );
-
-        $GLOBALS['app']->Registry->Set('/version', JAWS_VERSION);
-        $GLOBALS['app']->Registry->Set('/last_update', $timestamp);
-
-        // Commit the changes so they get saved
-        $GLOBALS['app']->Registry->commit('core');
-
-        require_once JAWS_PATH . 'include/Jaws/URLMapping.php';
-        $GLOBALS['app']->Map = new Jaws_URLMapping();
-
-        $gadgets = array('Users', 'Policy');
-        foreach ($gadgets as $gadget) {
-            _log(JAWS_LOG_DEBUG,"Upgrading core gadget: ".$gadget);
-            $result = Jaws_Gadget::UpdateGadget($gadget);
-            if (Jaws_Error::IsError($result)) {
-                _log(JAWS_LOG_DEBUG,"There was a problem upgrading core gadget: $gadget");
-                return new Jaws_Error(_t('UPGRADE_VER_RESPONSE_GADGET_FAILED', $gadget), 0, JAWS_ERROR_ERROR);
-            }
-        }
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous maps cache data files - step 0.8.7->0.8.8");
-        //Make sure user don't have any data/maps stuff
-        $path = JAWS_DATA . 'maps';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous registry cache data files - step 0.8.7->0.8.8");
-        //Make sure user don't have any data/cache/registry stuff
-        $path = JAWS_DATA . 'cache/registry';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous acl cache data files - step 0.8.7->0.8.8");
-        //Make sure user don't have any data/cache/acl stuff
-        $path = JAWS_DATA . 'cache/acl';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        return true;
-    }
-}

Deleted: trunk/jaws/html/upgrade/stages/088To089.php
===================================================================
--- trunk/jaws/html/upgrade/stages/088To089.php	2012-08-13 16:11:10 UTC (rev 13417)
+++ trunk/jaws/html/upgrade/stages/088To089.php	2012-08-13 16:13:52 UTC (rev 13418)
@@ -1,108 +0,0 @@
-<?php
-/**
- * Jaws Upgrade Stage - From 0.8.8 to 0.8.9
- *
- * @category   Application
- * @package    UpgradeStage
- * @author     Ali Fazelzadeh <afz at php.net>
- * @copyright  2009-2012 Jaws Development Group
- * @license    http://www.gnu.org/copyleft/lesser.html
- */
-class Upgrader_088To089 extends JawsUpgraderStage
-{
-    /**
-     * Builds the upgader page.
-     *
-     * @access  public
-     * @return  string A block of valid XHTML to display an introduction and form.
-     */
-    function Display()
-    {
-        $tpl = new Jaws_Template(UPGRADE_PATH  . 'stages/088To089/templates/');
-        $tpl->Load('display.html', false, false);
-        $tpl->SetBlock('088To089');
-
-        $tpl->setVariable('lbl_info',  _t('UPGRADE_VER_INFO', '0.8.8', '0.8.9'));
-        $tpl->setVariable('lbl_notes', _t('UPGRADE_VER_NOTES'));
-        $tpl->SetVariable('next',      _t('GLOBAL_NEXT'));
-
-        $tpl->ParseBlock('088To089');
-        return $tpl->Get();
-    }
-
-    /**
-     * Does any actions required to finish the stage, such as DB queries.
-     *
-     * @access  public
-     * @return  bool|Jaws_Error  Either true on success, or a Jaws_Error
-     *                          containing the reason for failure.
-     */
-    function Run()
-    {
-        // Connect to database
-        require_once JAWS_PATH . 'include/Jaws/DB.php';
-        $GLOBALS['db'] = new Jaws_DB($_SESSION['upgrade']['Database']);
-        if (Jaws_Error::IsError($GLOBALS['db'])) {
-            _log(JAWS_LOG_DEBUG,"There was a problem connecting to the database, please check the details and try again");
-            return new Jaws_Error(_t('UPGRADE_DB_RESPONSE_CONNECT_FAILED'), 0, JAWS_ERROR_WARNING);
-        }
-
-        // Create application
-        include_once JAWS_PATH . 'include/Jaws.php';
-        $GLOBALS['app'] = new Jaws();
-        $GLOBALS['app']->loadClass('ACL', 'Jaws_ACL');
-        $GLOBALS['app']->loadClass('Registry', 'Jaws_Registry');
-        $GLOBALS['app']->loadClass('Translate', 'Jaws_Translate');
-        $GLOBALS['app']->Registry->Init();
-
-        // This is needed for most gadgets
-        require_once JAWS_PATH . 'include/Jaws/Gadget.php';
-        require_once JAWS_PATH . 'include/Jaws/Template.php';
-        require_once JAWS_PATH . 'include/Jaws/Header.php';
-        $GLOBALS['app']->loadClass('Map', 'Jaws_URLMapping');
-
-        // Input datas
-        $timestamp = $GLOBALS['db']->Date();
-
-        //registry keys
-        $GLOBALS['app']->Registry->NewKey('/config/anon_activation', 'user');
-
-        $GLOBALS['app']->Registry->Set('/version', JAWS_VERSION);
-        $GLOBALS['app']->Registry->Set('/last_update', $timestamp);
-
-        // Commit the changes so they get saved
-        $GLOBALS['app']->Registry->commit('core');
-
-        $gadgets = array('UrlMapper', 'Users');
-        foreach ($gadgets as $gadget) {
-            $result = Jaws_Gadget::UpdateGadget($gadget);
-            if (Jaws_Error::IsError($result)) {
-                _log(JAWS_LOG_DEBUG,"There was a problem upgrading core gadget: $gadget");
-                return new Jaws_Error(_t('UPGRADE_VER_RESPONSE_GADGET_FAILED', $gadget), 0, JAWS_ERROR_ERROR);
-            }
-        }
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous maps cache data files - step 0.8.8->0.8.9");
-        //Make sure user don't have any data/maps stuff
-        $path = JAWS_DATA . 'maps';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous registry cache data files - step 0.8.8->0.8.9");
-        //Make sure user don't have any data/cache/registry stuff
-        $path = JAWS_DATA . 'cache/registry';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous acl cache data files - step 0.8.8->0.8.9");
-        //Make sure user don't have any data/cache/acl stuff
-        $path = JAWS_DATA . 'cache/acl';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        return true;
-    }
-}

Deleted: trunk/jaws/html/upgrade/stages/089To0810.php
===================================================================
--- trunk/jaws/html/upgrade/stages/089To0810.php	2012-08-13 16:11:10 UTC (rev 13417)
+++ trunk/jaws/html/upgrade/stages/089To0810.php	2012-08-13 16:13:52 UTC (rev 13418)
@@ -1,112 +0,0 @@
-<?php
-/**
- * Jaws Upgrade Stage - From 0.8.9 to 0.8.10
- *
- * @category   Application
- * @package    UpgradeStage
- * @author     Ali Fazelzadeh <afz at php.net>
- * @copyright  2009-2012 Jaws Development Group
- * @license    http://www.gnu.org/copyleft/lesser.html
- */
-class Upgrader_089To0810 extends JawsUpgraderStage
-{
-    /**
-     * Builds the upgader page.
-     *
-     * @access  public
-     * @return  string A block of valid XHTML to display an introduction and form.
-     */
-    function Display()
-    {
-        $tpl = new Jaws_Template(UPGRADE_PATH  . 'stages/089To0810/templates/');
-        $tpl->Load('display.html', false, false);
-        $tpl->SetBlock('089To0810');
-
-        $tpl->setVariable('lbl_info',  _t('UPGRADE_VER_INFO', '0.8.9', '0.8.10'));
-        $tpl->setVariable('lbl_notes', _t('UPGRADE_VER_NOTES'));
-        $tpl->SetVariable('next',      _t('GLOBAL_NEXT'));
-
-        $tpl->ParseBlock('089To0810');
-        return $tpl->Get();
-    }
-
-    /**
-     * Does any actions required to finish the stage, such as DB queries.
-     *
-     * @access  public
-     * @return  bool|Jaws_Error  Either true on success, or a Jaws_Error
-     *                          containing the reason for failure.
-     */
-    function Run()
-    {
-        // Connect to database
-        require_once JAWS_PATH . 'include/Jaws/DB.php';
-        $GLOBALS['db'] = new Jaws_DB($_SESSION['upgrade']['Database']);
-        if (Jaws_Error::IsError($GLOBALS['db'])) {
-            _log(JAWS_LOG_ERROR,
-                 "There was a problem connecting to the database, please check the details and try again");
-            return new Jaws_Error(_t('UPGRADE_DB_RESPONSE_CONNECT_FAILED'));
-        }
-
-        // Create application
-        include_once JAWS_PATH . 'include/Jaws.php';
-        $GLOBALS['app'] = new Jaws();
-        $GLOBALS['app']->loadClass('ACL', 'Jaws_ACL');
-        $GLOBALS['app']->loadClass('Registry', 'Jaws_Registry');
-        $GLOBALS['app']->loadClass('Translate', 'Jaws_Translate');
-        $GLOBALS['app']->Registry->Init();
-
-        // This is needed for most gadgets
-        require_once JAWS_PATH . 'include/Jaws/Gadget.php';
-        require_once JAWS_PATH . 'include/Jaws/Template.php';
-        require_once JAWS_PATH . 'include/Jaws/Header.php';
-        $GLOBALS['app']->loadClass('Map', 'Jaws_URLMapping');
-
-        // Input datas
-        $timestamp = $GLOBALS['db']->Date();
-
-        //registry keys
-        $GLOBALS['app']->Registry->NewKey('/config/anon_repetitive_email', 'true');
-        $GLOBALS['app']->Registry->NewKey('/config/site_slogan',
-                                          $GLOBALS['app']->Registry->Get('/config/site_description'));
-        $GLOBALS['app']->Registry->NewKey('/config/site_license', '');
-
-        $GLOBALS['app']->Registry->Set('/version', JAWS_VERSION);
-        $GLOBALS['app']->Registry->Set('/last_update', $timestamp);
-
-        // Commit the changes so they get saved
-        $GLOBALS['app']->Registry->commit('core');
-
-        $gadgets = array('UrlMapper', 'Users');
-        foreach ($gadgets as $gadget) {
-            $result = Jaws_Gadget::UpdateGadget($gadget);
-            if (Jaws_Error::IsError($result)) {
-                _log(JAWS_LOG_DEBUG,"There was a problem upgrading core gadget: $gadget");
-                return new Jaws_Error(_t('UPGRADE_VER_RESPONSE_GADGET_FAILED', $gadget), 0, JAWS_ERROR_ERROR);
-            }
-        }
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous maps cache data files - step 0.8.9->0.8.10");
-        //Make sure user don't have any data/maps stuff
-        $path = JAWS_DATA . 'maps';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous registry cache data files - step 0.8.9->0.8.10");
-        //Make sure user don't have any data/cache/registry stuff
-        $path = JAWS_DATA . 'cache/registry';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        _log(JAWS_LOG_DEBUG,"Cleaning previous acl cache data files - step 0.8.9->0.8.10");
-        //Make sure user don't have any data/cache/acl stuff
-        $path = JAWS_DATA . 'cache/acl';
-        if (!Jaws_Utils::Delete($path, false)) {
-            _log(JAWS_LOG_DEBUG,"Can't delete $path");
-        }
-
-        return true;
-    }
-}

Deleted: trunk/jaws/html/upgrade/stages/08To081.php
===================================================================
--- trunk/jaws/html/upgrade/stages/08To081.php	2012-08-13 16:11:10 UTC (rev 13417)
+++ trunk/jaws/html/upgrade/stages/08To081.php	2012-08-13 16:13:52 UTC (rev 13418)
@@ -1,82 +0,0 @@
-<?php
-/**
- * Jaws Upgrade Stage - From 0.8.0 to 0.8.1
- *
- * @category   Application
- * @package    UpgradeStage
- * @author     Ali Fazelzadeh <afz at php.net>
- * @copyright  2008-2012 Jaws Development Group
- * @license    http://www.gnu.org/copyleft/lesser.html
- */
-class Upgrader_08To081 extends JawsUpgraderStage
-{
-    /**
-     * Builds the upgader page.
-     *
-     * @access  public
-     * @return  string A block of valid XHTML to display an introduction and form.
-     */
-    function Display()
-    {
-        $tpl = new Jaws_Template(UPGRADE_PATH  . 'stages/08To081/templates/');
-        $tpl->Load('display.html', false, false);
-        $tpl->SetBlock('08To081');
-
-        $tpl->setVariable('lbl_info',  _t('UPGRADE_VER_INFO', '0.8.0', '0.8.1'));
-        $tpl->setVariable('lbl_notes', _t('UPGRADE_VER_NOTES'));
-        $tpl->SetVariable('next',      _t('GLOBAL_NEXT'));
-
-        $tpl->ParseBlock('08To081');
-        return $tpl->Get();
-    }
-
-    /**
-     * Does any actions required to finish the stage, such as DB queries.
-     *
-     * @access  public
-     * @return  bool|Jaws_Error  Either true on success, or a Jaws_Error
-     *                          containing the reason for failure.
-     */
-    function Run()
-    {
-        // Connect to database
-        require_once JAWS_PATH . 'include/Jaws/DB.php';
-        $GLOBALS['db'] = new Jaws_DB($_SESSION['upgrade']['Database']);
-        if (Jaws_Error::IsError($GLOBALS['db'])) {
-            _log(JAWS_LOG_DEBUG,"There was a problem connecting to the database, please check the details and try again");
-            return new Jaws_Error(_t('UPGRADE_DB_RESPONSE_CONNECT_FAILED'), 0, JAWS_ERROR_WARNING);
-        }
-
-        $params = array();
-        $params['method'] = 'UninstallGadget';
-
-        $sql = '
-            DELETE FROM [[listeners]]
-            WHERE [method] = {method}';
-
-        $res = $GLOBALS['db']->query($sql, $params);
-        if (Jaws_Error::IsError($res)) {
-            return $res;
-        }
-
-        // Create application
-        include_once JAWS_PATH . 'include/Jaws.php';
-        $GLOBALS['app'] = new Jaws();
-        $GLOBALS['app']->create();
-        $GLOBALS['app']->OverwriteDefaults(array('language' => $_SESSION['upgrade']['language']));
-        $GLOBALS['app']->loadClass('ACL', 'Jaws_ACL');
-
-        // Input datas
-        $timestamp = $GLOBALS['db']->Date();
-
-        //registry keys
-        $GLOBALS['app']->Registry->Set('/version', JAWS_VERSION);
-        $GLOBALS['app']->Registry->Set('/last_update', $timestamp);
-        $GLOBALS['app']->Registry->Set('/config/site_url','');
-
-        // Commit the changes so they get saved
-        $GLOBALS['app']->Registry->commit('core');
-
-        return true;
-    }
-}

Modified: trunk/jaws/html/upgrade/stages/Report.php
===================================================================
--- trunk/jaws/html/upgrade/stages/Report.php	2012-08-13 16:11:10 UTC (rev 13417)
+++ trunk/jaws/html/upgrade/stages/Report.php	2012-08-13 16:13:52 UTC (rev 13418)
@@ -31,97 +31,25 @@
 
         $supportedversions = array(
                                    array(
-                                         'version'   => '0.8.17',
-                                         'stage'     => '21',
-                                         ),
-                                   array(
-                                         'version'   => '0.8.16',
-                                         'stage'     => '20',
-                                         ),
-                                   array(
-                                         'version'   => '0.8.15',
-                                         'stage'     => '19',
-                                         ),
-                                   array(
-                                         'version'   => '0.8.14',
-                                         'stage'     => '18',
-                                         ),
-                                   array(
-                                         'version'   => '0.8.13',
-                                         'stage'     => '17',
-                                         ),
-                                   array(
-                                         'version'   => '0.8.12',
-                                         'stage'     => '16',
-                                         ),
-                                   array(
-                                         'version'   => '0.8.11',
-                                         'stage'     => '15',
-                                         ),
-                                   array(
-                                         'version'   => '0.8.10',
-                                         'stage'     => '14',
-                                         ),
-                                   array(
-                                         'version'   => '0.8.9',
-                                         'stage'     => '13',
-                                         ),
-                                   array(
-                                         'version'   => '0.8.8',
-                                         'stage'     => '12',
-                                         ),
-                                   array(
-                                         'version'   => '0.8.7',
-                                         'stage'     => '11',
-                                         ),
-                                   array(
-                                         'version'   => '0.8.6',
-                                         'stage'     => '10',
-                                         ),
-                                   array(
-                                         'version'   => '0.8.5',
-                                         'stage'     => '9',
-                                         ),
-                                   array(
-                                         'version'   => '0.8.4',
+                                         'version'   => '0.8.18',
                                          'stage'     => '8',
                                          ),
                                    array(
-                                         'version'   => '0.8.3',
+                                         'version'   => '0.8.17',
                                          'stage'     => '7',
                                          ),
                                    array(
-                                         'version'   => '0.8.2',
-                                         'stage'     => null,
-                                         ),
-                                   array(
-                                         'version'   => '0.8.1',
+                                         'version'   => '0.8.16',
                                          'stage'     => '6',
                                          ),
                                    array(
-                                         'version'   => '0.8.0',
+                                         'version'   => '0.8.15',
                                          'stage'     => '5',
                                          ),
                                    array(
-                                         'version'   => '0.7.4',
+                                         'version'   => '0.8.14',
                                          'stage'     => null,
                                          ),
-                                   array(
-                                         'version'   => '0.7.3',
-                                         'stage'     => null,
-                                         ),
-                                   array(
-                                         'version'   => '0.7.2',
-                                         'stage'     => null,
-                                         ),
-                                   array(
-                                         'version'   => '0.7.1',
-                                         'stage'     => null,
-                                         ),
-                                   array(
-                                         'version'   => '0.7.0',
-                                         'stage'     => null,
-                                         )
                                    );
 
         _log(JAWS_LOG_DEBUG,"Checking/Reporting previous missed installations");
@@ -199,6 +127,57 @@
      */
     function Run()
     {
+        if (is_dir(JAWS_DATA. "languages")) {
+            // transform customized translated files
+            $rootfiles = array('Global.php', 'Date.php', 'Install.php', 'Upgrade.php');
+            $languages = scandir(JAWS_DATA. 'languages');
+            foreach ($languages as $lang) {
+                if($lang == '.' || $lang == '..') {
+                    continue;
+                }
+
+                $ostr = "define('_".strtoupper($lang).'_';
+                $nstr = "define('_".strtoupper($lang).'_DATA_';
+
+                // gadgets
+                if (is_dir(JAWS_DATA. "languages/$lang/gadgets")) {
+                    $lGadgets = scandir(JAWS_DATA. "languages/$lang/gadgets");
+                    foreach ($lGadgets as $lGadget) {
+                        if($lGadget == '.' || $lGadget == '..') {
+                            continue;
+                        }
+
+                        $fstring = @file_get_contents(JAWS_DATA. "languages/$lang/gadgets/$lGadget");
+                        $fstring = strtr($fstring, array($nstr => $nstr, $ostr => $nstr));
+                        @file_put_contents(JAWS_DATA. "languages/$lang/gadgets/$lGadget", $fstring);
+                    }
+                }
+
+                // plugins
+                if (is_dir(JAWS_DATA. "languages/$lang/plugins")) {
+                    $lPlugins = scandir(JAWS_DATA. "languages/$lang/plugins");
+                    foreach ($lPlugins as $lPlugin) {
+                        if($lPlugin == '.' || $lPlugin == '..') {
+                            continue;
+                        }
+
+                        $fstring = @file_get_contents(JAWS_DATA. "languages/$lang/plugins/$lPlugin");
+                        $fstring = strtr($fstring, array($nstr => $nstr, $ostr => $nstr));
+                        @file_put_contents(JAWS_DATA. "languages/$lang/plugins/$lPlugin", $fstring);
+                    }
+                }
+            }
+
+            // others
+            foreach ($rootfiles as $rfile) {
+                if (file_exists(JAWS_DATA. "languages/$lang/$rfile")) {
+                    $fstring = @file_get_contents(JAWS_DATA. "languages/$lang/$rfile");
+                    $fstring = strtr($fstring, array($nstr => $nstr, $ostr => $nstr));
+                    @file_put_contents(JAWS_DATA. "languages/$lang/$rfile", $fstring);
+                }
+            }
+        }
+
         foreach($_SESSION['upgrade']['stagedVersions'] as $stagedVersion) {
             if (!$_SESSION['upgrade']['versions'][$stagedVersion]['status']) {
                 if ($_SESSION['upgrade']['stage'] < $_SESSION['upgrade']['versions'][$stagedVersion]['stage']) {
@@ -210,6 +189,8 @@
                 $_SESSION['upgrade']['stage']++;
             }
         }
+
         return true;
     }
+
 }
\ No newline at end of file



More information about the Jaws-commits mailing list