diff options
26 files changed, 158 insertions, 74 deletions
diff --git a/apps/files/appinfo/update.php b/apps/files/appinfo/update.php index 2691c05c348..ff1369bb1a5 100644 --- a/apps/files/appinfo/update.php +++ b/apps/files/appinfo/update.php @@ -94,3 +94,12 @@ if ($installedVersion === '1.1.9' && ( } } } + +/** + * migrate old constant DEBUG to new config value 'debug' + * + * TODO: remove this in ownCloud 8.3 + */ +if(defined('DEBUG') && DEBUG === true) { + \OC::$server->getConfig()->setSystemValue('debug', true); +} diff --git a/apps/files/appinfo/version b/apps/files/appinfo/version index 5ed5faa5f16..9ee1f786d50 100644 --- a/apps/files/appinfo/version +++ b/apps/files/appinfo/version @@ -1 +1 @@ -1.1.10 +1.1.11 diff --git a/apps/files/css/detailsView.css b/apps/files/css/detailsView.css index 76629cb790f..dafd8c24573 100644 --- a/apps/files/css/detailsView.css +++ b/apps/files/css/detailsView.css @@ -12,11 +12,11 @@ } #app-sidebar .thumbnail { - width: 50px; - height: 50px; + width: 75px; + height: 75px; float: left; margin-right: 10px; - background-size: 50px; + background-size: 75px; } #app-sidebar .ellipsis { @@ -27,7 +27,8 @@ #app-sidebar .fileName { font-size: 16px; - padding-top: 3px; + padding-top: 13px; + padding-bottom: 3px; } #app-sidebar .file-details { diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index eb46f155269..e294e2f3c09 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -673,6 +673,7 @@ id: parseInt($el.attr('data-id'), 10), name: $el.attr('data-file'), mimetype: $el.attr('data-mime'), + mtime: parseInt($el.attr('data-mtime'), 10), type: $el.attr('data-type'), size: parseInt($el.attr('data-size'), 10), etag: $el.attr('data-etag'), diff --git a/apps/files/js/mainfileinfodetailview.js b/apps/files/js/mainfileinfodetailview.js index 6910e5f2be5..8bf22149841 100644 --- a/apps/files/js/mainfileinfodetailview.js +++ b/apps/files/js/mainfileinfodetailview.js @@ -125,8 +125,8 @@ path: this.model.getFullPath(), mime: this.model.get('mimetype'), etag: this.model.get('etag'), - x: 50, - y: 50, + x: 75, + y: 75, callback: function(previewUrl) { $iconDiv.css('background-image', 'url("' + previewUrl + '")'); } diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js index 7ed60084fa9..a6d72a88efd 100644 --- a/apps/files/tests/js/filelistSpec.js +++ b/apps/files/tests/js/filelistSpec.js @@ -98,6 +98,7 @@ describe('OCA.Files.FileList tests', function() { type: 'file', name: 'One.txt', mimetype: 'text/plain', + mtime: 123456789, size: 12, etag: 'abc', permissions: OC.PERMISSION_ALL @@ -106,6 +107,7 @@ describe('OCA.Files.FileList tests', function() { type: 'file', name: 'Two.jpg', mimetype: 'image/jpeg', + mtime: 234567890, size: 12049, etag: 'def', permissions: OC.PERMISSION_ALL @@ -114,6 +116,7 @@ describe('OCA.Files.FileList tests', function() { type: 'file', name: 'Three.pdf', mimetype: 'application/pdf', + mtime: 234560000, size: 58009, etag: '123', permissions: OC.PERMISSION_ALL @@ -122,6 +125,7 @@ describe('OCA.Files.FileList tests', function() { type: 'dir', name: 'somedir', mimetype: 'httpd/unix-directory', + mtime: 134560000, size: 250, etag: '456', permissions: OC.PERMISSION_ALL @@ -1722,6 +1726,7 @@ describe('OCA.Files.FileList tests', function() { id: 1, name: 'One.txt', mimetype: 'text/plain', + mtime: 123456789, type: 'file', size: 12, etag: 'abc', @@ -1732,6 +1737,7 @@ describe('OCA.Files.FileList tests', function() { type: 'file', name: 'Three.pdf', mimetype: 'application/pdf', + mtime: 234560000, size: 58009, etag: '123', permissions: OC.PERMISSION_ALL @@ -1741,6 +1747,7 @@ describe('OCA.Files.FileList tests', function() { type: 'dir', name: 'somedir', mimetype: 'httpd/unix-directory', + mtime: 134560000, size: 250, etag: '456', permissions: OC.PERMISSION_ALL @@ -1754,6 +1761,7 @@ describe('OCA.Files.FileList tests', function() { id: 1, name: 'One.txt', mimetype: 'text/plain', + mtime: 123456789, type: 'file', size: 12, etag: 'abc', @@ -1764,6 +1772,7 @@ describe('OCA.Files.FileList tests', function() { type: 'dir', name: 'somedir', mimetype: 'httpd/unix-directory', + mtime: 134560000, size: 250, etag: '456', permissions: OC.PERMISSION_ALL @@ -2330,4 +2339,24 @@ describe('OCA.Files.FileList tests', function() { }); }); }); + describe('elementToFile', function() { + var $tr; + + beforeEach(function() { + fileList.setFiles(testFiles); + $tr = fileList.findFileEl('One.txt'); + }); + + it('converts data attributes to file info structure', function() { + var fileInfo = fileList.elementToFile($tr); + expect(fileInfo.id).toEqual(1); + expect(fileInfo.name).toEqual('One.txt'); + expect(fileInfo.mtime).toEqual(123456789); + expect(fileInfo.etag).toEqual('abc'); + expect(fileInfo.permissions).toEqual(OC.PERMISSION_ALL); + expect(fileInfo.size).toEqual(12); + expect(fileInfo.mimetype).toEqual('text/plain'); + expect(fileInfo.type).toEqual('file'); + }); + }); }); diff --git a/apps/files_external/lib/amazons3.php b/apps/files_external/lib/amazons3.php index fd98d26f834..7c6ac4cbdd5 100644 --- a/apps/files_external/lib/amazons3.php +++ b/apps/files_external/lib/amazons3.php @@ -122,7 +122,7 @@ class AmazonS3 extends \OC\Files\Storage\Common { $params['region'] = empty($params['region']) ? 'eu-west-1' : $params['region']; $params['hostname'] = empty($params['hostname']) ? 's3.amazonaws.com' : $params['hostname']; if (!isset($params['port']) || $params['port'] === '') { - $params['port'] = ($params['use_ssl'] === 'false') ? 80 : 443; + $params['port'] = ($params['use_ssl'] === false) ? 80 : 443; } $this->params = $params; } @@ -585,7 +585,7 @@ class AmazonS3 extends \OC\Files\Storage\Common { return $this->connection; } - $scheme = ($this->params['use_ssl'] === 'false') ? 'http' : 'https'; + $scheme = ($this->params['use_ssl'] === false) ? 'http' : 'https'; $base_url = $scheme . '://' . $this->params['hostname'] . ':' . $this->params['port'] . '/'; $this->connection = S3Client::factory(array( diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index b4c6867a26c..62932dc4028 100644 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -230,7 +230,9 @@ class OC_Mount_Config { } } } else { - $input = str_replace('$user', $user, $input); + if (is_string($input)) { + $input = str_replace('$user', $user, $input); + } } return $input; } diff --git a/apps/files_external/lib/definitionparameter.php b/apps/files_external/lib/definitionparameter.php index 4b560908b69..7f883e5fad1 100644 --- a/apps/files_external/lib/definitionparameter.php +++ b/apps/files_external/lib/definitionparameter.php @@ -154,22 +154,31 @@ class DefinitionParameter implements \JsonSerializable { /** * Validate a parameter value against this + * Convert type as necessary * * @param mixed $value Value to check * @return bool success */ - public function validateValue($value) { - if ($this->getFlags() & self::FLAG_OPTIONAL) { - return true; - } + public function validateValue(&$value) { + $optional = $this->getFlags() & self::FLAG_OPTIONAL; + switch ($this->getType()) { case self::VALUE_BOOLEAN: if (!is_bool($value)) { - return false; + switch ($value) { + case 'true': + $value = true; + break; + case 'false': + $value = false; + break; + default: + return false; + } } break; default: - if (empty($value)) { + if (!$value && !$optional) { return false; } break; diff --git a/apps/files_external/lib/frontenddefinitiontrait.php b/apps/files_external/lib/frontenddefinitiontrait.php index 4b826372d2f..a5fb1a3f62f 100644 --- a/apps/files_external/lib/frontenddefinitiontrait.php +++ b/apps/files_external/lib/frontenddefinitiontrait.php @@ -134,12 +134,12 @@ trait FrontendDefinitionTrait { * @return bool */ public function validateStorageDefinition(StorageConfig $storage) { - $options = $storage->getBackendOptions(); foreach ($this->getParameters() as $name => $parameter) { - $value = isset($options[$name]) ? $options[$name] : null; + $value = $storage->getBackendOption($name); if (!$parameter->validateValue($value)) { return false; } + $storage->setBackendOption($name, $value); } return true; } diff --git a/apps/files_external/lib/ftp.php b/apps/files_external/lib/ftp.php index aeca17c4f4c..f3631e53fa1 100644 --- a/apps/files_external/lib/ftp.php +++ b/apps/files_external/lib/ftp.php @@ -45,11 +45,7 @@ class FTP extends \OC\Files\Storage\StreamWrapper{ $this->user=$params['user']; $this->password=$params['password']; if (isset($params['secure'])) { - if (is_string($params['secure'])) { - $this->secure = ($params['secure'] === 'true'); - } else { - $this->secure = (bool)$params['secure']; - } + $this->secure = $params['secure']; } else { $this->secure = false; } diff --git a/apps/files_external/lib/smb_oc.php b/apps/files_external/lib/smb_oc.php index 52b73c46ff9..547caa5ecbf 100644 --- a/apps/files_external/lib/smb_oc.php +++ b/apps/files_external/lib/smb_oc.php @@ -39,7 +39,7 @@ class SMB_OC extends SMB { public function __construct($params) { if (isset($params['host'])) { $host = $params['host']; - $this->username_as_share = ($params['username_as_share'] === 'true'); + $this->username_as_share = ($params['username_as_share'] === true); // dummy credentials, unused, to satisfy constructor $user = 'foo'; diff --git a/apps/files_external/service/storagesservice.php b/apps/files_external/service/storagesservice.php index 282ac8f2db1..3e2152741e5 100644 --- a/apps/files_external/service/storagesservice.php +++ b/apps/files_external/service/storagesservice.php @@ -118,6 +118,8 @@ abstract class StoragesService { $applicableGroups[] = $applicable; $storageConfig->setApplicableGroups($applicableGroups); } + + return $storageConfig; } @@ -238,6 +240,12 @@ abstract class StoragesService { $this->setRealStorageIds($storages, $storagesWithConfigHash); } + // convert parameter values + foreach ($storages as $storage) { + $storage->getBackend()->validateStorageDefinition($storage); + $storage->getAuthMechanism()->validateStorageDefinition($storage); + } + return $storages; } diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php index 611c5807a5f..5b79edf6cf7 100644 --- a/apps/files_external/templates/settings.php +++ b/apps/files_external/templates/settings.php @@ -27,7 +27,7 @@ <input type="checkbox" <?php if (!empty($classes)): ?> class="<?php p(implode(' ', $classes)); ?>"<?php endif; ?> data-parameter="<?php p($parameter->getName()); ?>" - <?php if ($value == 'true'): ?> checked="checked"<?php endif; ?> + <?php if ($value === true): ?> checked="checked"<?php endif; ?> /> <?php p($placeholder); ?> </label> diff --git a/apps/files_external/tests/definitionparameterttest.php b/apps/files_external/tests/definitionparameterttest.php index 6be00508698..22e0b842254 100644 --- a/apps/files_external/tests/definitionparameterttest.php +++ b/apps/files_external/tests/definitionparameterttest.php @@ -49,6 +49,9 @@ class DefinitionParameterTest extends \Test\TestCase { [Param::VALUE_BOOLEAN, Param::FLAG_NONE, false, true], [Param::VALUE_BOOLEAN, Param::FLAG_NONE, 123, false], + // conversion from string to boolean + [Param::VALUE_BOOLEAN, Param::FLAG_NONE, 'false', true, false], + [Param::VALUE_BOOLEAN, Param::FLAG_NONE, 'true', true, true], [Param::VALUE_PASSWORD, Param::FLAG_NONE, 'foobar', true], [Param::VALUE_PASSWORD, Param::FLAG_NONE, '', false], @@ -60,11 +63,14 @@ class DefinitionParameterTest extends \Test\TestCase { /** * @dataProvider validateValueProvider */ - public function testValidateValue($type, $flags, $value, $success) { + public function testValidateValue($type, $flags, $value, $success, $expectedValue = null) { $param = new Param('foo', 'bar'); $param->setType($type); $param->setFlags($flags); $this->assertEquals($success, $param->validateValue($value)); + if (isset($expectedValue)) { + $this->assertEquals($expectedValue, $value); + } } } diff --git a/apps/files_external/tests/frontenddefinitiontraittest.php b/apps/files_external/tests/frontenddefinitiontraittest.php index 871a87d4c52..d92d02b9854 100644 --- a/apps/files_external/tests/frontenddefinitiontraittest.php +++ b/apps/files_external/tests/frontenddefinitiontraittest.php @@ -70,9 +70,11 @@ class FrontendDefinitionTraitTest extends \Test\TestCase { $storageConfig = $this->getMockBuilder('\OCA\Files_External\Lib\StorageConfig') ->disableOriginalConstructor() ->getMock(); - $storageConfig->expects($this->once()) - ->method('getBackendOptions') - ->willReturn([]); + $storageConfig->expects($this->any()) + ->method('getBackendOption') + ->willReturn(null); + $storageConfig->expects($this->any()) + ->method('setBackendOption'); $trait = $this->getMockForTrait('\OCA\Files_External\Lib\FrontendDefinitionTrait'); $trait->setText('test'); @@ -80,4 +82,35 @@ class FrontendDefinitionTraitTest extends \Test\TestCase { $this->assertEquals($expectedSuccess, $trait->validateStorageDefinition($storageConfig)); } + + public function testValidateStorageSet() { + $param = $this->getMockBuilder('\OCA\Files_External\Lib\DefinitionParameter') + ->disableOriginalConstructor() + ->getMock(); + $param->method('getName') + ->willReturn('param'); + $param->expects($this->once()) + ->method('validateValue') + ->will($this->returnCallback(function(&$value) { + $value = 'foobar'; + return true; + })); + + $storageConfig = $this->getMockBuilder('\OCA\Files_External\Lib\StorageConfig') + ->disableOriginalConstructor() + ->getMock(); + $storageConfig->expects($this->once()) + ->method('getBackendOption') + ->with('param') + ->willReturn('barfoo'); + $storageConfig->expects($this->once()) + ->method('setBackendOption') + ->with('param', 'foobar'); + + $trait = $this->getMockForTrait('\OCA\Files_External\Lib\FrontendDefinitionTrait'); + $trait->setText('test'); + $trait->addParameter($param); + + $this->assertEquals(true, $trait->validateStorageDefinition($storageConfig)); + } } diff --git a/apps/files_external/tests/service/globalstoragesservicetest.php b/apps/files_external/tests/service/globalstoragesservicetest.php index 05585d2c065..2bc480ca312 100644 --- a/apps/files_external/tests/service/globalstoragesservicetest.php +++ b/apps/files_external/tests/service/globalstoragesservicetest.php @@ -789,6 +789,13 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { file_put_contents($configFile, json_encode($json)); + $this->backendService->getBackend('identifier:\OCA\Files_External\Lib\Backend\SMB') + ->expects($this->exactly(4)) + ->method('validateStorageDefinition'); + $this->backendService->getAuthMechanism('identifier:\Auth\Mechanism') + ->expects($this->exactly(4)) + ->method('validateStorageDefinition'); + $allStorages = $this->service->getAllStorages(); $this->assertCount(4, $allStorages); diff --git a/config/config.sample.php b/config/config.sample.php index 522cf02ceba..234bf8e0fa3 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -20,12 +20,6 @@ * * use RST syntax */ -/** - * Only enable this for local development and not in production environments - * This will disable the minifier and outputs some additional debug informations - */ -define('DEBUG', true); - $CONFIG = array( @@ -1080,6 +1074,14 @@ $CONFIG = array( 'memcache.locking' => '\\OC\\Memcache\\Redis', /** + * Set this ownCloud instance to debugging mode + * + * Only enable this for local development and not in production environments + * This will disable the minifier and outputs some additional debug information + */ +'debug' => false, + +/** * This entry is just here to show a warning in case somebody copied the sample * configuration. DO NOT ADD THIS SWITCH TO YOUR CONFIGURATION! * diff --git a/core/css/apps.css b/core/css/apps.css index 300b186bba2..b3d7eaf6599 100644 --- a/core/css/apps.css +++ b/core/css/apps.css @@ -440,8 +440,10 @@ left: auto; bottom: 0; width: 27%; + min-width: 250px; display: block; - background: #eee; + background: #fff; + border-left: 1px solid #eee; -webkit-transition: margin-right 300ms; -moz-transition: margin-right 300ms; -o-transition: margin-right 300ms; @@ -600,47 +602,31 @@ em { /* generic tab styles */ .tabHeaders { margin: 15px; - background-color: #1D2D44; } - .tabHeaders .tabHeader { float: left; - border: 1px solid #ddd; padding: 5px; cursor: pointer; - background-color: #f8f8f8; - font-weight: bold; } .tabHeaders .tabHeader, .tabHeaders .tabHeader a { color: #888; } - -.tabHeaders .tabHeader:first-child { - border-top-left-radius: 4px; - border-bottom-left-radius: 4px; -} - -.tabHeaders .tabHeader:last-child { - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; +.tabHeaders .tabHeader.selected { + font-weight: 600; } - .tabHeaders .tabHeader.selected, .tabHeaders .tabHeader:hover { - background-color: #e8e8e8; + border-bottom: 1px solid #333; } - .tabHeaders .tabHeader.selected, .tabHeaders .tabHeader.selected a, .tabHeaders .tabHeader:hover, .tabHeaders .tabHeader:hover a { color: #000; } - .tabsContainer { clear: left; } - .tabsContainer .tab { padding: 15px; } diff --git a/core/css/mobile.css b/core/css/mobile.css index 2256d821d73..9008e39b89c 100644 --- a/core/css/mobile.css +++ b/core/css/mobile.css @@ -31,7 +31,6 @@ width: 0; cursor: pointer; background-color: transparent; - background-image: url('../img/actions/search-white.svg'); -webkit-transition: all 100ms; -moz-transition: all 100ms; -o-transition: all 100ms; @@ -44,8 +43,7 @@ width: 155px; max-width: 50%; cursor: text; - background-color: #fff; - background-image: url('../img/actions/search.svg'); + background-color: #112; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; opacity: 1; } diff --git a/core/css/styles.css b/core/css/styles.css index ccb48010871..619a9df7433 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -258,7 +258,8 @@ input:disabled+label, input:disabled:hover+label, input:disabled:focus+label { font-size: 1.2em; padding: 3px; padding-left: 25px; - background: #fff url('../img/actions/search.svg') no-repeat 6px center; + background: #112 url('../img/actions/search-white.svg') no-repeat 6px center; + color: #fff; border: 0; border-radius: 3px; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"; @@ -271,6 +272,7 @@ input:disabled+label, input:disabled:hover+label, input:disabled:focus+label { .searchbox input[type="search"]:active { -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)"; opacity: .7; + color: #fff; } input[type="submit"].enabled { diff --git a/core/js/config.php b/core/js/config.php index 95dd7330287..5da610698df 100644 --- a/core/js/config.php +++ b/core/js/config.php @@ -62,7 +62,7 @@ if ($defaultExpireDateEnabled) { $outgoingServer2serverShareEnabled = $config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') === 'yes'; $array = array( - "oc_debug" => (defined('DEBUG') && DEBUG) ? 'true' : 'false', + "oc_debug" => $config->getSystemValue('debug', false) ? 'true' : 'false', "oc_isadmin" => OC_User::isAdminUser(OC_User::getUser()) ? 'true' : 'false', "oc_webroot" => "\"".OC::$WEBROOT."\"", "oc_appswebroots" => str_replace('\\/', '/', json_encode($apps_paths)), // Ugly unescape slashes waiting for better solution diff --git a/lib/base.php b/lib/base.php index 2435661dfa6..aceac2e53c3 100644 --- a/lib/base.php +++ b/lib/base.php @@ -582,7 +582,7 @@ class OC { if (!defined('PHPUNIT_RUN')) { $logger = \OC::$server->getLogger(); OC\Log\ErrorHandler::setLogger($logger); - if (defined('DEBUG') and DEBUG) { + if (\OC::$server->getConfig()->getSystemValue('debug', false)) { OC\Log\ErrorHandler::register(true); set_exception_handler(array('OC_Template', 'printExceptionErrorPage')); } else { @@ -1040,7 +1040,7 @@ class OC { return false; } - if (defined("DEBUG") && DEBUG) { + if (\OC::$server->getConfig()->getSystemValue('debug', false)) { \OCP\Util::writeLog('core', 'Trying to login from cookie', \OCP\Util::DEBUG); } @@ -1093,11 +1093,12 @@ class OC { self::cleanupLoginTokens($userId); if (!empty($_POST["remember_login"])) { - if (defined("DEBUG") && DEBUG) { + $config = self::$server->getConfig(); + if ($config->getSystemValue('debug', false)) { self::$server->getLogger()->debug('Setting remember login to cookie', array('app' => 'core')); } $token = \OC::$server->getSecureRandom()->getMediumStrengthGenerator()->generate(32); - self::$server->getConfig()->setUserValue($userId, 'login_token', $token, time()); + $config->setUserValue($userId, 'login_token', $token, time()); OC_User::setMagicInCookie($userId, $token); } else { OC_User::unsetMagicInCookie(); diff --git a/lib/private/config.php b/lib/private/config.php index 20ff02c1abf..3ad800a00be 100644 --- a/lib/private/config.php +++ b/lib/private/config.php @@ -47,8 +47,6 @@ class Config { protected $configFilePath; /** @var string */ protected $configFileName; - /** @var bool */ - protected $debugMode; /** * @param string $configDir Path to the config dir, needs to end with '/' @@ -59,7 +57,6 @@ class Config { $this->configFilePath = $this->configDir.$fileName; $this->configFileName = $fileName; $this->readData(); - $this->debugMode = (defined('DEBUG') && DEBUG); } /** @@ -225,9 +222,6 @@ class Config { private function writeData() { // Create a php file ... $content = "<?php\n"; - if ($this->debugMode) { - $content .= "define('DEBUG',true);\n"; - } $content .= '$CONFIG = '; $content .= var_export($this->cache, true); $content .= ";\n"; diff --git a/lib/private/server.php b/lib/private/server.php index 92a671c721d..5a3a6328fae 100644 --- a/lib/private/server.php +++ b/lib/private/server.php @@ -329,14 +329,14 @@ class Server extends SimpleContainer implements IServerContainer { ); }); $this->registerService('EventLogger', function (Server $c) { - if (defined('DEBUG') and DEBUG) { + if ($c->getSystemConfig()->getValue('debug', false)) { return new EventLogger(); } else { return new NullEventLogger(); } }); - $this->registerService('QueryLogger', function ($c) { - if (defined('DEBUG') and DEBUG) { + $this->registerService('QueryLogger', function (Server $c) { + if ($c->getSystemConfig()->getValue('debug', false)) { return new QueryLogger(); } else { return new NullQueryLogger(); diff --git a/lib/private/template.php b/lib/private/template.php index e7acc778de3..920be71abbf 100644 --- a/lib/private/template.php +++ b/lib/private/template.php @@ -233,7 +233,7 @@ class OC_Template extends \OC\Template\Base { $content->assign('file', $exception->getFile()); $content->assign('line', $exception->getLine()); $content->assign('trace', $exception->getTraceAsString()); - $content->assign('debugMode', defined('DEBUG') && DEBUG === true); + $content->assign('debugMode', \OC::$server->getSystemConfig()->getValue('debug', false)); $content->assign('remoteAddr', $request->getRemoteAddress()); $content->assign('requestID', $request->getId()); $content->printPage(); |