Ticket #2058: wsgi.patch

File wsgi.patch, 804 bytes (added by Chad Whitacre, 16 years ago)
  • fckeditor.py

    old new  
    4848                self.Width = '100%'
    4949                self.Height = '200'
    5050                self.ToolbarSet = 'Default'
    51                 self.Value = '';
     51                self.Value = ''
     52                self.Environ = None
    5253
    5354                self.Config = {}
    5455
     
    108109                return Html
    109110
    110111        def IsCompatible(self):
    111                 if (os.environ.has_key("HTTP_USER_AGENT")):
    112                         sAgent = os.environ.get("HTTP_USER_AGENT", "")
     112                if self.Environ is not None:
     113                        environ = self.Environ  # support WSGI
     114                else:
     115                        environ = os.environ    # default to CGI
     116
     117                if (environ.has_key("HTTP_USER_AGENT")):
     118                        sAgent = environ.get("HTTP_USER_AGENT", "")
    113119                else:
    114120                        sAgent = ""
    115121                if (sAgent.find("MSIE") >= 0) and (sAgent.find("mac") < 0) and (sAgent.find("Opera") < 0):
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy