From b6157b7a4f33bb14015e15d99a8c39ece6bc505b Mon Sep 17 00:00:00 2001 From: Michael Milette Date: Sat, 3 Dec 2022 13:05:55 -0500 Subject: [PATCH] No longer gets string from report_customsql plugin This fixes an issue where block_configurable_report would report an "Invalid get_string() identifier: 'nosemicolon'" when saving an SQL query. This is only visible when debug is set to Developer mode and only happens if the report_customsql plugin is not also installed. --- components/customsql/form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/customsql/form.php b/components/customsql/form.php index 349ceefd..8ca44159 100644 --- a/components/customsql/form.php +++ b/components/customsql/form.php @@ -102,7 +102,7 @@ public function validation_high_security($data, $files) { } else if (strpos($sql, ';') !== false) { // Do not allow any semicolons. - $errors['querysql'] = get_string('nosemicolon', 'report_customsql'); + $errors['querysql'] = get_string('nosemicolon', 'block_configurable_reports'); } else if ($CFG->prefix != '' && preg_match('/\b' . $CFG->prefix . '\w+/i', $sql)) { // Make sure prefix is prefix_, not explicit.