From 5caa7576d493ef6b639b59718701d67bf8db90cb Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Tue, 23 Jul 2013 17:36:08 +0200 Subject: [PATCH 1/3] Revert "fix failing master branch - Test_Config::testWriteData" This reverts commit 8f93490ac45fbd74bd0e9697a685fd43bb34239b. --- lib/config.php | 6 +----- tests/lib/config.php | 11 ----------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/lib/config.php b/lib/config.php index a38ce19c74..00d9f5b424 100644 --- a/lib/config.php +++ b/lib/config.php @@ -144,11 +144,7 @@ class Config { continue; } unset($CONFIG); - if((@include $file) === false) - { - throw new HintException("Can't read from config file '" . $file . "'. ". - 'This is usually caused by the wrong file permission.'); - } + include $file; if (isset($CONFIG) && is_array($CONFIG)) { $this->cache = array_merge($this->cache, $CONFIG); } diff --git a/tests/lib/config.php b/tests/lib/config.php index 1a1d062d68..c67a66c832 100644 --- a/tests/lib/config.php +++ b/tests/lib/config.php @@ -80,17 +80,6 @@ class Test_Config extends PHPUnit_Framework_TestCase { */ public function testWriteData() { $config = new OC\Config('/non-writable'); - // TODO never get's called, because the previous call throws the exception - // maybe include some more logic to create a readable dir and then try to - // write to this dir - // - // console commands: - // $ sudo touch /non-writableconfig.php - // $ sudo chmod go-rwx /non-writableconfig.php - // ---- call the tests now -> above statemant throws the exception - // - // $ sudo chmod go+r /non-writableconfig.php - // ---- call the tests now -> bellow statemant throws the exception $config->setValue('foo', 'bar'); } } From 485e8ab0a5502bacdac2a9d4e71c2b548aa8c552 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Tue, 23 Jul 2013 17:38:37 +0200 Subject: [PATCH 2/3] ignore config read failures --- lib/config.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/config.php b/lib/config.php index 00d9f5b424..9dbe2e46bd 100644 --- a/lib/config.php +++ b/lib/config.php @@ -144,7 +144,8 @@ class Config { continue; } unset($CONFIG); - include $file; + // ignore errors on include, this can happen when doing a fresh install + @include $file; if (isset($CONFIG) && is_array($CONFIG)) { $this->cache = array_merge($this->cache, $CONFIG); } From 9d91ceade409385bbdba4a0cad4cd41b02d423e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Wed, 24 Jul 2013 10:49:33 +0200 Subject: [PATCH 3/3] fix php syntax --- apps/user_ldap/templates/settings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/user_ldap/templates/settings.php b/apps/user_ldap/templates/settings.php index 1dfae20ad2..48a9a7aec6 100644 --- a/apps/user_ldap/templates/settings.php +++ b/apps/user_ldap/templates/settings.php @@ -80,10 +80,10 @@

t('Directory Settings'));?>

-

+

-

+