TECHNICAL HELP & SUPPORT

New Topic
thomas nv

24.03.2006 17:02:54
Upgrade to 4.0 QuoteReply
Hi,

I have several 3.81 and 3.6 installations.
Whats the best way to upgrade them?

Thomas.


Simon

27.03.2006 10:53:34
Re: Upgrade to 4.0 QuoteReply
Dear Thomas,

For changes in the modules:

Guidline for making old modules working in Modera >= 4.00

Starting from version 3.81 Modera is not using register_globals and from version 4.00 uses new i18n system (Translator). Module classes should work without any modifications while admin files will not work and should be modified.

register_globals emulation

While writing new modules programmers should make them compatible with register_globals off.

Old modules might be changed to get request data from superglobals arrays $_GET, $_POST. However in some cases you may just emulate register globals behaviour putting following 2 lines in the beginning of module admin files:

foreach ($_GET as $k => $v) $$k = $v;
foreach ($_POST as $k => $v) $$k = $v;



i18n

In new module admin files you should include “admin_header.php” file that will perform all common work.

To make modules compatible with new versions of Modera you can rewrite your old admin files for using “admin_header.php” or make following changes:

* include following files “class/config.php”, “class/common.php”, “class/Database.php”
* insert after “$ses = new Session();” following code:

// create database instance
// using database connection id from Session instance
$sql = new sql();
$sql->con = $ses->dbc;
$database = new Database($sql);
$GLOBALS['database'] =& $database;
load_site_settings($database);
unset($sql);


language initialization part should be modified:


// init language object
$lan = new Language($language);
$language2 = $lan->interfaceLanguage($language2);
$language = $lan->lan();
 
if ($language2) { include("../class/admin_" . $language2 . ".php"); }



should be changed with


// init language object
$lan = new AdminLanguage($database, $language);
$language2 = $lan->interfaceLanguage($language2);
$language = $lan->lan();



Other guidlines will be available soon and include instructions of importing old language files.

With best regards,

Simon


thomas nv

27.03.2006 14:43:35
Re: Upgrade to 4.0 QuoteReply
Hi Simon,

thnx for the reply, but this info I already found in the wiki.
I more meant for upgrading the installation in general, can I do with upgrading a few files or db tables, or do I need to upgrade the whole app? Some changedoc?


Simon

27.03.2006 14:57:13
Re: Upgrade to 4.0 QuoteReply
Hello Thomas,

Instructions will be published in Partner Extranet in few days.

With best regards,

Simon


New Topic

This Community is sponsored by Modera Webmaster, Modera Intranet, Modera Extranet