Fixed base URL
Conflicts: airtime_mvc/application/controllers/LocaleController.php
This commit is contained in:
parent
716cc5a754
commit
4c1e6d3fe3
|
@ -193,7 +193,8 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||||
{
|
{
|
||||||
$front = Zend_Controller_Front::getInstance();
|
$front = Zend_Controller_Front::getInstance();
|
||||||
$router = $front->getRouter();
|
$router = $front->getRouter();
|
||||||
|
$front->setBaseUrl(Application_Common_OsPath::getBaseDir());
|
||||||
|
|
||||||
$router->addRoute(
|
$router->addRoute(
|
||||||
'password-change',
|
'password-change',
|
||||||
new Zend_Controller_Router_Route('password-change/:user_id/:token', array(
|
new Zend_Controller_Router_Route('password-change/:user_id/:token', array(
|
||||||
|
|
|
@ -65,8 +65,10 @@ class Application_Common_OsPath{
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getBaseDir() {
|
public static function getBaseDir() {
|
||||||
$baseUrl = dirname($_SERVER['SCRIPT_NAME']);
|
|
||||||
|
$CC_CONFIG = Config::getConfig();
|
||||||
|
$baseUrl = $CC_CONFIG['baseDir'];
|
||||||
|
|
||||||
if ($baseUrl[0] != "/") {
|
if ($baseUrl[0] != "/") {
|
||||||
$baseUrl = "/".$baseUrl;
|
$baseUrl = "/".$baseUrl;
|
||||||
}
|
}
|
||||||
|
@ -74,7 +76,8 @@ class Application_Common_OsPath{
|
||||||
if ($baseUrl[strlen($baseUrl) -1] != "/") {
|
if ($baseUrl[strlen($baseUrl) -1] != "/") {
|
||||||
$baseUrl = $baseUrl."/";
|
$baseUrl = $baseUrl."/";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return $baseUrl;
|
return $baseUrl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,12 +12,11 @@ class LocaleController extends Zend_Controller_Action
|
||||||
$this->_helper->viewRenderer->setNoRender(true);
|
$this->_helper->viewRenderer->setNoRender(true);
|
||||||
header("Content-type: text/javascript");
|
header("Content-type: text/javascript");
|
||||||
|
|
||||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
|
||||||
$locale = Application_Model_Preference::GetLocale();
|
$locale = Application_Model_Preference::GetLocale();
|
||||||
echo "var datatables_dict =" .
|
echo "var datatables_dict =" .
|
||||||
file_get_contents(Application_Common_OsPath::join(
|
file_get_contents(Application_Common_OsPath::join(
|
||||||
dirname(__file__),
|
$_SERVER["DOCUMENT_ROOT"],
|
||||||
"../../public/js/datatables/i18n/",
|
"js/datatables/i18n/",
|
||||||
$locale.".txt")
|
$locale.".txt")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue