Ticket #1626: 1626_FCKeditor.Net.patch

File 1626_FCKeditor.Net.patch, 2.5 KB (added by Frederico Caldeira Knabben, 16 years ago)

First patch proposal for the FCKeditor.Net repository

  • FileBrowserConfig.cs

     
     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 * This is the code behind of the connector.aspx page used by the
     22 * File Browser.
     23 */
     24
     25using System;
     26using System.Collections.Generic;
     27using System.Text;
     28using System.Web;
     29
     30namespace FredCK.FCKeditorV2
     31{
     32        public class FileBrowserConfig : System.Web.UI.UserControl
     33        {
     34                public bool Enabled;
     35
     36                public FileBrowserConfig()
     37                {
     38                        this.Enabled = false;
     39                }
     40
     41                public virtual void Config()
     42                {}
     43        }
     44}
  • FileBrowserConnector.cs

     
    3131{
    3232        public class FileBrowserConnector : FileWorkerBase
    3333        {
     34                protected FileBrowserConfig Config;
     35
    3436                protected override void OnLoad(EventArgs e)
    3537                {
     38                        Config.Config();
     39
     40                        if ( !Config.Enabled )
     41                        {
     42                                Response.Write( Config.Enabled );
     43                                Response.Write( "This connector is disabled. Please check the \"editor/filemanager/connectors/aspx/config.aspx\"" );
     44                                return;
     45                        }
     46
    3647                        // Get the main request informaiton.
    3748                        string sCommand = Request.QueryString["Command"] ;
    3849                        if ( sCommand == null ) return ;
  • FredCK.FCKeditorV2.vs2005.csproj

     
    110110    <Compile Include="FCKeditorDesigner.cs">
    111111      <SubType>Code</SubType>
    112112    </Compile>
     113    <Compile Include="FileBrowserConfig.cs">
     114      <SubType>ASPXCodeBehind</SubType>
     115    </Compile>
    113116    <Compile Include="FileBrowserConnector.cs">
    114117      <SubType>ASPXCodeBehind</SubType>
    115118    </Compile>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy