Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-02-12 13:20:38 +0300
committerThomas Müller <thomas.mueller@tmit.eu>2015-02-12 13:28:59 +0300
commita45c606b961094e5a238d73a172a088b5b49d01f (patch)
tree8deae7aff63f412d9e1eca4a19f135a86c352881
parentfcad7252bd7451baa2d7f4ee5c24178a86057b15 (diff)
catch any whitespaces which might get written to the output buffer while loading a theme
-rw-r--r--lib/private/defaults.php10
-rw-r--r--lib/private/util.php10
2 files changed, 10 insertions, 10 deletions
diff --git a/lib/private/defaults.php b/lib/private/defaults.php
index 7993d17f3d1..3123d178a5b 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.
@@ -43,7 +39,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();
}
}
diff --git a/lib/private/util.php b/lib/private/util.php
index 2642a71684f..f02a990aa46 100644
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -426,11 +426,6 @@ class OC_Util {
$webServerRestart = true;
}
- //common hint for all file permissions error messages
- $permissionsHint = $l->t('Permissions can usually be fixed by '
- .'%sgiving the webserver write access to the root directory%s.',
- array('<a href="'.\OC_Helper::linkToDocs('admin-dir_permissions').'" target="_blank">', '</a>'));
-
// Check if config folder is writable.
if(!is_writable(OC::$configDir) or !is_readable(OC::$configDir)) {
$errors[] = array(
@@ -470,6 +465,11 @@ class OC_Util {
);
}
} else if (!is_writable($CONFIG_DATADIRECTORY) or !is_readable($CONFIG_DATADIRECTORY)) {
+ //common hint for all file permissions error messages
+ $permissionsHint = $l->t('Permissions can usually be fixed by '
+ .'%sgiving the webserver write access to the root directory%s.',
+ array('<a href="'.\OC_Helper::linkToDocs('admin-dir_permissions').'" target="_blank">', '</a>'));
+
$errors[] = array(
'error' => 'Data directory (' . $CONFIG_DATADIRECTORY . ') not writable by ownCloud',
'hint' => $permissionsHint