Merge branch 'devel' of dev.sourcefabric.org:airtime into devel

This commit is contained in:
Yuchen Wang 2011-11-29 16:25:43 -05:00
commit 4d6c3fdbf4
178 changed files with 69380 additions and 70 deletions

View file

@ -3,7 +3,7 @@
require_once __DIR__."/configs/ACL.php";
require_once 'propel/runtime/lib/Propel.php';
Propel::init(__DIR__."/configs/airtime-conf.php");
Propel::init(__DIR__."/configs/airtime-conf-production.php");
require_once __DIR__."/logging/Logging.php";
require_once __DIR__."/configs/constants.php";

View file

@ -0,0 +1,36 @@
<?php
// This file generated by Propel 1.5.2 convert-conf target
// from XML runtime conf file /home/james/src/airtime/airtime_mvc/build/runtime-conf.xml
/* The original name of this file is airtime-conf.php but since we need to make custom changes
* to it I've renamed it so that our changes aren't removed everytime we regenerate a database schema.
* our custom changes requires the database parameters to be loaded from /etc/airtime/airtime.conf so
* that the user can customize these.
*/
$ini = parse_ini_file('/etc/airtime/airtime.conf', true);
$dbhost = $ini['database']['host'];
$dbname = $ini['database']['dbname'];
$dbuser = $ini['database']['dbuser'];
$dbpass = $ini['database']['dbpass'];
$conf = array (
'datasources' =>
array (
'airtime' =>
array (
'adapter' => 'pgsql',
'connection' =>
array (
'dsn' => "pgsql:host=$dbhost;port=5432;dbname=$dbname;user=$dbuser;password=$dbpass",
),
),
'default' => 'airtime',
),
'generator_version' => '1.5.2',
);
$conf['classmap'] = include(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'classmap-airtime-conf.php');
return $conf;

View file

@ -1,9 +1,11 @@
<?php
$ini = parse_ini_file('/etc/airtime/airtime.conf', true);
return array(
'dbname' => 'airtime',
'user' => 'airtime',
'password' => 'airtime',
'dbname' => $ini['database']['dbname'],
'user' => $ini['database']['dbuser'],
'password' => $ini['database']['dbpass'],
'host' => 'localhost',
'driver' => 'pdo_pgsql',
);

View file

@ -11,3 +11,5 @@ RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
RewriteBase /
SetEnv APPLICATION_ENV development