Merge branch 'cc-5709-airtime-analyzer-saas' of github.com:sourcefabric/Airtime into cc-5709-airtime-analyzer-saas

This commit is contained in:
drigato 2014-05-05 11:19:49 -04:00
commit d09021b5b7
3 changed files with 20 additions and 9 deletions

View file

@ -12,12 +12,13 @@ resources.frontController.plugins.putHandler = "Zend_Controller_Plugin_PutHandle
resources.modules[] = ""
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"
resources.view[] =
resources.db.adapter = "Pdo_Pgsql"
resources.db.params.charset = "utf8"
resources.db.params.host = "localhost"
resources.db.params.username = "airtime"
resources.db.params.password = "airtime"
resources.db.params.dbname = "airtime"
; These are no longer needed. They are specified in /etc/airtime/airtime.conf:
;resources.db.adapter = "Pdo_Pgsql"
;resources.db.params.charset = "utf8"
;resources.db.params.host = "localhost"
;resources.db.params.username = "airtime"
;resources.db.params.password = "airtime"
;resources.db.params.dbname = "airtime"
[staging : production]

View file

@ -74,8 +74,17 @@ class Application_Model_Auth
*/
public static function getAuthAdapter()
{
$dbAdapter = Zend_Db_Table::getDefaultAdapter();
$authAdapter = new Zend_Auth_Adapter_DbTable($dbAdapter);
$CC_CONFIG = Config::getConfig();
// Database config
$db = Zend_Db::factory('PDO_' . $CC_CONFIG['dsn']['phptype'], array(
'host' => $CC_CONFIG['dsn']['hostspec'],
'username' => $CC_CONFIG['dsn']['username'],
'password' => $CC_CONFIG['dsn']['password'],
'dbname' => $CC_CONFIG['dsn']['database']
));
Zend_Db_Table_Abstract::setDefaultAdapter($db);
$authAdapter = new Zend_Auth_Adapter_DbTable($db);
$authAdapter->setTableName('cc_subjs')
->setIdentityColumn('login')

View file

@ -47,7 +47,8 @@ if (file_exists('/usr/share/php/libzend-framework-php')) {
require_once 'Zend/Application.php';
$application = new Zend_Application(
APPLICATION_ENV,
$_SERVER["AIRTIME_APPINI"]
//$_SERVER["AIRTIME_APPINI"] // Old SaaS customization that's no longer needed -- Albert May 2, 2014
APPLICATION_PATH . '/configs/application.ini'
);
require_once (APPLICATION_PATH."/logging/Logging.php");