CC-5802: Upgrade application.ini file
Attempting to write new lines to application.ini file via the upgrade controller
This commit is contained in:
parent
97ce5bdbc5
commit
1a71a848e1
|
@ -34,6 +34,20 @@ class UpgradeController extends Zend_Controller_Action
|
||||||
|
|
||||||
Application_Model_Preference::setDiskUsage($diskUsage);
|
Application_Model_Preference::setDiskUsage($diskUsage);
|
||||||
|
|
||||||
|
$iniFile = isset($_SERVER['AIRTIME_BASE']) ? $_SERVER['AIRTIME_BASE']."application.ini" : "/usr/share/airtime/application/configs/application.ini";
|
||||||
|
|
||||||
|
//update application.ini
|
||||||
|
$newLines = "resources.frontController.moduleDirectory = APPLICATION_PATH '/modules'\n".
|
||||||
|
"resources.frontController.plugins.putHandler = 'Zend_Controller_Plugin_PutHandler'".
|
||||||
|
";load everything in the modules directory including models".
|
||||||
|
"resources.modules[] = ''";
|
||||||
|
|
||||||
|
$file = fopen($iniFile, "r+");
|
||||||
|
//set pointer to line after '[production]' - kind of hacky but will do for now
|
||||||
|
fseek($file, -1, SEEK_CUR);
|
||||||
|
fwrite($file, $newLines);
|
||||||
|
fclose($file);
|
||||||
|
|
||||||
$this->getResponse()
|
$this->getResponse()
|
||||||
->setHttpResponseCode(200)
|
->setHttpResponseCode(200)
|
||||||
->appendBody("Upgrade to Airtime 2.5.3 OK");
|
->appendBody("Upgrade to Airtime 2.5.3 OK");
|
||||||
|
|
Loading…
Reference in New Issue