[ Index ]
 

Code source de FCKeditor 2.4

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/editor/filemanager/upload/cfm/ -> config.cfm (source)

   1  <!---
   2   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
   3   * Copyright (C) 2003-2007 Frederico Caldeira Knabben
   4   * 
   5   * == BEGIN LICENSE ==
   6   * 
   7   * Licensed under the terms of any of the following licenses at your
   8   * choice:
   9   * 
  10   *  - GNU General Public License Version 2 or later (the "GPL")
  11   *    http://www.gnu.org/licenses/gpl.html
  12   * 
  13   *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
  14   *    http://www.gnu.org/licenses/lgpl.html
  15   * 
  16   *  - Mozilla Public License Version 1.1 or later (the "MPL")
  17   *    http://www.mozilla.org/MPL/MPL-1.1.html
  18   * 
  19   * == END LICENSE ==
  20   * 
  21   * File Name: config.cfm
  22   *     Configuration file for the ColdFusion File Uploader.
  23   * 
  24   * File Authors:
  25   *         Wim Lemmens (didgiman@gmail.com)
  26  --->
  27  
  28  <cfscript>
  29      config = StructNew();
  30           
  31      // SECURITY: You must explicitelly enable this "uploader". 
  32      config.enabled = false;
  33      
  34      // Path to uploaded files relative to the document root.
  35      config.userFilesPath = "/userfiles/";
  36      
  37      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
  38          
  39      config.allowedExtensions = StructNew();
  40      config.deniedExtensions = StructNew();
  41      
  42      config.allowedExtensions["File"] = "";
  43      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";
  44      
  45      config.allowedExtensions["Image"] = "png,gif,jpg,jpeg,bmp";
  46      config.deniedExtensions["Image"] = "";
  47      
  48      config.allowedExtensions["Flash"] = "swf,fla";
  49      config.deniedExtensions["Flash"] = "";
  50  </cfscript>
  51  
  52  <!--- code to maintain backwards compatibility with previous version of cfm connector --->
  53  <cfif isDefined("application.userFilesPath")>
  54  
  55      <cflock scope="application" type="readonly" timeout="5">
  56          <cfset config.userFilesPath = application.userFilesPath>
  57      </cflock>
  58  
  59  <cfelseif isDefined("server.userFilesPath")>
  60      
  61      <cflock scope="server" type="readonly" timeout="5">
  62          <cfset config.userFilesPath = server.userFilesPath>
  63      </cflock>
  64      
  65  </cfif>
  66  
  67  <!--- look for config struct in request, application and server scopes --->
  68  <cfif isDefined("request.FCKeditor") and isStruct(request.FCKeditor)>
  69  
  70      <cfset variables.FCKeditor = request.FCKeditor>
  71  
  72  <cfelseif isDefined("application.FCKeditor") and isStruct(application.FCKeditor)>
  73  
  74      <cflock scope="application" type="readonly" timeout="5">
  75      <cfset variables.FCKeditor = duplicate(application.FCKeditor)>
  76      </cflock>
  77  
  78  <cfelseif isDefined("server.FCKeditor") and isStruct(server.FCKeditor)>
  79  
  80      <cflock scope="server" type="readonly" timeout="5">
  81      <cfset variables.FCKeditor = duplicate(server.FCKeditor)>
  82      </cflock>
  83  
  84  </cfif>
  85  
  86  <cfif isDefined("FCKeditor")>
  87  
  88      <!--- copy key values from external to local config (i.e. override default config as required) --->
  89      <cfscript>
  90  		function structCopyKeys(stFrom, stTo) {
  91              for ( key in stFrom ) {
  92                  if ( isStruct(stFrom[key]) ) {
  93                      structCopyKeys(stFrom[key],stTo[key]);
  94                  } else {
  95                      stTo[key] = stFrom[key];
  96                  }
  97              }
  98          }
  99          structCopyKeys(FCKeditor, config);
 100      </cfscript>
 101  
 102  </cfif>


Généré le : Sun Feb 25 15:28:05 2007 par Balluche grâce à PHPXref 0.7