From 4260dce826cc0572371d5ab0d30ecf5f1ecb072a Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Thu, 7 Jun 2012 17:28:39 +0200 Subject: [PATCH] Better handling of core.css and core.js Fixes calling remote.php on install. Fixes http://bugs.owncloud.org/thebuggenie/owncloud/issues/oc-933 --- core/templates/layout.guest.php | 4 ++-- core/templates/layout.user.php | 4 ++-- lib/app.php | 5 +++++ lib/base.php | 7 ------- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/core/templates/layout.guest.php b/core/templates/layout.guest.php index 7f5a4d50fc..55cc8008d9 100644 --- a/core/templates/layout.guest.php +++ b/core/templates/layout.guest.php @@ -4,7 +4,7 @@ ownCloud - + @@ -14,7 +14,7 @@ var oc_webroot = ''; var oc_appswebroot = ''; - + diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php index 8f6c029007..e04fcabf13 100644 --- a/core/templates/layout.user.php +++ b/core/templates/layout.user.php @@ -4,7 +4,7 @@ <?php echo isset($_['application']) && !empty($_['application'])?$_['application'].' | ':'' ?>ownCloud <?php echo OC_User::getUser()?' ('.OC_User::getUser().') ':'' ?> - + @@ -15,7 +15,7 @@ var oc_appswebroot = ''; var oc_current_user = ''; - + diff --git a/lib/app.php b/lib/app.php index 667633e264..e8a5a1291d 100755 --- a/lib/app.php +++ b/lib/app.php @@ -67,6 +67,11 @@ 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/base.php b/lib/base.php index a65a33b166..4bd165862b 100644 --- a/lib/base.php +++ b/lib/base.php @@ -426,13 +426,6 @@ class OC{ //make sure temporary files are cleaned up register_shutdown_function(array('OC_Helper','cleanTmp')); - if (OC_Config::getValue('installed', false)) { - 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'); - } - } - //parse the given parameters self::$REQUESTEDAPP = (isset($_GET['app'])?str_replace(array('\0', '/', '\\', '..'), '', strip_tags($_GET['app'])):OC_Config::getValue('defaultapp', 'files')); if(substr_count(self::$REQUESTEDAPP, '?') != 0){