[Pkg-owncloud-commits] [owncloud] 10/14: catch any whitespaces which might get written to the output buffer while loading a theme
David Prévot
taffit at moszumanska.debian.org
Wed Mar 11 15:49:33 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v6.0.7
in repository owncloud.
commit e9e1b0638c75a68010b92d92489837b790282707
Author: Thomas Müller <thomas.mueller at tmit.eu>
Date: Thu Feb 12 12:01:52 2015 +0100
catch any whitespaces which might get written to the output buffer while loading a theme
---
lib/private/defaults.php | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/private/defaults.php b/lib/private/defaults.php
index a087e43..77110ad 100644
--- a/lib/private/defaults.php
+++ b/lib/private/defaults.php
@@ -1,9 +1,5 @@
<?php
-if (file_exists(OC::$SERVERROOT . '/themes/' . OC_Util::getTheme() . '/defaults.php')) {
- require_once 'themes/' . OC_Util::getTheme() . '/defaults.php';
-}
-
/**
* Default strings and values which differ between the enterprise and the
* community edition. Use the get methods to always get the right strings.
@@ -36,7 +32,11 @@ class OC_Defaults {
$this->defaultLogoClaim = "";
$this->defaultMailHeaderColor = "#1d2d44"; /* header color of mail notifications */
- if (class_exists("OC_Theme")) {
+ if (file_exists(OC::$SERVERROOT . '/themes/' . OC_Util::getTheme() . '/defaults.php')) {
+ // prevent defaults.php from printing output
+ ob_start();
+ require_once 'themes/' . OC_Util::getTheme() . '/defaults.php';
+ ob_end_clean();
$this->theme = new OC_Theme();
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list