Permalink
Browse files

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

  • Loading branch information...
1 parent 6c4e8db commit 4756795bf7bdd8b66436cc8026b4b0dafa55fe95 Rossiani Wijaya committed Oct 28, 2010
Showing with 10 additions and 6 deletions.
  1. +1 −3 course/format/topics/ajax.php
  2. +1 −3 course/format/weeks/ajax.php
  3. +8 −0 lib/moodlelib.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);
@@ -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
@@ -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;

0 comments on commit 4756795

Please sign in to comment.