ElkArte Community

Project Support => Support => Topic started by: ahrasis on February 12, 2017, 05:24:06 pm

Title: Upgrading Multi Tenancy Addon
Post by: ahrasis on February 12, 2017, 05:24:06 pm
I have been trying to upgrade the Multi Tenancy Addon (previously known as Multi ElkArte SubForums Addon) (http://www.elkarte.net/community/index.php?topic=2162.0) to make compatible with 1.1 RC 1 with no luck in converting the database part of the code. I commented out the code in Tenancy.mod11.xml for testing other code which so far are working. I need help in fixing that database part which has been discussed in other topic (http://www.elkarte.net/community/index.php?topic=4088.0) in here. If anybody can offer assistance, I'd be very grateful and will also consider a token for it. Do reply in this topic or pm me personally. Thanking you in advance.
Title: Re: Upgrading Multi Tenancy Addon
Post by: emanuele on February 13, 2017, 05:43:54 pm
IIRC, the general idea of the changes I gave should work.
What doesn't is the code to do the "install".

Maybe you can try:
<?php

$settingsForm = new Settings_Form(Settings_Form::FILE_ADAPTER);
$settingsVals = $settingsForm->getConfigValues();
$settingsVals['db_type'] = 'MySQLm';
$settingsForm->setConfigValues($settingsVals);
$settingsForm->save();

And if that doesn't work, maybe @live627 can suggest how to use the new settings class to save the new db-type to Settings.php...
Title: Re: Upgrading Multi Tenancy Addon
Post by: ahrasis on February 14, 2017, 01:01:59 am
Thanks for the feedback. I will attempt the new code soonest.