<?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.
$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();
}
}
$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(
);
}
} 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