Merge remote-tracking branch 'upstream/master'

This commit is contained in:
maartenkling 2012-11-13 09:37:14 +01:00
commit c6af5ee670
7 changed files with 38 additions and 34 deletions

View File

@ -4,6 +4,14 @@ Changelog
2.2.1 (unreleased)
------------------
- For migrations of comments without a valid old_status, apply the 'published'
state.
[thet]
- Re-apply eleddy's "Revert modification date since this is fixed in
p.a.caching now." as her commit was lost later on due to some git magic.
[thet]
- Remove submitting the controlpanel form again after removing disabled tags
fixes #13037 and #12357
[maartenkling]

View File

@ -121,9 +121,10 @@ class View(BrowserView):
'action': None,
'actor': None,
'comment': 'Migrated workflow state',
'review_state': old_status.get(
'review_state': old_status and old_status.get(
'review_state',
new_workflow.initial_state),
new_workflow.initial_state)
or 'published',
'time': DateTime()
}
workflow.setStatusOf('comment_review_workflow',

View File

@ -217,14 +217,9 @@ def notify_content_object(obj, event):
"""Tell the content object when a comment is added
"""
content_obj = aq_parent(aq_parent(obj))
# set the modified date and reindex the item accordingly
# so that 304s work correctly. This means that adding a comment
# effectively counts as modifying the content type.
content_obj.setModificationDate()
content_obj.reindexObject(idxs=('total_comments',
'last_comment_date',
'commentators',
))
'commentators'))
def notify_content_object_deleted(obj, event):

View File

@ -227,7 +227,7 @@ Find a comment id to reply to.
>>> browser.open(urldoc1)
>>> import re
>>> comment_div = re.findall('<div.*?.class="comment.*?>', browser.contents)[0]
>>> id = re.findall('"([^"]*)"', comment_div)[2]
>>> id = re.findall('"([^"]*)"', comment_div)[1]
Post a reply to an existing comment.