projects
/
Plinn.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Marre de se faire chier avec des lubies de geeks…
[Plinn.git]
/
__init__.py
diff --git
a/__init__.py
b/__init__.py
index
d4f4f53
..
52eaef5
100755
(executable)
--- a/
__init__.py
+++ b/
__init__.py
@@
-38,7
+38,11
@@
import GroupDataTool
import RegistrationTool
import CalendarTool
import AttachmentTool
import RegistrationTool
import CalendarTool
import AttachmentTool
-import catalog
+try :
+ import catalog
+ __solr_ok = True
+except ImportError :
+ __solr_ok = False
from PloneMisc import IndexIterator, Batch
import patch
from PloneMisc import IndexIterator, Batch
import patch
@@
-57,8
+61,9
@@
tools = ( MembershipTool.MembershipTool
, RegistrationTool.RegistrationTool
, CalendarTool.CalendarTool
, AttachmentTool.AttachmentTool
, RegistrationTool.RegistrationTool
, CalendarTool.CalendarTool
, AttachmentTool.AttachmentTool
- , catalog.CatalogTool
)
)
+if __solr_ok :
+ tools += (catalog.CatalogTool,)
# register files extensions
registerFileExtension('ttf', FSFile)
# register files extensions
registerFileExtension('ttf', FSFile)
@@
-89,16
+94,10
@@
def initialize(registrar) :
# Monkey...
# all tags are good !
# Monkey...
# all tags are good !
-validTags = default_cmf_utils.NASTY_TAGS.copy()
-for tag in validTags.keys() :
- validTags[tag] = 1
-
-VALID_TAGS = {'font': 1, 'param' : 1, 'iframe' : 1}
-
-validTags.update(VALID_TAGS)
-
+class YesDict(dict):
+ def has_key(self, k) : return True
default_cmf_utils.NASTY_TAGS = {}
default_cmf_utils.NASTY_TAGS = {}
-default_cmf_utils.VALID_TAGS
.update(validTags
)
+default_cmf_utils.VALID_TAGS
= YesDict(
)
# the plinn portal_calendar is a also a "SPECIAL PROVIDER"
# TODO: vérifier l'impact
# the plinn portal_calendar is a also a "SPECIAL PROVIDER"
# TODO: vérifier l'impact