[Zope-CMF] Re: database modification time vs. content modification time

John Waycott javajohn@cox.net
Tue, 29 Apr 2003 20:36:22 -0700


Stefan, Thanks for your response.

I think I understand this. I see now that there is a separate modified 
date in the dublin core. This will work when exporting data from one CMF 
site to another, but in my case, the files were uploaded from a plain 
filesystem via DAV; we didn't have them in a website before. I then 
manually added the titles and descriptions.

I assume I'll have to just write a form or script that lets me enter a 
new date for each document and call setModificationDate(). I still have 
the old files and can get the dates from them. It will be tedious, but I 
can't think of an automated way to do this. I'm thinking I could modify 
the properties edit form and add a field to set the modified date?

Stefan H. Holek wrote:
> Stay away from bobobase_modification_time. It is a ZODB internal 
> timestamp and not to be mucked with by us mortals.
> 
> What you want is an application-level modification time, and current CMF 
> has support for such a thing in DublinCore and CMFCatalogAware.
> 
> What will probably work is:
> 
> 1) Upgrade CMF on the old site (where the documents come from).
> 
> 2) Write an ExternalMethod that calls notifyModified() on all your 
> content objects.
> 
> 3) Do the same on your new site
> 
> 4) Now export the documents from the old site and import them into the 
> new site.
> 
> Be careful to also update the portal_catalog. You will likely need 
> additional indexes and metadata.
> 
> HTH,
> Stefan
> 
> 
> On Dienstag, Apr 29, 2003, at 16:18 Europe/Vienna, John Waycott wrote:
> 
>> I have a CMF/Plone Intranet site to which I've loaded scores of old 
>> reference documents. The trouble is, the last modified date shown for 
>> each document is that date the documents were uploaded to the site, 
>> not the date that the documents themselves were last modified. Also, 
>> the modified date is changed if I just change the title or 
>> description, which is not what I want; I need to change that behavior 
>> so that the modified date is based on the date the content was modified.
>>
>> Is there a way to change the date backwards to the original date the 
>> files were last modified, and change it only if the body of the 
>> content is modified?
>>
>> -- 
>> John Waycott
> 
> -- 
> The time has come to start talking about whether the emperor is as well
> dressed as we are supposed to think he is.               /Pete McBreen/
> 
> 
> _______________________________________________
> Zope-CMF maillist  -  Zope-CMF@zope.org
> http://mail.zope.org/mailman/listinfo/zope-cmf
> 
> See http://collector.zope.org/CMF for bug reports and feature requests
>