Skip to content

Commit

Permalink
MDL-22528: fixed AJAX Course editing in Chrome and Safari.
Browse files Browse the repository at this point in the history
  • Loading branch information
rwijaya committed Oct 28, 2010
1 parent 6c4e8db commit 4756795
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 1 addition & 3 deletions course/format/topics/ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
4 changes: 1 addition & 3 deletions course/format/weeks/ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
8 changes: 8 additions & 0 deletions lib/moodlelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4756795

Please sign in to comment.