Skip to content

Commit

Permalink
Revert "Read the AvailableEditorsVocabulary from the new registry ins…
Browse files Browse the repository at this point in the history
…tead of from the site properties."

This reverts commit 3513387.
  • Loading branch information
tisto committed May 12, 2015
1 parent 61ffb2d commit 1086631
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions plone/app/vocabularies/editors.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from Products.CMFPlone.interfaces import IEditingSchema
from plone.registry.interfaces import IRegistry
from zope.i18nmessageid import MessageFactory
from zope.interface import implements
from zope.schema.interfaces import IVocabularyFactory
from zope.schema.vocabulary import SimpleTerm
from zope.schema.vocabulary import SimpleVocabulary
from zope.component import getUtility
from zope.site.hooks import getSite

from Products.CMFCore.utils import getToolByName

_ = MessageFactory('plone')

Expand Down Expand Up @@ -44,10 +44,10 @@ class AvailableEditorsVocabulary(object):

def __call__(self, context):
items = []
registry = getUtility(IRegistry)
settings = registry.forInterface(IEditingSchema, prefix='plone')
if settings is not None:
editors = settings.available_editors
site = getSite()
pprop = getToolByName(site, 'portal_properties', None)
if pprop is not None:
editors = pprop.site_properties.available_editors
items = [SimpleTerm(e, e, _(e)) for e in editors]
return SimpleVocabulary(items)

Expand Down

2 comments on commit 1086631

@tisto
Copy link
Member Author

@tisto tisto commented on 1086631 May 12, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bloodbare it seems mr.roboto is down. This commit was not added to buildout.coredev, even though the package is properly listed in sources:

https://github.com/plone/buildout.coredev/blob/5.0/sources.cfg#L87

@tisto
Copy link
Member Author

@tisto tisto commented on 1086631 May 12, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mr roboto is up again.

Please sign in to comment.