From d9d068699c7bc9d7098f36d6b09d6bc6c0fb7e33 Mon Sep 17 00:00:00 2001 From: Huong Nguyen Date: Mon, 7 Feb 2022 09:45:24 +0700 Subject: [PATCH] MDL-73784 usertours: Deprecation of the step::get_string_from_input Modified code to just simply call helper::get_string_from_input() rather than duplicating the code --- admin/tool/usertours/classes/step.php | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/admin/tool/usertours/classes/step.php b/admin/tool/usertours/classes/step.php index 0fe9b6999a3..3bfa5f2b16e 100644 --- a/admin/tool/usertours/classes/step.php +++ b/admin/tool/usertours/classes/step.php @@ -803,19 +803,7 @@ class step { public static function get_string_from_input($string) { debugging('Use of ' . __FUNCTION__ . '() have been deprecated, please update your code to use helper::get_string_from_input()', DEBUG_DEVELOPER); - $string = trim($string); - - if (preg_match('|^([a-zA-Z][a-zA-Z0-9\.:/_-]*),([a-zA-Z][a-zA-Z0-9\.:/_-]*)$|', $string, $matches)) { - if ($matches[2] === 'moodle') { - $matches[2] = 'core'; - } - - if (get_string_manager()->string_exists($matches[1], $matches[2])) { - $string = get_string($matches[1], $matches[2]); - } - } - - return $string; + return helper::get_string_from_input($string); } /**