mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
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
This commit is contained in:
parent
21caea1f9a
commit
d9d068699c
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user