Merge branch 'cc-5709-airtime-analyzer' into cc-5709-airtime-analyzer-saas
This commit is contained in:
commit
250d5d083e
|
@ -12,12 +12,13 @@ resources.frontController.plugins.putHandler = "Zend_Controller_Plugin_PutHandle
|
||||||
resources.modules[] = ""
|
resources.modules[] = ""
|
||||||
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"
|
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"
|
||||||
resources.view[] =
|
resources.view[] =
|
||||||
resources.db.adapter = "Pdo_Pgsql"
|
; These are no longer needed. They are specified in /etc/airtime/airtime.conf:
|
||||||
resources.db.params.charset = "utf8"
|
;resources.db.adapter = "Pdo_Pgsql"
|
||||||
resources.db.params.host = "localhost"
|
;resources.db.params.charset = "utf8"
|
||||||
resources.db.params.username = "airtime"
|
;resources.db.params.host = "localhost"
|
||||||
resources.db.params.password = "airtime"
|
;resources.db.params.username = "airtime"
|
||||||
resources.db.params.dbname = "airtime"
|
;resources.db.params.password = "airtime"
|
||||||
|
;resources.db.params.dbname = "airtime"
|
||||||
|
|
||||||
[staging : production]
|
[staging : production]
|
||||||
|
|
||||||
|
|
|
@ -74,8 +74,17 @@ class Application_Model_Auth
|
||||||
*/
|
*/
|
||||||
public static function getAuthAdapter()
|
public static function getAuthAdapter()
|
||||||
{
|
{
|
||||||
$dbAdapter = Zend_Db_Table::getDefaultAdapter();
|
$CC_CONFIG = Config::getConfig();
|
||||||
$authAdapter = new Zend_Auth_Adapter_DbTable($dbAdapter);
|
|
||||||
|
// 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')
|
$authAdapter->setTableName('cc_subjs')
|
||||||
->setIdentityColumn('login')
|
->setIdentityColumn('login')
|
||||||
|
|
|
@ -83,7 +83,6 @@ class Rest_MediaController extends Zend_Rest_Controller
|
||||||
|
|
||||||
public function clearAction()
|
public function clearAction()
|
||||||
{
|
{
|
||||||
//TODO:: make this not accessible via public api??
|
|
||||||
if (!$this->verifyAuth(true, true))
|
if (!$this->verifyAuth(true, true))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -97,6 +96,7 @@ class Rest_MediaController extends Zend_Rest_Controller
|
||||||
$updateCriteria->add(CcFilesPeer::FILE_EXISTS, false);
|
$updateCriteria->add(CcFilesPeer::FILE_EXISTS, false);
|
||||||
BasePeer::doUpdate($selectCriteria, $updateCriteria, $con);
|
BasePeer::doUpdate($selectCriteria, $updateCriteria, $con);
|
||||||
|
|
||||||
|
//delete all files and directories under .../imported
|
||||||
$path = isset($_SERVER['AIRTIME_BASE']) ? $_SERVER['AIRTIME_BASE']."/srv/airtime/stor/imported/*" : "/srv/airtime/stor/imported/*";
|
$path = isset($_SERVER['AIRTIME_BASE']) ? $_SERVER['AIRTIME_BASE']."/srv/airtime/stor/imported/*" : "/srv/airtime/stor/imported/*";
|
||||||
exec("rm -rf $path");
|
exec("rm -rf $path");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue