Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-22528: fixed AJAX Course editing in Chrome and Safari.

  • Loading branch information...
commit 4756795bf7bdd8b66436cc8026b4b0dafa55fe95 1 parent 6c4e8db
Rossiani Wijaya authored
View
4 course/format/topics/ajax.php
@@ -5,6 +5,4 @@
$CFG->ajaxcapable = true;
-$CFG->ajaxtestedbrowsers = array('MSIE' => 6.0, 'Gecko' => 20061111);
-
-
+$CFG->ajaxtestedbrowsers = array('MSIE' => 6.0, 'Gecko' => 20061111, 'Safari'=>531, 'Chrome'=>6.0);
View
4 course/format/weeks/ajax.php
@@ -5,6 +5,4 @@
$CFG->ajaxcapable = true;
-$CFG->ajaxtestedbrowsers = array('MSIE' => 6.0, 'Gecko' => 20061111);
-
-
+$CFG->ajaxtestedbrowsers = array('MSIE' => 6.0, 'Gecko' => 20061111, 'Safari'=>531, 'Chrome'=>6.0);
View
8 lib/moodlelib.php
@@ -7565,6 +7565,14 @@ function check_browser_version($brand='MSIE', $version=5.5) {
break;
+ case 'Chrome':
+ if (preg_match("/Chrome\/(.*)[ ]+/i", $agent, $match)) {
+ if (version_compare($match[1], $version) >= 0) {
+ return true;
+ }
+ }
+ break;
+
case 'Safari iOS': /// Safari on iPhone and iPad
if (strpos($agent, 'iPhone')) {
return true;
Please sign in to comment.
Something went wrong with that request. Please try again.