From 70de3574bb9f43cd1b12fcabf49fc06e81983a90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luca=20B=C3=B6sch?= Date: Fri, 13 Oct 2017 16:17:08 +0200 Subject: [PATCH] MDL-60437 blocks: HTML block title multilang --- blocks/html/block_html.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/blocks/html/block_html.php b/blocks/html/block_html.php index 21833704172..505ff270311 100644 --- a/blocks/html/block_html.php +++ b/blocks/html/block_html.php @@ -37,7 +37,11 @@ class block_html extends block_base { } 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() {