annotate MoinMoin/web/static/htdocs/applets/FCKeditor/fckeditor.pl @ 6113:a0ec7f89be84

upgrade FCKEditor to 2.6.11
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 20 Sep 2016 05:46:18 +0200
parents 9c27b8589342
children
rev   line source
5617
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
1 #####
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
2 # FCKeditor - The text editor for Internet - http://www.fckeditor.net
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
3 # Copyright (C) 2003-2010 Frederico Caldeira Knabben
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
4 #
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
5 # == BEGIN LICENSE ==
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
6 #
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
7 # Licensed under the terms of any of the following licenses at your
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
8 # choice:
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
9 #
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
10 # - GNU General Public License Version 2 or later (the "GPL")
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
11 # http://www.gnu.org/licenses/gpl.html
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
12 #
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
13 # - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
14 # http://www.gnu.org/licenses/lgpl.html
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
15 #
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
16 # - Mozilla Public License Version 1.1 or later (the "MPL")
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
17 # http://www.mozilla.org/MPL/MPL-1.1.html
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
18 #
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
19 # == END LICENSE ==
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
20 #
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
21 # This is the integration file for Perl.
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
22 #####
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
23
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
24 #my $InstanceName;
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
25 #my $BasePath;
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
26 #my $Width;
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
27 #my $Height;
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
28 #my $ToolbarSet;
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
29 #my $Value;
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
30 #my %Config;
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
31
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
32 sub FCKeditor
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
33 {
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
34
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
35 local($instanceName) = @_;
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
36 $InstanceName = $instanceName;
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
37 $BasePath = '/fckeditor/';
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
38 $Width = '100%';
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
39 $Height = '200';
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
40 $ToolbarSet = 'Default';
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
41 $Value = '';
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
42 }
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
43
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
44 sub Create
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
45 {
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
46 print &CreateHtml();
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
47 }
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
48
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
49 sub specialchar_cnv
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
50 {
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
51
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
52 local($ch) = @_;
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
53
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
54 $ch =~ s/&/&amp;/g; # &
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
55 $ch =~ s/\"/&quot;/g; #"
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
56 $ch =~ s/\'/&#39;/g; # '
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
57 $ch =~ s/</&lt;/g; # <
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
58 $ch =~ s/>/&gt;/g; # >
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
59 return($ch);
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
60 }
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
61
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
62 sub CreateHtml
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
63 {
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
64
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
65 $HtmlValue = &specialchar_cnv($Value);
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
66 $Html = '' ;
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
67 if(&IsCompatible()) {
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
68 $Link = $BasePath . "editor/fckeditor.html?InstanceName=$InstanceName";
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
69 if($ToolbarSet ne '') {
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
70 $Link .= "&amp;Toolbar=$ToolbarSet";
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
71 }
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
72 #// Render the linked hidden field.
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
73 $Html .= "<input type=\"hidden\" id=\"$InstanceName\" name=\"$InstanceName\" value=\"$HtmlValue\" style=\"display:none\" />" ;
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
74
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
75 #// Render the configurations hidden field.
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
76 $cfgstr = &GetConfigFieldString();
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
77 $wk = $InstanceName."___Config";
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
78 $Html .= "<input type=\"hidden\" id=\"$wk\" value=\"$cfgstr\" style=\"display:none\" />" ;
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
79
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
80 #// Render the editor IFRAME.
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
81 $wk = $InstanceName."___Frame";
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
82 $Html .= "<iframe id=\"$wk\" src=\"$Link\" width=\"$Width\" height=\"$Height\" frameborder=\"0\" scrolling=\"no\"></iframe>";
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
83 } else {
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
84 if($Width =~ /\%/g){
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
85 $WidthCSS = $Width;
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
86 } else {
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
87 $WidthCSS = $Width . 'px';
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
88 }
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
89 if($Height =~ /\%/g){
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
90 $HeightCSS = $Height;
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
91 } else {
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
92 $HeightCSS = $Height . 'px';
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
93 }
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
94 $Html .= "<textarea name=\"$InstanceName\" rows=\"4\" cols=\"40\" style=\"width: $WidthCSS; height: $HeightCSS\">$HtmlValue</textarea>";
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
95 }
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
96 return($Html);
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
97 }
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
98
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
99 sub IsCompatible
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
100 {
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
101
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
102 $sAgent = $ENV{'HTTP_USER_AGENT'};
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
103 if(($sAgent =~ /MSIE/i) && !($sAgent =~ /mac/i) && !($sAgent =~ /Opera/i)) {
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
104 $iVersion = substr($sAgent,index($sAgent,'MSIE') + 5,3);
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
105 return($iVersion >= 5.5) ;
6113
a0ec7f89be84 upgrade FCKEditor to 2.6.11
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5617
diff changeset
106 } elsif($sAgent =~ /Gecko\/\d+\.\d+/i) {
a0ec7f89be84 upgrade FCKEditor to 2.6.11
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5617
diff changeset
107 return true;
5617
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
108 } elsif($sAgent =~ /Gecko\//i) {
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
109 $iVersion = substr($sAgent,index($sAgent,'Gecko/') + 6,8);
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
110 return($iVersion >= 20030210) ;
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
111 } elsif($sAgent =~ /Opera\//i) {
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
112 $iVersion = substr($sAgent,index($sAgent,'Opera/') + 6,4);
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
113 return($iVersion >= 9.5) ;
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
114 } elsif($sAgent =~ /AppleWebKit\/(\d+)/i) {
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
115 return($1 >= 522) ;
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
116 } else {
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
117 return(0); # 2.0 PR fix
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
118 }
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
119 }
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
120
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
121 sub GetConfigFieldString
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
122 {
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
123 $sParams = '';
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
124 $bFirst = 0;
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
125 foreach $sKey (keys %Config) {
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
126 $sValue = $Config{$sKey};
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
127 if($bFirst == 1) {
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
128 $sParams .= '&amp;';
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
129 } else {
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
130 $bFirst = 1;
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
131 }
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
132 $k = &specialchar_cnv($sKey);
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
133 $v = &specialchar_cnv($sValue);
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
134 if($sValue eq "true") {
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
135 $sParams .= "$k=true";
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
136 } elsif($sValue eq "false") {
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
137 $sParams .= "$k=false";
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
138 } else {
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
139 $sParams .= "$k=$v";
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
140 }
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
141 }
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
142 return($sParams);
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
143 }
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
144
9c27b8589342 updated FCKeditor from 2.6.4.1 to 2.6.6
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5144
diff changeset
145 1;