Fix undefined variable
This commit is contained in:
parent
276d98b9dd
commit
7f0a3018b6
|
@ -17,11 +17,15 @@ header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
|
||||||
$l = OC_L10N::get('core');
|
$l = OC_L10N::get('core');
|
||||||
|
|
||||||
// Get the config
|
// Get the config
|
||||||
$debug = (defined('DEBUG') && DEBUG) ? 'true' : 'false';
|
$apps_paths = array();
|
||||||
|
foreach(OC_App::getEnabledApps() as $app) {
|
||||||
|
$apps_paths[$app] = OC_App::getAppWebPath($app);
|
||||||
|
}
|
||||||
|
|
||||||
$array = array(
|
$array = array(
|
||||||
"oc_debug" => $debug,
|
"oc_debug" => (defined('DEBUG') && DEBUG) ? 'true' : 'false',
|
||||||
"oc_webroot" => "\"".OC::$WEBROOT."\"",
|
"oc_webroot" => "\"".OC::$WEBROOT."\"",
|
||||||
"oc_appswebroots" => "\"".$_['apps_paths']. "\"",
|
"oc_appswebroots" => str_replace('\\/', '/', json_encode($apps_paths)), // Ugly unescape slashes waiting for better solution
|
||||||
"oc_current_user" => "\"".OC_User::getUser(). "\"",
|
"oc_current_user" => "\"".OC_User::getUser(). "\"",
|
||||||
"oc_requesttoken" => "\"".OC_Util::callRegister(). "\"",
|
"oc_requesttoken" => "\"".OC_Util::callRegister(). "\"",
|
||||||
"datepickerFormatDate" => json_encode($l->l('jsdate', 'jsdate')),
|
"datepickerFormatDate" => json_encode($l->l('jsdate', 'jsdate')),
|
||||||
|
|
|
@ -28,11 +28,6 @@ class OC_TemplateLayout extends OC_Template {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$apps_paths = array();
|
|
||||||
foreach(OC_App::getEnabledApps() as $app) {
|
|
||||||
$apps_paths[$app] = OC_App::getAppWebPath($app);
|
|
||||||
}
|
|
||||||
$this->assign( 'apps_paths', str_replace('\\/', '/', json_encode($apps_paths)), false ); // Ugly unescape slashes waiting for better solution
|
|
||||||
} else if ($renderas == 'guest') {
|
} else if ($renderas == 'guest') {
|
||||||
parent::__construct('core', 'layout.guest');
|
parent::__construct('core', 'layout.guest');
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue