From 60100b62f35cde7f5beafefbe9ff1a10ee81faa4 Mon Sep 17 00:00:00 2001 From: Joseph Warner Date: Mon, 8 Jul 2013 14:02:53 -0400 Subject: [ticket/11626] Change interface to match functionality Changes the interface so that it matches the new functionality of phpbb_provider_auth_interface::acp(). PHPBB3-11626 --- phpBB/includes/acp/acp_board.php | 4 +-- phpBB/includes/auth/provider/base.php | 2 +- phpBB/includes/auth/provider/interface.php | 10 ++----- phpBB/includes/auth/provider/ldap.php | 42 +++--------------------------- 4 files changed, 8 insertions(+), 50 deletions(-) (limited to 'phpBB') 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 = ' - -
-

' . $this->user->lang['LDAP_SERVER_EXPLAIN'] . '
-
-
-
-

' . $this->user->lang['LDAP_PORT_EXPLAIN'] . '
-
-
-
-

' . $this->user->lang['LDAP_DN_EXPLAIN'] . '
-
-
-
-

' . $this->user->lang['LDAP_UID_EXPLAIN'] . '
-
-
-
-

' . $this->user->lang['LDAP_USER_FILTER_EXPLAIN'] . '
-
-
-
-

' . $this->user->lang['LDAP_EMAIL_EXPLAIN'] . '
-
-
-
-

' . $this->user->lang['LDAP_USER_EXPLAIN'] . '
-
-
-
-

' . $this->user->lang['LDAP_PASSWORD_EXPLAIN'] . '
-
-
- '; + 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', ); } -- cgit v1.2.1