From 887afdefe65e382c77524a5dfed86ce5e0aca3f0 Mon Sep 17 00:00:00 2001 From: bdaloukas Date: Sat, 24 Aug 2013 09:44:30 +0300 Subject: [PATCH] Fix: Backward compatibility with Moodle 2.0 and textlib --- locallib.php | 6 +++--- version.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/locallib.php b/locallib.php index 5885709..4b5a9b0 100755 --- a/locallib.php +++ b/locallib.php @@ -1961,13 +1961,13 @@ function game_substr() if( game_get_moodle_version() < '02.05') return textlib_get_instance()->substr( $a[ 0], $a[ 1], $a[ 2]); else - return textlib::ubstr( $a[ 0], $a[ 1], $a[ 2]); + return textlib::substr( $a[ 0], $a[ 1], $a[ 2]); }else if( $num == 2) { if( game_get_moodle_version() < '02.05') return textlib_get_instance()->substr( $a[ 0], $a[ 1]); else - return textlib::ubstr( $a[ 0], $a[ 1]); + return textlib::substr( $a[ 0], $a[ 1]); }else die( 'Substr requires 2 or 3 parameters'); } @@ -1985,5 +1985,5 @@ function game_strpos( $haystack, $needle, $offset = 0) if( game_get_moodle_version() < '02.05') return textlib_get_instance()->strpos( $haystack, $needle, $offset); else - return textlib::strtoupper( $haystack, $needle, $offset); + return textlib::strpos( $haystack, $needle, $offset); } diff --git a/version.php b/version.php index 5e2bf28..7d874bb 100755 --- a/version.php +++ b/version.php @@ -11,7 +11,7 @@ defined('MOODLE_INTERNAL') || die(); $module->component = 'mod_game'; // Full name of the plugin (used for diagnostics) -$module->version = 2013082401; // The current module version (Date: YYYYMMDDXX) +$module->version = 2013082402; // The current module version (Date: YYYYMMDDXX) $module->requires = 2010112400; // Requires Moodle 2.0 $module->cron = 0; // Period for cron to check this module (secs) -$module->release = '3.8.24'; +$module->release = '3.8.24.2';