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.
 | 
			
		||||
  [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)
 | 
			
		||||
------------------
 | 
			
		||||
 | 
			
		||||
@ -91,7 +91,7 @@
 | 
			
		||||
                                           class="noborder"
 | 
			
		||||
                                           name="paths:list" id="#"
 | 
			
		||||
                                           value="#"
 | 
			
		||||
                                           tal:attributes="value   item/getPath;
 | 
			
		||||
                                           tal:attributes="value   python:view.item_path(item);
 | 
			
		||||
                                                           id      string:cb_${item/id};
 | 
			
		||||
                                                           checked item/checked|nothing;
 | 
			
		||||
                                                           alt     string:Select ${item/Title};
 | 
			
		||||
 | 
			
		||||
@ -44,6 +44,11 @@ class View(BrowserView):
 | 
			
		||||
        self.request.set('disable_border', True)
 | 
			
		||||
 | 
			
		||||
        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')
 | 
			
		||||
 | 
			
		||||
@ -67,6 +72,11 @@ class View(BrowserView):
 | 
			
		||||
            return True
 | 
			
		||||
        else:
 | 
			
		||||
            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):
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user