From 8c222e17683f9cd804b64f80c7dc211fb996929f Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Sun, 20 May 2012 09:47:18 +0700 Subject: [PATCH] MDL-33084 grade: made localize() and unlocalize() in lib/mathslib.php static as they are used as if they were static --- lib/mathslib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/mathslib.php b/lib/mathslib.php index 82bf05369be..1640f14385b 100644 --- a/lib/mathslib.php +++ b/lib/mathslib.php @@ -115,7 +115,7 @@ class calc_formula { * @param string $formula * @return string localised formula */ - function localize($formula) { + public static function localize($formula) { $formula = str_replace('.', '$', $formula); // temp placeholder $formula = str_replace(',', get_string('listsep', 'langconfig'), $formula); $formula = str_replace('$', get_string('decsep', 'langconfig'), $formula); @@ -127,7 +127,7 @@ class calc_formula { * @param string $formula localised formula * @return string */ - function unlocalize($formula) { + public static function unlocalize($formula) { $formula = str_replace(get_string('decsep', 'langconfig'), '$', $formula); $formula = str_replace(get_string('listsep', 'langconfig'), ',', $formula); $formula = str_replace('$', '.', $formula); // temp placeholder