~mortenoh/+junk/dhis2-detailed-import-export

« back to all changes in this revision

Viewing changes to dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/FCK/editor/filemanager/browser/default/connectors/cfm/config.cfm

  • Committer: larshelge at gmail
  • Date: 2009-03-03 16:46:36 UTC
  • Revision ID: larshelge@gmail.com-20090303164636-2sjlrquo7ib1gf7r
Initial check-in

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<cfsetting enablecfoutputonly="Yes">
 
2
<!---
 
3
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
 
4
 * Copyright (C) 2003-2007 Frederico Caldeira Knabben
 
5
 *
 
6
 * == BEGIN LICENSE ==
 
7
 *
 
8
 * Licensed under the terms of any of the following licenses at your
 
9
 * choice:
 
10
 *
 
11
 *  - GNU General Public License Version 2 or later (the "GPL")
 
12
 *    http://www.gnu.org/licenses/gpl.html
 
13
 *
 
14
 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
 
15
 *    http://www.gnu.org/licenses/lgpl.html
 
16
 *
 
17
 *  - Mozilla Public License Version 1.1 or later (the "MPL")
 
18
 *    http://www.mozilla.org/MPL/MPL-1.1.html
 
19
 *
 
20
 * == END LICENSE ==
 
21
--->
 
22
<cfscript>
 
23
        config = structNew();
 
24
 
 
25
        // SECURITY: You must explicitly enable this "connector". (Set enabled to "true")
 
26
        config.enabled = false;
 
27
 
 
28
        config.userFilesPath = "/userfiles/";
 
29
 
 
30
        config.serverPath = ""; // use this to force the server path if FCKeditor is not running directly off the root of the application or the FCKeditor directory in the URL is a virtual directory or a symbolic link / junction
 
31
 
 
32
        config.allowedExtensions = structNew();
 
33
        config.deniedExtensions = structNew();
 
34
 
 
35
        // config.allowedExtensions["File"] = "doc,rtf,pdf,ppt,pps,xls,csv,vnd,zip";
 
36
        config.allowedExtensions["File"] = "";
 
37
        config.deniedExtensions["File"] = "html,htm,php,php2,php3,php4,php5,phtml,pwml,inc,asp,aspx,ascx,jsp,cfm,cfc,pl,bat,exe,com,dll,vbs,js,reg,cgi,htaccess,asis,sh,shtml,shtm,phtm";
 
38
 
 
39
        config.allowedExtensions["Image"] = "png,gif,jpg,jpeg,bmp";
 
40
        config.deniedExtensions["Image"] = "";
 
41
 
 
42
        config.allowedExtensions["Flash"] = "swf,fla";
 
43
        config.deniedExtensions["Flash"] = "";
 
44
 
 
45
        config.allowedExtensions["Media"] = "swf,fla,jpg,gif,jpeg,png,avi,mpg,mpeg,mp3,mp4,m4a,wma,wmv,wav,mid,midi,rmi,rm,ram,rmvb,mov,qt";
 
46
        config.deniedExtensions["Media"] = "";
 
47
</cfscript>
 
48
 
 
49
<!--- code to maintain backwards compatibility with previous version of cfm connector --->
 
50
<cfif isDefined("application.userFilesPath")>
 
51
 
 
52
        <cflock scope="application" type="readonly" timeout="5">
 
53
        <cfset config.userFilesPath = application.userFilesPath>
 
54
        </cflock>
 
55
 
 
56
<cfelseif isDefined("server.userFilesPath")>
 
57
 
 
58
        <cflock scope="server" type="readonly" timeout="5">
 
59
        <cfset config.userFilesPath = server.userFilesPath>
 
60
        </cflock>
 
61
 
 
62
</cfif>
 
63
 
 
64
<!--- look for config struct in request, application and server scopes --->
 
65
<cfif isDefined("request.FCKeditor") and isStruct(request.FCKeditor)>
 
66
 
 
67
        <cfset variables.FCKeditor = request.FCKeditor>
 
68
 
 
69
<cfelseif isDefined("application.FCKeditor") and isStruct(application.FCKeditor)>
 
70
 
 
71
        <cflock scope="application" type="readonly" timeout="5">
 
72
        <cfset variables.FCKeditor = duplicate(application.FCKeditor)>
 
73
        </cflock>
 
74
 
 
75
<cfelseif isDefined("server.FCKeditor") and isStruct(server.FCKeditor)>
 
76
 
 
77
        <cflock scope="server" type="readonly" timeout="5">
 
78
        <cfset variables.FCKeditor = duplicate(server.FCKeditor)>
 
79
        </cflock>
 
80
 
 
81
</cfif>
 
82
 
 
83
<cfif isDefined("FCKeditor")>
 
84
 
 
85
        <!--- copy key values from external to local config (i.e. override default config as required) --->
 
86
        <cfscript>
 
87
                function structCopyKeys(stFrom, stTo) {
 
88
                        for ( key in stFrom ) {
 
89
                                if ( isStruct(stFrom[key]) ) {
 
90
                                        structCopyKeys(stFrom[key],stTo[key]);
 
91
                                } else {
 
92
                                        stTo[key] = stFrom[key];
 
93
                                }
 
94
                        }
 
95
                }
 
96
                structCopyKeys(FCKeditor, config);
 
97
        </cfscript>
 
98
 
 
99
</cfif>