From 46422e6dbeac4993a4750f1dfec16f8e22a1d876 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Sat, 8 Sep 2012 23:40:23 +0200 Subject: don't use regular expresions for a simple string replace --- lib/base.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/base.php') diff --git a/lib/base.php b/lib/base.php index 1c6cc70b0e8..679acdb6e5d 100644 --- a/lib/base.php +++ b/lib/base.php @@ -75,7 +75,7 @@ class OC{ /** @TODO: Remove this when necessary Remove "apps/" from inclusion path for smooth migration to mutli app dir */ - $path = preg_replace('/apps\//', '', OC::$CLASSPATH[$className]); + $path = str_replace('apps/', '', OC::$CLASSPATH[$className]); require_once $path; } elseif(strpos($className, 'OC_')===0) { -- cgit v1.2.3 From c5f9b887ffc9ec793d0d5f35536fa215fb95efc6 Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Wed, 12 Sep 2012 01:18:07 -0400 Subject: Don't call clearCache() for OC_Minimizer statically, create OC_Minimizer objects for both CSS and JS to clear cache after upgrade --- lib/base.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/base.php') diff --git a/lib/base.php b/lib/base.php index 679acdb6e5d..6b4dd789b2f 100644 --- a/lib/base.php +++ b/lib/base.php @@ -219,8 +219,10 @@ class OC{ $tmpl->printPage(); exit; } - OC_Minimizer::clearCache(); - + $minimizerCSS = new OC_Minimizer_CSS(); + $minimizerCSS->clearCache(); + $minimizerJS = new OC_Minimizer_JS(); + $minimizerJS->clearCache(); OC_Config::setValue('version', implode('.', OC_Util::getVersion())); OC_App::checkAppsRequirements(); // load all apps to also upgrade enabled apps -- cgit v1.2.3 From c4fc291fa78ba620900dfd6106fc8528473f2a54 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Tue, 25 Sep 2012 19:57:40 +0200 Subject: Passwords containing a ":" don't work with this explode Thanks to mETz --- lib/base.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/base.php') diff --git a/lib/base.php b/lib/base.php index 6b4dd789b2f..f6afc8fe2fe 100644 --- a/lib/base.php +++ b/lib/base.php @@ -303,14 +303,14 @@ class OC{ //set http auth headers for apache+php-cgi work around if (isset($_SERVER['HTTP_AUTHORIZATION']) && preg_match('/Basic\s+(.*)$/i', $_SERVER['HTTP_AUTHORIZATION'], $matches)) { - list($name, $password) = explode(':', base64_decode($matches[1])); + list($name, $password) = explode(':', base64_decode($matches[1]), 2); $_SERVER['PHP_AUTH_USER'] = strip_tags($name); $_SERVER['PHP_AUTH_PW'] = strip_tags($password); } //set http auth headers for apache+php-cgi work around if variable gets renamed by apache if (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION']) && preg_match('/Basic\s+(.*)$/i', $_SERVER['REDIRECT_HTTP_AUTHORIZATION'], $matches)) { - list($name, $password) = explode(':', base64_decode($matches[1])); + list($name, $password) = explode(':', base64_decode($matches[1]), 2); $_SERVER['PHP_AUTH_USER'] = strip_tags($name); $_SERVER['PHP_AUTH_PW'] = strip_tags($password); } -- cgit v1.2.3