CC-3694: Upgrade fails with Propel database conversion.
-fixed
This commit is contained in:
parent
85bc150159
commit
2a9ea435f2
4 changed files with 20 additions and 6 deletions
|
@ -8,8 +8,6 @@
|
|||
* that the user can customize these.
|
||||
*/
|
||||
|
||||
require_once (__DIR__."/conf.php");
|
||||
|
||||
global $CC_CONFIG;
|
||||
|
||||
$dbhost = $CC_CONFIG['dsn']['hostspec'];
|
||||
|
|
18
airtime_mvc/application/configs/db-conf.php
Normal file
18
airtime_mvc/application/configs/db-conf.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
/* This file is only needed during upgrades when we need the database parameters from /etc/airtime/airtime.conf.
|
||||
* The reason we don't just use conf.php is because conf.php may try to load configuration parameters that aren't
|
||||
* yet available because airtime.conf hasn't been updated yet. This situation ends up throwing a lot of errors to stdout.
|
||||
* airtime*/
|
||||
|
||||
global $CC_CONFIG;
|
||||
|
||||
$filename = "/etc/airtime/airtime.conf";
|
||||
$values = parse_ini_file($filename, true);
|
||||
|
||||
// Database config
|
||||
$CC_CONFIG['dsn']['username'] = $values['database']['dbuser'];
|
||||
$CC_CONFIG['dsn']['password'] = $values['database']['dbpass'];
|
||||
$CC_CONFIG['dsn']['hostspec'] = $values['database']['host'];
|
||||
$CC_CONFIG['dsn']['phptype'] = 'pgsql';
|
||||
$CC_CONFIG['dsn']['database'] = $values['database']['dbname'];
|
Loading…
Add table
Add a link
Reference in a new issue