From 348498c0b7c1d11904545a75dd4440b0e1f80bad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luca=20B=C3=B6sch?= Date: Thu, 27 Nov 2025 19:21:11 +0100 Subject: [PATCH] MDL-87338 core_table: avoid string concatenation. --- lang/en/moodle.php | 2 ++ lib/table/classes/flexible_table.php | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lang/en/moodle.php b/lang/en/moodle.php index 573de15ce1e..9273696af1c 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -1039,6 +1039,7 @@ $string['hidesection'] = 'Hide section {$a}'; $string['hidesettings'] = 'Hide settings'; $string['hideshowblocks'] = 'Hide or show blocks'; $string['hidepopoverwindow'] = 'Hide popover window'; +$string['hidex'] = 'Hide {$a}'; $string['highlight'] = 'Highlight'; $string['highlighted'] = 'Highlighted'; $string['highlightoff'] = 'Unhighlight'; @@ -2061,6 +2062,7 @@ $string['showreports_help'] = 'Allow students to view their own activity reports $string['showsettings'] = 'Show settings'; $string['showtheselogs'] = 'Show these logs'; $string['showthishelpinlanguage'] = 'Show this help in language: {$a}'; +$string['showx'] = 'Show {$a}'; $string['schedule'] = 'Schedule'; $string['sidepanel'] = 'Side panel'; $string['signoutofotherservices'] = 'Log out of all web apps'; diff --git a/lib/table/classes/flexible_table.php b/lib/table/classes/flexible_table.php index 19b308d5d79..10018cbb71c 100644 --- a/lib/table/classes/flexible_table.php +++ b/lib/table/classes/flexible_table.php @@ -1247,7 +1247,7 @@ class flexible_table { if (!empty($this->prefs['collapse'][$column])) { $linkattributes = [ - 'title' => get_string('show') . ' ' . strip_tags($this->headers[$index]), + 'title' => get_string('showx', 'core', strip_tags($this->headers[$index])), 'aria-expanded' => 'false', 'aria-controls' => $ariacontrols, 'data-action' => 'show', @@ -1261,7 +1261,7 @@ class flexible_table { ); } else if ($this->headers[$index] !== null) { $linkattributes = [ - 'title' => get_string('hide') . ' ' . strip_tags($this->headers[$index]), + 'title' => get_string('hidex', 'core', strip_tags($this->headers[$index])), 'aria-expanded' => 'true', 'aria-controls' => $ariacontrols, 'data-action' => 'hide',