mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/14044] Solve missing email template error
PHPBB3-14044
This commit is contained in:
parent
33db26d0cf
commit
3ac10ef544
2 changed files with 17 additions and 1 deletions
|
@ -40,6 +40,11 @@ class notify_user extends \phpbb\install\task_base
|
||||||
*/
|
*/
|
||||||
protected $config;
|
protected $config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var \phpbb\language\language
|
||||||
|
*/
|
||||||
|
protected $language;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \phpbb\log\log_interface
|
* @var \phpbb\log\log_interface
|
||||||
*/
|
*/
|
||||||
|
@ -75,6 +80,7 @@ class notify_user extends \phpbb\install\task_base
|
||||||
$this->iohandler = $iohandler;
|
$this->iohandler = $iohandler;
|
||||||
|
|
||||||
$this->auth = $container->get('auth');
|
$this->auth = $container->get('auth');
|
||||||
|
$this->language = $container->get('language');
|
||||||
$this->log = $container->get('log');
|
$this->log = $container->get('log');
|
||||||
$this->user = $container->get('user');
|
$this->user = $container->get('user');
|
||||||
$this->phpbb_root_path = $phpbb_root_path;
|
$this->phpbb_root_path = $phpbb_root_path;
|
||||||
|
@ -103,7 +109,7 @@ class notify_user extends \phpbb\install\task_base
|
||||||
include ($this->phpbb_root_path . 'includes/functions_messenger.' . $this->php_ext);
|
include ($this->phpbb_root_path . 'includes/functions_messenger.' . $this->php_ext);
|
||||||
|
|
||||||
$messenger = new \messenger(false);
|
$messenger = new \messenger(false);
|
||||||
$messenger->template('installed', $this->install_config->get('language'));
|
$messenger->template('installed', $this->language->get_used_language());
|
||||||
$messenger->to($this->config['board_email'], $this->install_config->get('admin_name'));
|
$messenger->to($this->config['board_email'], $this->install_config->get('admin_name'));
|
||||||
$messenger->anti_abuse_headers($this->config, $this->user);
|
$messenger->anti_abuse_headers($this->config, $this->user);
|
||||||
$messenger->assign_vars(array(
|
$messenger->assign_vars(array(
|
||||||
|
|
|
@ -548,6 +548,16 @@ class language
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the ISO code of the used language
|
||||||
|
*
|
||||||
|
* @return string The ISO code of the currently used language
|
||||||
|
*/
|
||||||
|
public function get_used_language()
|
||||||
|
{
|
||||||
|
return $this->language_fallback[0];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns language fallback data
|
* Returns language fallback data
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue