summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fckeditor.module24
1 files changed, 16 insertions, 8 deletions
diff --git a/fckeditor.module b/fckeditor.module
index ee3d792..b8b695d 100644
--- a/fckeditor.module
+++ b/fckeditor.module
@@ -2109,18 +2109,26 @@ function fckeditor_idsearch($search, $array) {
* TRUE if the browser is reasonably capable
*/
function fckeditor_is_compatible_client() {
-
- if (!function_exists('version_compare') || version_compare(phpversion(), '5', '<'))
- $fckeditor_main_file = drupal_get_path('module', 'fckeditor') .'/fckeditor/fckeditor_php4.php';
- else
- $fckeditor_main_file = drupal_get_path('module', 'fckeditor') .'/fckeditor/fckeditor_php5.php';
-
- if (file_exists($fckeditor_main_file)) {
- include_once $fckeditor_main_file;
+ $fckeditor_main_file = drupal_get_path('module', 'fckeditor') .'/fckeditor/fckeditor.php';
+ if (!function_exists('version_compare') || version_compare(phpversion(), '5', '<')) {
+ $fckeditor_target_file = drupal_get_path('module', 'fckeditor') .'/fckeditor/fckeditor_php4.php';
+ }
+ else {
+ $fckeditor_target_file = drupal_get_path('module', 'fckeditor') .'/fckeditor/fckeditor_php5.php';
+ }
+
+ if (file_exists($fckeditor_target_file)) {
+ include_once $fckeditor_target_file;
+ //FCKeditor 2.6.1+
if (function_exists('FCKeditor_IsCompatibleBrowser')) {
return FCKeditor_IsCompatibleBrowser();
}
else if (class_exists('FCKeditor')) {
+ //FCKeditor 2.5.1 - 2.6 with definition of FCKeditor_IsCompatibleBrowser() in fckeditor.php
+ if (filesize($fckeditor_main_file) > 1500) {
+ include_once $fckeditor_main_file;
+ }
+ //FCKeditor 2.5 and earlier
$fck = new FCKeditor('fake');
return $fck->IsCompatible();
}