summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan-Christoph Borchardt <hey@jancborchardt.net>2013-07-24 12:26:05 +0200
committerJan-Christoph Borchardt <hey@jancborchardt.net>2013-07-24 12:26:05 +0200
commit28a41a0316bd0443ac39f2e7f5e899f2d3c13e5a (patch)
treeec9490043cb87324a8a03f0252ddc1ff51aa129e
parent6a5e2ea7d542cf11593d43f022d7ff3a2c270908 (diff)
parentb91c6827b79d4ab3337539dff6d44b301e1250d3 (diff)
downloadnextcloud-server-28a41a0316bd0443ac39f2e7f5e899f2d3c13e5a.tar.gz
nextcloud-server-28a41a0316bd0443ac39f2e7f5e899f2d3c13e5a.zip
Merge branch 'master' into remember-checked
-rw-r--r--apps/user_ldap/templates/settings.php4
-rw-r--r--lib/config.php7
-rw-r--r--tests/lib/config.php11
3 files changed, 4 insertions, 18 deletions
diff --git a/apps/user_ldap/templates/settings.php b/apps/user_ldap/templates/settings.php
index 1dfae20ad23..48a9a7aec6d 100644
--- a/apps/user_ldap/templates/settings.php
+++ b/apps/user_ldap/templates/settings.php
@@ -80,10 +80,10 @@
</div>
<h3><?php p($l->t('Directory Settings'));?></h3>
<div>
- <p><label for="ldap_display_name"><?php p($l->t('User Display Name Field'));?></label><input type="text" id="ldap_display_name" name="ldap_display_name" data-default="<?php p($_['ldap_display_name_default']); ?>" title="<?php p($l->t('The LDAP attribute to use to generate the user's display name.'));?>" /></p>
+ <p><label for="ldap_display_name"><?php p($l->t('User Display Name Field'));?></label><input type="text" id="ldap_display_name" name="ldap_display_name" data-default="<?php p($_['ldap_display_name_default']); ?>" title="<?php p($l->t('The LDAP attribute to use to generate the user\'s display name.'));?>" /></p>
<p><label for="ldap_base_users"><?php p($l->t('Base User Tree'));?></label><textarea id="ldap_base_users" name="ldap_base_users" placeholder="<?php p($l->t('One User Base DN per line'));?>" data-default="<?php p($_['ldap_base_users_default']); ?>" title="<?php p($l->t('Base User Tree'));?>"></textarea></p>
<p><label for="ldap_attributes_for_user_search"><?php p($l->t('User Search Attributes'));?></label><textarea id="ldap_attributes_for_user_search" name="ldap_attributes_for_user_search" placeholder="<?php p($l->t('Optional; one attribute per line'));?>" data-default="<?php p($_['ldap_attributes_for_user_search_default']); ?>" title="<?php p($l->t('User Search Attributes'));?>"></textarea></p>
- <p><label for="ldap_group_display_name"><?php p($l->t('Group Display Name Field'));?></label><input type="text" id="ldap_group_display_name" name="ldap_group_display_name" data-default="<?php p($_['ldap_group_display_name_default']); ?>" title="<?php p($l->t('The LDAP attribute to use to generate the groups's display name.'));?>" /></p>
+ <p><label for="ldap_group_display_name"><?php p($l->t('Group Display Name Field'));?></label><input type="text" id="ldap_group_display_name" name="ldap_group_display_name" data-default="<?php p($_['ldap_group_display_name_default']); ?>" title="<?php p($l->t('The LDAP attribute to use to generate the groups\'s display name.'));?>" /></p>
<p><label for="ldap_base_groups"><?php p($l->t('Base Group Tree'));?></label><textarea id="ldap_base_groups" name="ldap_base_groups" placeholder="<?php p($l->t('One Group Base DN per line'));?>" data-default="<?php p($_['ldap_base_groups_default']); ?>" title="<?php p($l->t('Base Group Tree'));?>"></textarea></p>
<p><label for="ldap_attributes_for_group_search"><?php p($l->t('Group Search Attributes'));?></label><textarea id="ldap_attributes_for_group_search" name="ldap_attributes_for_group_search" placeholder="<?php p($l->t('Optional; one attribute per line'));?>" data-default="<?php p($_['ldap_attributes_for_group_search_default']); ?>" title="<?php p($l->t('Group Search Attributes'));?>"></textarea></p>
<p><label for="ldap_group_member_assoc_attribute"><?php p($l->t('Group-Member association'));?></label><select id="ldap_group_member_assoc_attribute" name="ldap_group_member_assoc_attribute" data-default="<?php p($_['ldap_group_member_assoc_attribute_default']); ?>" ><option value="uniqueMember"<?php if (isset($_['ldap_group_member_assoc_attribute']) && ($_['ldap_group_member_assoc_attribute'] === 'uniqueMember')) p(' selected'); ?>>uniqueMember</option><option value="memberUid"<?php if (isset($_['ldap_group_member_assoc_attribute']) && ($_['ldap_group_member_assoc_attribute'] === 'memberUid')) p(' selected'); ?>>memberUid</option><option value="member"<?php if (isset($_['ldap_group_member_assoc_attribute']) && ($_['ldap_group_member_assoc_attribute'] === 'member')) p(' selected'); ?>>member (AD)</option></select></p>
diff --git a/lib/config.php b/lib/config.php
index a38ce19c74f..9dbe2e46bd2 100644
--- a/lib/config.php
+++ b/lib/config.php
@@ -144,11 +144,8 @@ 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.');
- }
+ // 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);
}
diff --git a/tests/lib/config.php b/tests/lib/config.php
index 1a1d062d688..c67a66c832e 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');
}
}