should check fckeditor is installed before using the property tls-sprint
authorsylvain.thenault@logilab.fr
Wed, 04 Mar 2009 18:49:58 +0100
branchtls-sprint
changeset 1010 73591b2ffeb4
parent 1009 bcd0c3ae1935
child 1011 22812cfe36b4
should check fckeditor is installed before using the property
entities/__init__.py
--- a/entities/__init__.py	Wed Mar 04 18:49:36 2009 +0100
+++ b/entities/__init__.py	Wed Mar 04 18:49:58 2009 +0100
@@ -416,7 +416,7 @@
         `attr`, according to user preferences
         """
         req = self.req
-        if req.property_value('ui.fckeditor') and self.has_format(attr):
+        if self.config.fckeditor_installed() and req.property_value('ui.fckeditor') and self.has_format(attr):
             if self.has_eid() or '%s_format' % attr in self:
                 return self.format(attr) == 'text/html'
             return req.property_value('ui.default-text-format') == 'text/html'