[Zope-CMF] Don't always set the modification date?
Paul Winkler
pw_lists at slinkp.com
Fri Feb 11 14:55:23 EST 2005
I'm finding that there are times we want to be able to tweak
content without updating the "modified" timestamp. For example,
if you fix a typo in a year-old article, or make a trivial
visual tweak, it may be misleading to make readers think that
the content reflects something you would write today, and you
might not want the content to pop up to the top of the typical
"Recent changes" list.
I can see a way to hack around the current DublinCore implementation,
by customizing metadata_edit_form to pass a flag like "no_timestamp"
and then customize metadata_edit_controller like so:
...
old_modtime = context.ModificationDate()
context.editMetadata( title=title
...
)
if request.get('no_timestamp'):
context.setModificationDate(old_modtime)
...
But it occurred to me that I might not be the only one who wants
this feature, in which case maybe we could modify editMetadata()
in DublinCore.py to take an optional flag like set_modification_date=None.
Or maybe more generally, have an optional modification_date=None
argument, which is just passed to setModificationDate()?
(but then if None means "now", what means "keep the old timestamp"?
maybe we'd really want both arguments?)
Or is all this too much of an edge case to justify modifying
CMFCore ?
--
Paul Winkler
http://www.slinkp.com
More information about the Zope-CMF
mailing list