CC-2166: Packaging Improvements. Moved the Zend app into airtime_mvc. It is now installed to /var/www/airtime. Storage is now set to /srv/airtime/stor. Utils are now installed to /usr/lib/airtime/utils/. Added install/airtime-dircheck.php as a simple test to see if everything is install/uninstalled correctly.
This commit is contained in:
parent
514777e8d2
commit
b11cbd8159
4546 changed files with 138 additions and 51 deletions
88
airtime_mvc/application/Bootstrap.php
Normal file
88
airtime_mvc/application/Bootstrap.php
Normal file
|
@ -0,0 +1,88 @@
|
|||
<?php
|
||||
|
||||
require_once __DIR__."/configs/navigation.php";
|
||||
require_once __DIR__."/configs/ACL.php";
|
||||
|
||||
require_once 'propel/runtime/lib/Propel.php';
|
||||
Propel::init(__DIR__."/configs/airtime-conf.php");
|
||||
|
||||
//DateTime in PHP 5.3.0+ need a default timezone set.
|
||||
$tz = ini_get('date.timezone') ? ini_get('date.timezone') : 'UTC';
|
||||
date_default_timezone_set($tz);
|
||||
|
||||
require_once __DIR__."/configs/constants.php";
|
||||
require_once __DIR__."/configs/conf.php";
|
||||
require_once 'DB.php';
|
||||
|
||||
require_once 'Soundcloud.php';
|
||||
require_once 'Playlist.php';
|
||||
require_once 'StoredFile.php';
|
||||
require_once 'Schedule.php';
|
||||
require_once 'Shows.php';
|
||||
require_once 'Users.php';
|
||||
require_once 'RabbitMq.php';
|
||||
require_once 'DateHelper.php';
|
||||
require_once __DIR__.'/controllers/plugins/RabbitMqPlugin.php';
|
||||
|
||||
global $CC_CONFIG, $CC_DBC;
|
||||
$dsn = $CC_CONFIG['dsn'];
|
||||
|
||||
$CC_DBC = DB::connect($dsn, FALSE);
|
||||
if (PEAR::isError($CC_DBC)) {
|
||||
echo "ERROR: ".$CC_DBC->getMessage()." ".$CC_DBC->getUserInfo()."\n";
|
||||
exit(1);
|
||||
}
|
||||
$CC_DBC->setFetchMode(DB_FETCHMODE_ASSOC);
|
||||
|
||||
//Zend_Session::start();
|
||||
Zend_Validate::setDefaultNamespaces("Zend");
|
||||
|
||||
$front = Zend_Controller_Front::getInstance();
|
||||
$front->registerPlugin(new RabbitMqPlugin());
|
||||
|
||||
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
{
|
||||
protected function _initDoctype()
|
||||
{
|
||||
$this->bootstrap('view');
|
||||
$view = $this->getResource('view');
|
||||
$view->doctype('XHTML1_STRICT');
|
||||
}
|
||||
|
||||
protected function _initHeadLink()
|
||||
{
|
||||
$view = $this->getResource('view');
|
||||
$view->headLink()->appendStylesheet('/css/redmond/jquery-ui-1.8.8.custom.css');
|
||||
$this->view->headLink()->appendStylesheet('/css/pro_dropdown_3.css');
|
||||
$this->view->headLink()->appendStylesheet('/css/styles.css');
|
||||
}
|
||||
|
||||
protected function _initHeadScript()
|
||||
{
|
||||
$view = $this->getResource('view');
|
||||
$view->headScript()->appendFile('/js/libs/jquery-1.5.2.min.js','text/javascript');
|
||||
$view->headScript()->appendFile('/js/libs/jquery-ui-1.8.11.custom.min.js','text/javascript');
|
||||
$view->headScript()->appendFile('/js/libs/jquery.stickyPanel.js','text/javascript');
|
||||
$view->headScript()->appendFile('/js/qtip/jquery.qtip-1.0.0.min.js','text/javascript');
|
||||
|
||||
//scripts for now playing bar
|
||||
$this->view->headScript()->appendFile('/js/playlist/helperfunctions.js','text/javascript');
|
||||
$this->view->headScript()->appendFile('/js/playlist/playlist.js','text/javascript');
|
||||
|
||||
$view->headScript()->appendFile('/js/airtime/common/common.js','text/javascript');
|
||||
}
|
||||
|
||||
protected function _initViewHelpers()
|
||||
{
|
||||
$view = $this->getResource('view');
|
||||
$view->addHelperPath('../application/views/helpers', 'Airtime_View_Helper');
|
||||
}
|
||||
|
||||
protected function _initTitle()
|
||||
{
|
||||
$view = $this->getResource('view');
|
||||
$view->headTitle(Application_Model_Preference::GetHeadTitle());
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue