diff options
Diffstat (limited to 'phpBB')
| -rw-r--r-- | phpBB/config/auth_providers.yml | 1 | ||||
| -rw-r--r-- | phpBB/includes/acp/acp_board.php | 3 | ||||
| -rw-r--r-- | phpBB/includes/auth/provider/interface.php | 11 | ||||
| -rw-r--r-- | phpBB/includes/auth/provider/ldap.php | 31 | 
4 files changed, 26 insertions, 20 deletions
diff --git a/phpBB/config/auth_providers.yml b/phpBB/config/auth_providers.yml index 3136e60584..bcc448e4d7 100644 --- a/phpBB/config/auth_providers.yml +++ b/phpBB/config/auth_providers.yml @@ -33,6 +33,5 @@ services:              - @dbal.conn              - @config              - @user -            - @template          tags:              - { name: auth.provider } diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index 9285608ae2..ad95ad3da3 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -658,8 +658,9 @@ class acp_board  				$auth_tpl = $provider->get_acp_template($this->new_config);  				if ($auth_tpl)  				{ +					$template->assign_vars($auth_tpl['TEMPLATE_VARS']);  					$template->assign_block_vars('auth_tpl', array( -						'TEMPLATE_FILE'	=> $auth_tpl, +						'TEMPLATE_FILE'	=> $auth_tpl['TEMPLATE_FILE'],  					));  				}  			} diff --git a/phpBB/includes/auth/provider/interface.php b/phpBB/includes/auth/provider/interface.php index 40c48026cf..47043bc107 100644 --- a/phpBB/includes/auth/provider/interface.php +++ b/phpBB/includes/auth/provider/interface.php @@ -72,9 +72,14 @@ interface phpbb_auth_provider_interface  	 * provider.  	 * @param	array	$new_config Contains the new configuration values that  	 *								have been set in acp_board. -	 * @return	string|null		Returns null if not implemented or a string -	 *							containing the name of the acp tempalte file for -	 *							the authentication provider. +	 * @return	array|null		Returns null if not implemented or an array with +	 *							the template file name and an array of the vars +	 *							that the template needs that must conform to the +	 *							following example: +	 *							array( +	 *								'TEMPLATE_FILE'	=> string, +	 *								'TEMPLATE_VARS'	=> array(...), +	 *							)  	 */  	public function get_acp_template($new_config); diff --git a/phpBB/includes/auth/provider/ldap.php b/phpBB/includes/auth/provider/ldap.php index 288fb617f5..56f9c23d55 100644 --- a/phpBB/includes/auth/provider/ldap.php +++ b/phpBB/includes/auth/provider/ldap.php @@ -30,14 +30,12 @@ class phpbb_auth_provider_ldap extends phpbb_auth_provider_base  	 * @param 	phpbb_db_driver	$db  	 * @param 	phpbb_config	$config  	 * @param 	phpbb_user		$user -	 * @param 	phpbb_template 	$template  	 */ -	public function __construct(phpbb_db_driver $db, phpbb_config $config, phpbb_user $user, phpbb_template $template) +	public function __construct(phpbb_db_driver $db, phpbb_config $config, phpbb_user $user)  	{  		$this->db = $db;  		$this->config = $config;  		$this->user = $user; -		$this->template = $template;  	}  	/** @@ -302,18 +300,21 @@ class phpbb_auth_provider_ldap extends phpbb_auth_provider_base  	 */  	public function get_acp_template($new_config)  	{ -		$this->template->assign_vars(array( -			'AUTH_LDAP_DN'			=> $new_config['ldap_base_dn'], -			'AUTH_LDAP_EMAIL'		=> $new_config['ldap_email'], -			'AUTH_LDAP_PASSORD'		=> $new_config['ldap_password'], -			'AUTH_LDAP_PORT'		=> $new_config['ldap_port'], -			'AUTH_LDAP_SERVER'		=> $new_config['ldap_server'], -			'AUTH_LDAP_UID'			=> $new_config['ldap_uid'], -			'AUTH_LDAP_USER'		=> $new_config['ldap_user'], -			'AUTH_LDAP_USER_FILTER'	=> $new_config['ldap_user_filter'], -		)); - -		return 'auth_provider_ldap.html'; +		$this->template->assign_vars(); + +		return array( +			'TEMPLATE_FILE'	=> 'auth_provider_ldap.html', +			'TEMPLATE_VARS'	=> array( +				'AUTH_LDAP_DN'			=> $new_config['ldap_base_dn'], +				'AUTH_LDAP_EMAIL'		=> $new_config['ldap_email'], +				'AUTH_LDAP_PASSORD'		=> $new_config['ldap_password'], +				'AUTH_LDAP_PORT'		=> $new_config['ldap_port'], +				'AUTH_LDAP_SERVER'		=> $new_config['ldap_server'], +				'AUTH_LDAP_UID'			=> $new_config['ldap_uid'], +				'AUTH_LDAP_USER'		=> $new_config['ldap_user'], +				'AUTH_LDAP_USER_FILTER'	=> $new_config['ldap_user_filter'], +			), +		);  	}  	/**  | 
