A bug in the moderator panel meant you couldn't delete items in a virtual host, if your portal was named "plone".
svn path=/plone.app.discussion/trunk/; revision=35608
This commit is contained in:
parent
f7c676622b
commit
30c66b0b24
@ -54,6 +54,9 @@ Changelog
|
|||||||
* Added greek translation.
|
* Added greek translation.
|
||||||
[ggozad]
|
[ggozad]
|
||||||
|
|
||||||
|
* A bug in the moderator panel meant you couldn't delete items in a virtual
|
||||||
|
host, if your portal was named "plone".
|
||||||
|
[regebro]
|
||||||
|
|
||||||
1.0b3 (2010-01-28)
|
1.0b3 (2010-01-28)
|
||||||
------------------
|
------------------
|
||||||
|
@ -91,7 +91,7 @@
|
|||||||
class="noborder"
|
class="noborder"
|
||||||
name="paths:list" id="#"
|
name="paths:list" id="#"
|
||||||
value="#"
|
value="#"
|
||||||
tal:attributes="value item/getPath;
|
tal:attributes="value python:view.item_path(item);
|
||||||
id string:cb_${item/id};
|
id string:cb_${item/id};
|
||||||
checked item/checked|nothing;
|
checked item/checked|nothing;
|
||||||
alt string:Select ${item/Title};
|
alt string:Select ${item/Title};
|
||||||
|
@ -45,6 +45,11 @@ class View(BrowserView):
|
|||||||
|
|
||||||
context = aq_inner(self.context)
|
context = aq_inner(self.context)
|
||||||
|
|
||||||
|
# Help for path mangling
|
||||||
|
portal_url = getToolByName(context, 'portal_url')
|
||||||
|
self.portal_url = portal_url()
|
||||||
|
self.portal_path = portal_url.getPortalPath()
|
||||||
|
|
||||||
catalog = getToolByName(context, 'portal_catalog')
|
catalog = getToolByName(context, 'portal_catalog')
|
||||||
|
|
||||||
self.comments = catalog(object_provides=IComment.__identifier__,
|
self.comments = catalog(object_provides=IComment.__identifier__,
|
||||||
@ -68,6 +73,11 @@ class View(BrowserView):
|
|||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def item_path(self, item):
|
||||||
|
# Path mangling to support virtual hosting
|
||||||
|
path = item.getPath()[len(self.portal_path):]
|
||||||
|
return self.portal_url + path
|
||||||
|
|
||||||
|
|
||||||
class DeleteComment(BrowserView):
|
class DeleteComment(BrowserView):
|
||||||
"""Delete a comment from a conversation
|
"""Delete a comment from a conversation
|
||||||
|
Loading…
Reference in New Issue
Block a user