MDL-22260 Added server-side detection of iPhone/iPad and don't serve TinyMCE at all

This commit is contained in:
Martin Dougiamas
2010-06-23 09:17:55 +00:00
parent 8093188f51
commit c55ff1834d
2 changed files with 17 additions and 6 deletions
+3 -1
View File
@@ -30,13 +30,15 @@ class tinymce_texteditor extends texteditor {
return true;
} else if (check_browser_version('Gecko', 20030516)) {
return true;
} else if (check_browser_version('Safari iOS')) {
return false;
} else if (check_browser_version('Safari', 3)) {
return true;
} else if (check_browser_version('Opera', 9)) {
return true;
}
return true;
return false;
}
public function get_supported_formats() {
+14 -5
View File
@@ -7264,12 +7264,12 @@ function check_php_version($version='5.2.4') {
case 'Camino': /// Mozilla Firefox browsers
if (preg_match("/Camino\/([0-9\.]+)/i", $agent, $match)) {
if (version_compare($match[1], $version) >= 0) {
return true;
}
if (preg_match("/Camino\/([0-9\.]+)/i", $agent, $match)) {
if (version_compare($match[1], $version) >= 0) {
return true;
}
break;
}
break;
case 'Firefox': /// Mozilla Firefox browsers
@@ -7344,6 +7344,15 @@ function check_php_version($version='5.2.4') {
break;
case 'Safari iOS': /// Safari on iPhone and iPad
if (strpos($agent, 'iPhone')) {
return true;
}
if (strpos($agent, 'iPad')) {
return true;
}
break;
}
return false;