diff --git a/wiki/PageGraphicalEditor.py b/wiki/PageGraphicalEditor.py index dbfce73b..e60205cf 100644 --- a/wiki/PageGraphicalEditor.py +++ b/wiki/PageGraphicalEditor.py @@ -9,7 +9,9 @@ from MoinMoin import PageEditor import os, time, codecs, re -from MoinMoin import caching, config, user, util, wikiutil, error +#### HACK SAUVAGE 1/2 +from MoinMoin import caching, config, user, util, wikiutil, error, search +#### FIN DU HACK 1/2 from MoinMoin.Page import Page from MoinMoin.widget import html from MoinMoin.widget.dialog import Status @@ -84,6 +86,13 @@ class PageGraphicalEditor(PageEditor.PageEditor): else: msg = edit_lock_message + #### HACK SAUVAGE 2/2 + query = search.QueryParser().parse_query(u'CatégorieEditeurGraphiqueInterdit') + page = search.Page(request, self.page_name) + if query.search(page): + msg = _('You cannot use the graphical editor on this page.') + #### FIN HACK 2/2 + # Did one of the prechecks fail? if msg: self.send_page(self.request, msg=msg)