summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-09-07 16:42:46 +0200
committerBart Visscher <bartv@thisnet.nl>2012-09-07 16:42:46 +0200
commitedcd29747692ff1ffbec927b9f31ac239c5e192d (patch)
treeb22e6c708c676413b4c6048e0378dfeae2b450f0 /lib
parent631df21de640183623e626409903a0a1f7b0105d (diff)
downloadnextcloud-server-edcd29747692ff1ffbec927b9f31ac239c5e192d.tar.gz
nextcloud-server-edcd29747692ff1ffbec927b9f31ac239c5e192d.zip
Move handling of core remotes to OC_TemplateLayout
Diffstat (limited to 'lib')
-rwxr-xr-xlib/app.php5
-rw-r--r--lib/templatelayout.php12
2 files changed, 11 insertions, 6 deletions
diff --git a/lib/app.php b/lib/app.php
index f1e4f965efd..28f1f16ebaf 100755
--- a/lib/app.php
+++ b/lib/app.php
@@ -69,11 +69,6 @@ class OC_App{
OC_Util::$scripts = array();
OC_Util::$core_styles = OC_Util::$styles;
OC_Util::$styles = array();
-
- if (!OC_AppConfig::getValue('core', 'remote_core.css', false)) {
- OC_AppConfig::setValue('core', 'remote_core.css', '/core/minimizer.php');
- OC_AppConfig::setValue('core', 'remote_core.js', '/core/minimizer.php');
- }
}
}
// return
diff --git a/lib/templatelayout.php b/lib/templatelayout.php
index ad013edad8c..d72f5552fde 100644
--- a/lib/templatelayout.php
+++ b/lib/templatelayout.php
@@ -41,9 +41,17 @@ class OC_TemplateLayout extends OC_Template {
}
$this->assign( 'apps_paths', str_replace('\\/', '/',json_encode($apps_paths)),false ); // Ugly unescape slashes waiting for better solution
+ if (!OC_AppConfig::getValue('core', 'remote_core.css', false)) {
+ OC_AppConfig::setValue('core', 'remote_core.css', '/core/minimizer.php');
+ OC_AppConfig::setValue('core', 'remote_core.js', '/core/minimizer.php');
+ }
+
// Add the js files
$jsfiles = self::findJavascriptFiles(OC_Util::$scripts);
$this->assign('jsfiles', array(), false);
+ if (!empty(OC_Util::$core_scripts)) {
+ $this->append( 'jsfiles', OC_Helper::linkToRemote('core.js', false));
+ }
foreach($jsfiles as $info) {
$root = $info[0];
$web = $info[1];
@@ -53,8 +61,10 @@ class OC_TemplateLayout extends OC_Template {
// Add the css files
$cssfiles = self::findStylesheetFiles(OC_Util::$styles);
-
$this->assign('cssfiles', array());
+ if (!empty(OC_Util::$core_styles)) {
+ $this->append( 'cssfiles', OC_Helper::linkToRemote('core.css', false));
+ }
foreach($cssfiles as $info) {
$root = $info[0];
$web = $info[1];