2010-12-07 20:19:27 +01:00
|
|
|
<?php
|
2014-11-28 21:30:11 +01:00
|
|
|
require_once CONFIG_PATH . "conf.php";
|
2013-01-14 20:43:02 +01:00
|
|
|
$CC_CONFIG = Config::getConfig();
|
|
|
|
|
2014-11-28 21:30:11 +01:00
|
|
|
require_once CONFIG_PATH . "ACL.php";
|
2012-08-24 03:58:21 +02:00
|
|
|
|
2014-11-28 21:30:11 +01:00
|
|
|
// Since we initialize the database during the configuration check,
|
|
|
|
// check the $configRun global to avoid reinitializing unnecessarily
|
|
|
|
if (!isset($configRun) || !$configRun) {
|
|
|
|
Propel::init(CONFIG_PATH . 'airtime-conf-production.php');
|
|
|
|
}
|
2012-08-24 03:58:21 +02:00
|
|
|
|
2014-12-09 23:58:36 +01:00
|
|
|
//Composer's autoloader
|
|
|
|
require_once 'autoload.php';
|
|
|
|
|
2014-11-28 21:30:11 +01:00
|
|
|
require_once CONFIG_PATH . "constants.php";
|
2011-09-26 21:32:56 +02:00
|
|
|
require_once 'Preference.php';
|
2013-01-10 00:03:23 +01:00
|
|
|
require_once 'Locale.php';
|
2012-04-16 16:19:34 +02:00
|
|
|
require_once "DateHelper.php";
|
2014-11-04 22:57:40 +01:00
|
|
|
require_once "LocaleHelper.php";
|
2015-02-17 18:17:49 +01:00
|
|
|
require_once "FileDataHelper.php";
|
2014-11-20 17:22:53 +01:00
|
|
|
require_once "HTTPHelper.php";
|
2015-02-25 19:02:11 +01:00
|
|
|
require_once "FileIO.php";
|
2012-04-16 16:19:34 +02:00
|
|
|
require_once "OsPath.php";
|
2012-09-05 22:14:08 +02:00
|
|
|
require_once "Database.php";
|
2015-02-12 21:39:22 +01:00
|
|
|
require_once "ProvisioningHelper.php";
|
2015-06-12 19:48:54 +02:00
|
|
|
require_once "SecurityHelper.php";
|
2015-03-24 15:11:25 +01:00
|
|
|
require_once "GoogleAnalytics.php";
|
2013-01-09 19:38:38 +01:00
|
|
|
require_once "Timezone.php";
|
2014-06-25 17:24:19 +02:00
|
|
|
require_once "Auth.php";
|
2015-06-16 21:10:08 +02:00
|
|
|
require_once "interface/OAuth2.php";
|
2015-06-15 21:12:37 +02:00
|
|
|
require_once "TaskManager.php";
|
2015-07-13 14:06:41 +02:00
|
|
|
require_once "UsabilityHints.php";
|
2015-06-16 21:10:08 +02:00
|
|
|
require_once __DIR__.'/services/CeleryService.php';
|
2015-06-10 21:04:49 +02:00
|
|
|
require_once __DIR__.'/services/SoundcloudService.php';
|
2012-11-27 23:11:29 +01:00
|
|
|
require_once __DIR__.'/forms/helpers/ValidationTypes.php';
|
2015-01-14 02:51:46 +01:00
|
|
|
require_once __DIR__.'/forms/helpers/CustomDecorators.php';
|
2011-03-24 04:24:06 +01:00
|
|
|
require_once __DIR__.'/controllers/plugins/RabbitMqPlugin.php';
|
2014-04-24 22:19:55 +02:00
|
|
|
require_once __DIR__.'/controllers/plugins/Maintenance.php';
|
2015-03-24 15:11:25 +01:00
|
|
|
require_once __DIR__.'/controllers/plugins/ConversionTracking.php';
|
2015-02-04 21:09:27 +01:00
|
|
|
require_once __DIR__.'/modules/rest/controllers/ShowImageController.php';
|
2014-09-17 00:04:22 +02:00
|
|
|
require_once __DIR__.'/modules/rest/controllers/MediaController.php';
|
2015-01-16 23:27:52 +01:00
|
|
|
require_once __DIR__.'/upgrade/Upgrades.php';
|
2011-03-22 14:55:33 +01:00
|
|
|
|
2015-01-28 19:19:50 +01:00
|
|
|
require_once (APPLICATION_PATH . "/logging/Logging.php");
|
2012-09-14 22:51:39 +02:00
|
|
|
Logging::setLogPath('/var/log/airtime/zendphp.log');
|
2012-05-06 04:29:31 +02:00
|
|
|
|
2015-02-17 18:13:37 +01:00
|
|
|
// We need to manually route because we can't load Zend without the database being initialized first.
|
2015-03-03 21:29:34 +01:00
|
|
|
if (array_key_exists("REQUEST_URI", $_SERVER) && (stripos($_SERVER["REQUEST_URI"], "/provisioning/create") !== false)) {
|
2015-02-17 18:13:37 +01:00
|
|
|
$provisioningHelper = new ProvisioningHelper($CC_CONFIG["apiKey"][0]);
|
|
|
|
$provisioningHelper->createAction();
|
|
|
|
die();
|
2015-02-12 21:39:22 +01:00
|
|
|
}
|
|
|
|
|
2013-01-14 20:43:02 +01:00
|
|
|
Config::setAirtimeVersion();
|
2014-11-28 21:30:11 +01:00
|
|
|
require_once (CONFIG_PATH . 'navigation.php');
|
2011-11-15 22:10:40 +01:00
|
|
|
|
2011-08-12 21:36:00 +02:00
|
|
|
Zend_Validate::setDefaultNamespaces("Zend");
|
|
|
|
|
2014-06-25 17:15:14 +02:00
|
|
|
Application_Model_Auth::pinSessionToClient(Zend_Auth::getInstance());
|
|
|
|
|
2011-08-12 21:36:00 +02:00
|
|
|
$front = Zend_Controller_Front::getInstance();
|
2012-01-16 09:56:57 +01:00
|
|
|
$front->registerPlugin(new RabbitMqPlugin());
|
2015-03-24 15:11:25 +01:00
|
|
|
$front->registerPlugin(new Zend_Controller_Plugin_ConversionTracking());
|
2015-03-20 22:20:34 +01:00
|
|
|
$front->throwExceptions(false);
|
2011-08-12 21:36:00 +02:00
|
|
|
|
2012-11-15 16:59:06 +01:00
|
|
|
//localization configuration
|
2013-01-10 00:03:23 +01:00
|
|
|
Application_Model_Locale::configureLocalization();
|
2012-09-06 20:01:54 +02:00
|
|
|
|
2012-01-16 09:56:57 +01:00
|
|
|
/* The bootstrap class should only be used to initialize actions that return a view.
|
2011-08-12 21:36:00 +02:00
|
|
|
Actions that return JSON will not use the bootstrap class! */
|
2010-12-07 20:19:27 +01:00
|
|
|
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
|
|
|
{
|
2011-08-23 18:45:03 +02:00
|
|
|
protected function _initDoctype()
|
2010-12-07 20:19:27 +01:00
|
|
|
{
|
|
|
|
$this->bootstrap('view');
|
|
|
|
$view = $this->getResource('view');
|
|
|
|
$view->doctype('XHTML1_STRICT');
|
|
|
|
}
|
2013-07-29 14:57:31 +02:00
|
|
|
|
2012-10-19 17:09:34 +02:00
|
|
|
protected function _initGlobals()
|
|
|
|
{
|
|
|
|
$view = $this->getResource('view');
|
|
|
|
$baseUrl = Application_Common_OsPath::getBaseDir();
|
2013-07-29 14:57:31 +02:00
|
|
|
|
2014-11-07 00:26:09 +01:00
|
|
|
$view->headScript()->appendScript("var baseUrl = '$baseUrl';");
|
|
|
|
$this->_initTranslationGlobals($view);
|
2015-04-10 23:14:56 +02:00
|
|
|
|
2012-10-19 17:09:34 +02:00
|
|
|
$user = Application_Model_User::GetCurrentUser();
|
2015-04-10 23:14:56 +02:00
|
|
|
if (!is_null($user)) {
|
2012-10-19 17:09:34 +02:00
|
|
|
$userType = $user->getType();
|
|
|
|
} else {
|
|
|
|
$userType = "";
|
|
|
|
}
|
|
|
|
$view->headScript()->appendScript("var userType = '$userType';");
|
2014-11-07 00:26:09 +01:00
|
|
|
}
|
2015-02-20 19:12:49 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a global namespace to hold a session token for CSRF prevention
|
|
|
|
*/
|
2015-04-10 23:14:56 +02:00
|
|
|
protected function _initCsrfNamespace()
|
|
|
|
{
|
2015-02-20 19:12:49 +01:00
|
|
|
$csrf_namespace = new Zend_Session_Namespace('csrf_namespace');
|
|
|
|
// Check if the token exists
|
|
|
|
if (!$csrf_namespace->authtoken) {
|
2015-09-22 00:00:04 +02:00
|
|
|
// If we don't have a token, regenerate it and set a 1 week timeout
|
2015-02-20 19:12:49 +01:00
|
|
|
// Should we log the user out here if the token is expired?
|
2015-04-10 23:14:56 +02:00
|
|
|
$csrf_namespace->authtoken = sha1(uniqid(rand(), 1));
|
2015-09-22 00:00:04 +02:00
|
|
|
$csrf_namespace->setExpirationSeconds(168 * 60 * 60);
|
2015-02-20 19:12:49 +01:00
|
|
|
}
|
2015-04-09 19:03:06 +02:00
|
|
|
|
|
|
|
//Here we are closing the session for writing because otherwise no requests
|
|
|
|
//in this session will be handled in parallel. This gives a major boost to the perceived performance
|
|
|
|
//of the application (page load times are more consistent, no lock contention).
|
|
|
|
session_write_close();
|
2015-02-20 19:12:49 +01:00
|
|
|
}
|
2015-04-10 23:14:56 +02:00
|
|
|
|
2014-11-07 00:26:09 +01:00
|
|
|
/**
|
2015-04-10 23:14:56 +02:00
|
|
|
* Ideally, globals should be written to a single js file once
|
|
|
|
* from a php init function. This will save us from having to
|
2014-11-07 00:26:09 +01:00
|
|
|
* reinitialize them every request
|
|
|
|
*/
|
2015-04-10 23:14:56 +02:00
|
|
|
private function _initTranslationGlobals()
|
|
|
|
{
|
2015-02-20 19:12:49 +01:00
|
|
|
$view = $this->getResource('view');
|
2014-11-07 00:26:09 +01:00
|
|
|
$view->headScript()->appendScript("var PRODUCT_NAME = '" . PRODUCT_NAME . "';");
|
|
|
|
$view->headScript()->appendScript("var USER_MANUAL_URL = '" . USER_MANUAL_URL . "';");
|
|
|
|
$view->headScript()->appendScript("var COMPANY_NAME = '" . COMPANY_NAME . "';");
|
2012-10-19 17:09:34 +02:00
|
|
|
}
|
2015-01-15 22:33:33 +01:00
|
|
|
|
2015-06-15 21:12:37 +02:00
|
|
|
protected function _initTasks() {
|
2015-01-28 19:19:50 +01:00
|
|
|
/* We need to wrap this here so that we aren't checking when we're running the unit test suite
|
|
|
|
*/
|
|
|
|
if (getenv("AIRTIME_UNIT_TEST") != 1) {
|
2015-07-15 17:46:52 +02:00
|
|
|
$taskManager = TaskManager::getInstance();
|
|
|
|
$taskManager->runTask(AirtimeTask::UPGRADE); // Run the upgrade on each request (if it needs to be run)
|
2015-06-10 22:08:52 +02:00
|
|
|
//This will do the upgrade too if it's needed...
|
2015-06-30 17:46:58 +02:00
|
|
|
$taskManager->runTasks();
|
2015-01-28 19:19:50 +01:00
|
|
|
}
|
2015-01-15 22:33:33 +01:00
|
|
|
}
|
2010-12-07 20:19:27 +01:00
|
|
|
|
2011-08-23 18:45:03 +02:00
|
|
|
protected function _initHeadLink()
|
|
|
|
{
|
2013-01-14 22:16:14 +01:00
|
|
|
$CC_CONFIG = Config::getConfig();
|
2012-02-09 18:07:32 +01:00
|
|
|
|
2011-08-23 18:45:03 +02:00
|
|
|
$view = $this->getResource('view');
|
2011-04-18 17:02:09 +02:00
|
|
|
|
2012-10-19 17:09:34 +02:00
|
|
|
$baseUrl = Application_Common_OsPath::getBaseDir();
|
2013-07-29 14:57:31 +02:00
|
|
|
|
2015-07-04 07:16:58 +02:00
|
|
|
$view->headLink(array('rel' => 'icon', 'href' => $baseUrl . 'favicon.ico?' . $CC_CONFIG['airtime_version'], 'type' => 'image/x-icon'), 'PREPEND')
|
2015-06-25 20:13:09 +02:00
|
|
|
->appendStylesheet($baseUrl . 'css/bootstrap.css?' . $CC_CONFIG['airtime_version'])
|
|
|
|
->appendStylesheet($baseUrl . 'css/redmond/jquery-ui-1.8.8.custom.css?' . $CC_CONFIG['airtime_version'])
|
|
|
|
->appendStylesheet($baseUrl . 'css/pro_dropdown_3.css?' . $CC_CONFIG['airtime_version'])
|
|
|
|
->appendStylesheet($baseUrl . 'css/qtip/jquery.qtip.min.css?' . $CC_CONFIG['airtime_version'])
|
|
|
|
->appendStylesheet($baseUrl . 'css/styles.css?' . $CC_CONFIG['airtime_version'])
|
|
|
|
->appendStylesheet($baseUrl . 'css/masterpanel.css?' . $CC_CONFIG['airtime_version'])
|
|
|
|
->appendStylesheet($baseUrl . 'css/tipsy/jquery.tipsy.css?' . $CC_CONFIG['airtime_version']);
|
2011-08-23 18:45:03 +02:00
|
|
|
}
|
2010-12-07 20:19:27 +01:00
|
|
|
|
2011-08-23 18:45:03 +02:00
|
|
|
protected function _initHeadScript()
|
|
|
|
{
|
2013-01-14 22:16:14 +01:00
|
|
|
$CC_CONFIG = Config::getConfig();
|
2012-02-06 11:07:10 +01:00
|
|
|
|
2011-08-23 18:45:03 +02:00
|
|
|
$view = $this->getResource('view');
|
2013-07-29 14:57:31 +02:00
|
|
|
|
2012-10-19 17:09:34 +02:00
|
|
|
$baseUrl = Application_Common_OsPath::getBaseDir();
|
2013-07-29 14:57:31 +02:00
|
|
|
|
2015-06-25 20:13:09 +02:00
|
|
|
$view->headScript()->appendFile($baseUrl . 'js/libs/jquery-1.8.3.min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
|
|
|
->appendFile($baseUrl . 'js/libs/jquery-ui-1.8.24.min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
|
|
|
->appendFile($baseUrl . 'js/bootstrap/bootstrap.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
|
|
|
->appendFile($baseUrl . 'js/libs/underscore-min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
2013-08-23 02:23:17 +02:00
|
|
|
|
2015-06-25 20:13:09 +02:00
|
|
|
// ->appendFile($baseUrl . 'js/libs/jquery.stickyPanel.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
|
|
|
->appendFile($baseUrl . 'js/qtip/jquery.qtip.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
|
|
|
->appendFile($baseUrl . 'js/jplayer/jquery.jplayer.min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
|
|
|
->appendFile($baseUrl . 'js/sprintf/sprintf-0.7-beta1.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
|
|
|
->appendFile($baseUrl . 'js/cookie/jquery.cookie.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
|
|
|
->appendFile($baseUrl . 'js/i18n/jquery.i18n.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
|
|
|
->appendFile($baseUrl . 'locale/general-translation-table?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
|
|
|
->appendFile($baseUrl . 'locale/datatables-translation-table?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
2013-07-29 14:57:31 +02:00
|
|
|
|
2015-06-25 20:13:09 +02:00
|
|
|
->appendScript("$.i18n.setDictionary(general_dict)")
|
|
|
|
->appendScript("var baseUrl='$baseUrl'");
|
2015-04-10 23:14:56 +02:00
|
|
|
|
|
|
|
//These timezones are needed to adjust javascript Date objects on the client to make sense to the user's set timezone
|
|
|
|
//or the server's set timezone.
|
2013-12-07 00:17:30 +01:00
|
|
|
$serverTimeZone = new DateTimeZone(Application_Model_Preference::GetDefaultTimezone());
|
|
|
|
$now = new DateTime("now", $serverTimeZone);
|
|
|
|
$offset = $now->format("Z") * -1;
|
|
|
|
$view->headScript()->appendScript("var serverTimezoneOffset = {$offset}; //in seconds");
|
2015-04-10 23:14:56 +02:00
|
|
|
|
2013-12-07 00:17:30 +01:00
|
|
|
if (class_exists("Zend_Auth", false) && Zend_Auth::getInstance()->hasIdentity()) {
|
2015-04-10 23:14:56 +02:00
|
|
|
$userTimeZone = new DateTimeZone(Application_Model_Preference::GetUserTimezone());
|
|
|
|
$now = new DateTime("now", $userTimeZone);
|
|
|
|
$offset = $now->format("Z") * -1;
|
|
|
|
$view->headScript()->appendScript("var userTimezoneOffset = {$offset}; //in seconds");
|
2013-12-07 00:17:30 +01:00
|
|
|
}
|
2015-04-10 23:14:56 +02:00
|
|
|
|
2011-02-01 17:43:52 +01:00
|
|
|
//scripts for now playing bar
|
2015-06-25 20:13:09 +02:00
|
|
|
$view->headScript()->appendFile($baseUrl . 'js/airtime/airtime_bootstrap.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
|
|
|
->appendFile($baseUrl . 'js/airtime/dashboard/helperfunctions.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
|
|
|
->appendFile($baseUrl . 'js/airtime/dashboard/dashboard.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
|
|
|
->appendFile($baseUrl . 'js/airtime/dashboard/versiontooltip.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
|
|
|
->appendFile($baseUrl . 'js/tipsy/jquery.tipsy.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
2012-02-14 21:43:27 +01:00
|
|
|
|
2015-06-25 20:13:09 +02:00
|
|
|
->appendFile($baseUrl . 'js/airtime/common/common.js?' . $CC_CONFIG['airtime_version'], 'text/javascript')
|
|
|
|
->appendFile($baseUrl . 'js/airtime/common/audioplaytest.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
2012-02-09 18:07:32 +01:00
|
|
|
|
2012-07-11 00:51:32 +02:00
|
|
|
$user = Application_Model_User::getCurrentUser();
|
2015-04-10 23:14:56 +02:00
|
|
|
if (!is_null($user)) {
|
2012-04-20 17:31:24 +02:00
|
|
|
$userType = $user->getType();
|
|
|
|
} else {
|
|
|
|
$userType = "";
|
|
|
|
}
|
2015-04-10 23:14:56 +02:00
|
|
|
|
2012-04-20 17:31:24 +02:00
|
|
|
$view->headScript()->appendScript("var userType = '$userType';");
|
2015-06-25 20:13:09 +02:00
|
|
|
if (array_key_exists('REQUEST_URI', $_SERVER) //Doesn't exist for unit tests
|
|
|
|
&& strpos($_SERVER['REQUEST_URI'], 'Dashboard/stream-player') === false
|
|
|
|
&& strpos($_SERVER['REQUEST_URI'], 'audiopreview') === false
|
|
|
|
&& $_SERVER['REQUEST_URI'] != "/") {
|
|
|
|
$plan_level = strval(Application_Model_Preference::GetPlanLevel());
|
|
|
|
// Since the Hobbyist plan doesn't come with Live Chat support, don't enable it
|
|
|
|
if (Application_Model_Preference::GetLiveChatEnabled() && $plan_level !== 'hobbyist') {
|
|
|
|
$client_id = strval(Application_Model_Preference::GetClientId());
|
|
|
|
$station_url = $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
|
|
|
|
$view->headScript()->appendScript("var livechat_client_id = '$client_id';\n" .
|
|
|
|
"var livechat_plan_type = '$plan_level';\n" .
|
|
|
|
"var livechat_station_url = 'http://$station_url';");
|
|
|
|
$view->headScript()->appendFile($baseUrl . 'js/airtime/common/livechat.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
|
2015-04-10 23:14:56 +02:00
|
|
|
}
|
2012-10-19 17:09:34 +02:00
|
|
|
}
|
|
|
|
|
2014-06-11 19:24:03 +02:00
|
|
|
/*
|
2012-08-24 03:58:21 +02:00
|
|
|
if (isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1) {
|
2013-01-14 22:00:38 +01:00
|
|
|
$view->headScript()->appendFile($baseUrl.'js/libs/google-analytics.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
2014-06-11 19:24:03 +02:00
|
|
|
}*/
|
2011-02-03 23:51:35 +01:00
|
|
|
}
|
2011-03-22 14:55:33 +01:00
|
|
|
|
2011-03-24 04:24:06 +01:00
|
|
|
protected function _initViewHelpers()
|
|
|
|
{
|
2011-02-03 23:51:35 +01:00
|
|
|
$view = $this->getResource('view');
|
2014-11-28 21:30:11 +01:00
|
|
|
$view->addHelperPath(APPLICATION_PATH . 'views/helpers', 'Airtime_View_Helper');
|
2015-04-10 23:14:56 +02:00
|
|
|
$view->assign('suspended', (Application_Model_Preference::getProvisioningStatus() == PROVISIONING_STATUS_SUSPENDED));
|
2011-01-30 22:47:11 +01:00
|
|
|
}
|
2011-03-22 14:55:33 +01:00
|
|
|
|
2011-03-24 04:24:06 +01:00
|
|
|
protected function _initTitle()
|
|
|
|
{
|
2011-02-03 23:51:35 +01:00
|
|
|
$view = $this->getResource('view');
|
2011-02-04 01:17:52 +01:00
|
|
|
$view->headTitle(Application_Model_Preference::GetHeadTitle());
|
2011-02-03 23:51:35 +01:00
|
|
|
}
|
2011-08-22 16:12:53 +02:00
|
|
|
|
|
|
|
protected function _initZFDebug()
|
|
|
|
{
|
2012-09-11 06:50:56 +02:00
|
|
|
|
2014-11-04 17:06:17 +01:00
|
|
|
Zend_Controller_Front::getInstance()->throwExceptions(false);
|
2012-09-11 06:50:56 +02:00
|
|
|
|
|
|
|
/*
|
2012-08-24 03:58:21 +02:00
|
|
|
if (APPLICATION_ENV == "development") {
|
2011-08-22 16:12:53 +02:00
|
|
|
$autoloader = Zend_Loader_Autoloader::getInstance();
|
|
|
|
$autoloader->registerNamespace('ZFDebug');
|
|
|
|
|
|
|
|
$options = array(
|
2012-01-16 09:56:57 +01:00
|
|
|
'plugins' => array('Variables',
|
2011-08-22 16:12:53 +02:00
|
|
|
'Exception',
|
|
|
|
'Memory',
|
|
|
|
'Time')
|
|
|
|
);
|
|
|
|
$debug = new ZFDebug_Controller_Plugin_Debug($options);
|
|
|
|
|
|
|
|
$this->bootstrap('frontController');
|
|
|
|
$frontController = $this->getResource('frontController');
|
|
|
|
$frontController->registerPlugin($debug);
|
|
|
|
}
|
2012-09-11 06:50:56 +02:00
|
|
|
*/
|
2011-08-22 16:12:53 +02:00
|
|
|
}
|
2012-01-16 09:56:57 +01:00
|
|
|
|
2011-12-22 01:01:29 +01:00
|
|
|
protected function _initRouter()
|
|
|
|
{
|
2012-08-24 03:58:21 +02:00
|
|
|
$front = Zend_Controller_Front::getInstance();
|
2011-12-22 01:01:29 +01:00
|
|
|
$router = $front->getRouter();
|
2014-08-14 23:22:01 +02:00
|
|
|
$front->setBaseUrl(Application_Common_OsPath::getBaseDir());
|
2015-04-10 23:14:56 +02:00
|
|
|
|
2011-12-22 01:01:29 +01:00
|
|
|
$router->addRoute(
|
|
|
|
'password-change',
|
|
|
|
new Zend_Controller_Router_Route('password-change/:user_id/:token', array(
|
|
|
|
'module' => 'default',
|
2012-04-17 18:16:10 +02:00
|
|
|
'controller' => 'login',
|
2011-12-22 01:01:29 +01:00
|
|
|
'action' => 'password-change',
|
|
|
|
)));
|
|
|
|
}
|
2014-04-24 22:19:55 +02:00
|
|
|
|
|
|
|
public function _initPlugins()
|
|
|
|
{
|
|
|
|
$front = Zend_Controller_Front::getInstance();
|
|
|
|
$front->registerPlugin(new Zend_Controller_Plugin_Maintenance());
|
|
|
|
}
|
2010-12-07 20:19:27 +01:00
|
|
|
}
|
|
|
|
|