diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-02-12 12:01:52 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-02-12 12:09:18 +0100 |
commit | e9e1b0638c75a68010b92d92489837b790282707 (patch) | |
tree | 608134d37985ffab713c211eac0153145cc03497 /lib/private | |
parent | 267341fbeba5d1ef110b50e7cead9b0d26068fc1 (diff) | |
download | nextcloud-server-e9e1b0638c75a68010b92d92489837b790282707.tar.gz nextcloud-server-e9e1b0638c75a68010b92d92489837b790282707.zip |
catch any whitespaces which might get written to the output buffer while loading a theme
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/defaults.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/defaults.php b/lib/private/defaults.php index a087e437069..77110adf511 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(); } } |