Permalink
Browse files

MDL-33084 grade: made localize() and unlocalize() in lib/mathslib.php…

… static as they are used as if they were static
  • Loading branch information...
1 parent 4f7f2a8 commit 8c222e17683f9cd804b64f80c7dc211fb996929f @andyjdavis andyjdavis committed May 20, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/mathslib.php
View
@@ -115,7 +115,7 @@ function get_error() {
* @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 @@ function localize($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

0 comments on commit 8c222e1

Please sign in to comment.