diff options
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/acp/acp_board.php | 4 | ||||
-rw-r--r-- | phpBB/includes/auth/provider/base.php | 2 | ||||
-rw-r--r-- | phpBB/includes/auth/provider/interface.php | 10 | ||||
-rw-r--r-- | phpBB/includes/auth/provider/ldap.php | 42 |
4 files changed, 8 insertions, 50 deletions
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index 4c5f951bdc..f01963c2ce 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -528,10 +528,10 @@ class acp_board $old_auth_config = array(); foreach ($auth_providers as $provider) { - if ($fields = $provider->acp($this->new_config)) + if ($fields = $provider->acp()) { // Check if we need to create config fields for this plugin and save config when submit was pressed - foreach ($fields['config'] as $field) + foreach ($fields as $field) { if (!isset($config[$field])) { diff --git a/phpBB/includes/auth/provider/base.php b/phpBB/includes/auth/provider/base.php index d1de9647df..7eaf8bb2d3 100644 --- a/phpBB/includes/auth/provider/base.php +++ b/phpBB/includes/auth/provider/base.php @@ -41,7 +41,7 @@ abstract class phpbb_auth_provider_base implements phpbb_auth_provider_interface /** * {@inheritdoc} */ - public function acp($new) + public function acp() { return; } diff --git a/phpBB/includes/auth/provider/interface.php b/phpBB/includes/auth/provider/interface.php index fe2415ee25..40c48026cf 100644 --- a/phpBB/includes/auth/provider/interface.php +++ b/phpBB/includes/auth/provider/interface.php @@ -60,16 +60,10 @@ interface phpbb_auth_provider_interface * This function is used to output any required fields in the authentication * admin panel. It also defines any required configuration table fields. * - * @param array $new Contains the new configuration values that have - * been set in acp_board. * @return array|null Returns null if not implemented or an array of the - * form: - * array( - * 'tpl' => string - * 'config' => array - * ) + * configuration fields of the provider. */ - public function acp($new); + public function acp(); /** * This function updates the template with variables related to the acp diff --git a/phpBB/includes/auth/provider/ldap.php b/phpBB/includes/auth/provider/ldap.php index 0164a60f2e..288fb617f5 100644 --- a/phpBB/includes/auth/provider/ldap.php +++ b/phpBB/includes/auth/provider/ldap.php @@ -288,48 +288,12 @@ class phpbb_auth_provider_ldap extends phpbb_auth_provider_base /** * {@inheritdoc} */ - public function acp($new) - { - $tpl = ' - - <dl> - <dt><label for="ldap_server">' . $this->user->lang['LDAP_SERVER'] . $this->user->lang['COLON'] . '</label><br /><span>' . $this->user->lang['LDAP_SERVER_EXPLAIN'] . '</span></dt> - <dd><input type="text" id="ldap_server" size="40" name="config[ldap_server]" value="' . $new['ldap_server'] . '" /></dd> - </dl> - <dl> - <dt><label for="ldap_port">' . $this->user->lang['LDAP_PORT'] . $this->user->lang['COLON'] . '</label><br /><span>' . $this->user->lang['LDAP_PORT_EXPLAIN'] . '</span></dt> - <dd><input type="text" id="ldap_port" size="40" name="config[ldap_port]" value="' . $new['ldap_port'] . '" /></dd> - </dl> - <dl> - <dt><label for="ldap_dn">' . $this->user->lang['LDAP_DN'] . $this->user->lang['COLON'] . '</label><br /><span>' . $this->user->lang['LDAP_DN_EXPLAIN'] . '</span></dt> - <dd><input type="text" id="ldap_dn" size="40" name="config[ldap_base_dn]" value="' . $new['ldap_base_dn'] . '" /></dd> - </dl> - <dl> - <dt><label for="ldap_uid">' . $this->user->lang['LDAP_UID'] . $this->user->lang['COLON'] . '</label><br /><span>' . $this->user->lang['LDAP_UID_EXPLAIN'] . '</span></dt> - <dd><input type="text" id="ldap_uid" size="40" name="config[ldap_uid]" value="' . $new['ldap_uid'] . '" /></dd> - </dl> - <dl> - <dt><label for="ldap_user_filter">' . $this->user->lang['LDAP_USER_FILTER'] . $this->user->lang['COLON'] . '</label><br /><span>' . $this->user->lang['LDAP_USER_FILTER_EXPLAIN'] . '</span></dt> - <dd><input type="text" id="ldap_user_filter" size="40" name="config[ldap_user_filter]" value="' . $new['ldap_user_filter'] . '" /></dd> - </dl> - <dl> - <dt><label for="ldap_email">' . $this->user->lang['LDAP_EMAIL'] . $this->user->lang['COLON'] . '</label><br /><span>' . $this->user->lang['LDAP_EMAIL_EXPLAIN'] . '</span></dt> - <dd><input type="email" id="ldap_email" size="40" name="config[ldap_email]" value="' . $new['ldap_email'] . '" /></dd> - </dl> - <dl> - <dt><label for="ldap_user">' . $this->user->lang['LDAP_USER'] . $this->user->lang['COLON'] . '</label><br /><span>' . $this->user->lang['LDAP_USER_EXPLAIN'] . '</span></dt> - <dd><input type="text" id="ldap_user" size="40" name="config[ldap_user]" value="' . $new['ldap_user'] . '" /></dd> - </dl> - <dl> - <dt><label for="ldap_password">' . $this->user->lang['LDAP_PASSWORD'] . $this->user->lang['COLON'] . '</label><br /><span>' . $this->user->lang['LDAP_PASSWORD_EXPLAIN'] . '</span></dt> - <dd><input type="password" id="ldap_password" size="40" name="config[ldap_password]" value="' . $new['ldap_password'] . '" autocomplete="off" /></dd> - </dl> - '; + public function acp() + { // These are fields required in the config table return array( - 'tpl' => $tpl, - 'config' => array('ldap_server', 'ldap_port', 'ldap_base_dn', 'ldap_uid', 'ldap_user_filter', 'ldap_email', 'ldap_user', 'ldap_password') + 'ldap_server', 'ldap_port', 'ldap_base_dn', 'ldap_uid', 'ldap_user_filter', 'ldap_email', 'ldap_user', 'ldap_password', ); } |