MDL-60437 blocks: HTML block title multilang

This commit is contained in:
Luca Bösch 2017-10-10 01:04:39 +02:00
parent 159b4e5d8c
commit 6586118e0f

View file

@ -37,7 +37,11 @@ class block_html extends block_base {
} }
function specialization() { function specialization() {
$this->title = isset($this->config->title) ? format_string($this->config->title) : format_string(get_string('newhtmlblock', 'block_html')); if (isset($this->config->title)) {
$this->title = $this->title = format_string($this->config->title, true, ['context' => $this->context]);
} else {
$this->title = get_string('newhtmlblock', 'block_html');
}
} }
function instance_allow_multiple() { function instance_allow_multiple() {