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