From 45970804e69e3d087fe19ad9cefaff0ef44be795 Mon Sep 17 00:00:00 2001 From: Klap-in Date: Sat, 16 Feb 2013 22:53:38 +0100 Subject: Complete metadata and defaults of auth plugin configs --- lib/plugins/authad/conf/default.php | 14 +++++++++++++ lib/plugins/authldap/conf/default.php | 20 ++++++++++++++---- lib/plugins/authldap/conf/metadata.php | 1 + lib/plugins/authldap/lang/en/settings.php | 5 ++++- lib/plugins/authmysql/conf/default.php | 33 +++++++++++++++++++++++++++++- lib/plugins/authmysql/conf/metadata.php | 1 + lib/plugins/authmysql/lang/en/settings.php | 1 + lib/plugins/authpgsql/conf/default.php | 32 ++++++++++++++++++++++++++++- 8 files changed, 100 insertions(+), 7 deletions(-) create mode 100644 lib/plugins/authad/conf/default.php (limited to 'lib') diff --git a/lib/plugins/authad/conf/default.php b/lib/plugins/authad/conf/default.php new file mode 100644 index 000000000..05d6c328e --- /dev/null +++ b/lib/plugins/authad/conf/default.php @@ -0,0 +1,14 @@ + array('sub','one','base')); $meta['groupscope'] = array('multichoice','_choices' => array('sub','one','base')); +$meta['groupkey'] = array('string'); $meta['debug'] = array('onoff'); \ No newline at end of file diff --git a/lib/plugins/authldap/lang/en/settings.php b/lib/plugins/authldap/lang/en/settings.php index e3f4bab31..f20b7d2a3 100644 --- a/lib/plugins/authldap/lang/en/settings.php +++ b/lib/plugins/authldap/lang/en/settings.php @@ -12,4 +12,7 @@ $lang['binddn'] = 'DN of an ptional bind user if anonymous bind is not suff $lang['bindpw'] = 'Password of above user'; $lang['userscope'] = 'Limit search scope for user search'; $lang['groupscope'] = 'Limit search scope for group search'; -$lang['debug'] = 'Display additional debug information on errors'; \ No newline at end of file +$lang['groupkey'] = 'Group member ship from any user attribute (instead of standard AD groups) e.g. group from department or telephone number'; +$lang['debug'] = 'Display additional debug information on errors'; + + diff --git a/lib/plugins/authmysql/conf/default.php b/lib/plugins/authmysql/conf/default.php index ea2cdad72..4add3f57c 100644 --- a/lib/plugins/authmysql/conf/default.php +++ b/lib/plugins/authmysql/conf/default.php @@ -1,3 +1,34 @@ array(0,1,2)); $meta['forwardClearPass'] = array('onoff'); $meta['TablesToLock'] = array('array'); diff --git a/lib/plugins/authmysql/lang/en/settings.php b/lib/plugins/authmysql/lang/en/settings.php index dcdbbb16b..7b409ee1c 100644 --- a/lib/plugins/authmysql/lang/en/settings.php +++ b/lib/plugins/authmysql/lang/en/settings.php @@ -4,6 +4,7 @@ $lang['server'] = 'Your MySQL server'; $lang['user'] = 'MySQL user name'; $lang['password'] = 'Password for above user'; $lang['database'] = 'Database to use'; +$lang['charset'] = 'Character set used in database'; $lang['debug'] = 'Display additional debug information'; $lang['forwardClearPass'] = 'Pass user passwords as cleartext to the SQL statements below, instead of using the passcrypt option'; $lang['TablesToLock'] = 'Comma separated list of tables that should be locked on write operations'; diff --git a/lib/plugins/authpgsql/conf/default.php b/lib/plugins/authpgsql/conf/default.php index 401da80b7..7f78280f9 100644 --- a/lib/plugins/authpgsql/conf/default.php +++ b/lib/plugins/authpgsql/conf/default.php @@ -1,3 +1,33 @@ Date: Sat, 16 Feb 2013 23:03:01 +0100 Subject: separate default settings from non-existing settings setting type read from metadata eqaul to empty string is default 'setting' class (a textarea), everything else should be a existing class otherwise 'setting_no_class' is loaded --- lib/plugins/config/settings/config.class.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php index 16be9a689..a3cfae9f8 100644 --- a/lib/plugins/config/settings/config.class.php +++ b/lib/plugins/config/settings/config.class.php @@ -70,9 +70,14 @@ if (!class_exists('configuration')) { foreach ($keys as $key) { if (isset($this->_metadata[$key])) { $class = $this->_metadata[$key][0]; - $class = ($class && class_exists('setting_'.$class)) ? 'setting_'.$class : 'setting'; - if ($class=='setting') { - $this->setting[] = new setting_no_class($key,$param); + + if($class && class_exists('setting_'.$class)){ + $class = 'setting_'.$class; + } else { + if($class != '') { + $this->setting[] = new setting_no_class($key,$param); + } + $class = 'setting'; } $param = $this->_metadata[$key]; -- cgit v1.2.3 From 5ebd6fd9156e1bc9b63132f3ec5989856e5a45a1 Mon Sep 17 00:00:00 2001 From: Klap-in Date: Sat, 16 Feb 2013 23:55:52 +0100 Subject: litte fixes --- lib/plugins/authldap/lang/en/settings.php | 2 -- lib/plugins/authmysql/conf/default.php | 2 +- lib/plugins/authmysql/lang/en/settings.php | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/plugins/authldap/lang/en/settings.php b/lib/plugins/authldap/lang/en/settings.php index bca666e9f..0bb397be5 100644 --- a/lib/plugins/authldap/lang/en/settings.php +++ b/lib/plugins/authldap/lang/en/settings.php @@ -14,5 +14,3 @@ $lang['userscope'] = 'Limit search scope for user search'; $lang['groupscope'] = 'Limit search scope for group search'; $lang['groupkey'] = 'Group member ship from any user attribute (instead of standard AD groups) e.g. group from department or telephone number'; $lang['debug'] = 'Display additional debug information on errors'; - - diff --git a/lib/plugins/authmysql/conf/default.php b/lib/plugins/authmysql/conf/default.php index 4add3f57c..647f3d96c 100644 --- a/lib/plugins/authmysql/conf/default.php +++ b/lib/plugins/authmysql/conf/default.php @@ -2,7 +2,7 @@ $conf['charset'] = 'utf8'; $conf['server'] = ''; -$conf['user'] =''; +$conf['user'] = ''; $conf['password'] = ''; $conf['database'] = ''; $conf['debug'] = 0; diff --git a/lib/plugins/authmysql/lang/en/settings.php b/lib/plugins/authmysql/lang/en/settings.php index 7b409ee1c..77e4806b9 100644 --- a/lib/plugins/authmysql/lang/en/settings.php +++ b/lib/plugins/authmysql/lang/en/settings.php @@ -21,7 +21,7 @@ $lang['addUser'] = 'SQL statement to add a new user'; $lang['addGroup'] = 'SQL statement to add a new group'; $lang['addUserGroup'] = 'SQL statment to add a user to an existing group'; $lang['delGroup'] = 'SQL statement to remove a group'; -$lang['getUserID'] = 'SQL statement to get the primary ey of a user'; +$lang['getUserID'] = 'SQL statement to get the primary key of a user'; $lang['delUser'] = 'SQL statement to delete a user'; $lang['delUserRefs'] = 'SQL statement to remove a user from all groups'; $lang['updateUser'] = 'SQL statement to update a user profile'; -- cgit v1.2.3