1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/10073] Add @config_text to admin_form

PHPBB3-10073
This commit is contained in:
Joas Schilling
2014-04-13 23:46:28 +02:00
parent 35b88624f5
commit ef8d7b995e
3 changed files with 30 additions and 2 deletions

View File

@@ -17,6 +17,9 @@ namespace phpbb\message;
*/
class admin_form extends form
{
/** @var \phpbb\config\db_text */
protected $config_text;
/** @var string */
protected $subject;
/** @var string */
@@ -24,6 +27,23 @@ class admin_form extends form
/** @var string */
protected $sender_address;
/**
* Construct
*
* @param \phpbb\auth\auth $auth
* @param \phpbb\config\config $config
* @param \phpbb\config\db_text $config_text
* @param \phpbb\db\driver\driver_interface $db
* @param \phpbb\user $user
* @param string $phpbb_root_path
* @param string $phpEx
*/
public function __construct(\phpbb\auth\auth $auth, \phpbb\config\config $config, \phpbb\config\db_text $config_text, \phpbb\db\driver\driver_interface $db, \phpbb\user $user, $phpbb_root_path, $phpEx)
{
parent::__construct($auth, $config, $db, $user, $phpbb_root_path, $phpEx);
$this->config_text = $config_text;
}
/**
* {inheritDoc}
*/
@@ -116,12 +136,15 @@ class admin_form extends form
*/
public function render(\phpbb\template\template $template)
{
// @todo Add option to fill the db with it and add migration
$l_admin_info = '';//$this->config_text['contact_admin_info'];
$template->assign_vars(array(
'S_CONTACT_ADMIN' => true,
'S_CONTACT_FORM' => $this->config['contact_admin_form_enable'],
'S_IS_REGISTERED' => $this->user->data['is_registered'],
'CONTACT_INFO' => '', /** TODO: $this->config['contact_admin_info'] */
'CONTACT_INFO' => $l_admin_info,
'MESSAGE' => $this->body,
'SUBJECT' => $this->subject,
'NAME' => $this->sender_name,