From: Gregoire W. <gr...@gm...> - 2004-10-26 13:15:47
|
>I think it is better if we can access directly LogEntry (as returned from >getHistory), I would avoid to write something like to access the attributes: >... >logentry=portal_versioning.getHistory(obj)[0] >version_id = portal_versioning.getVersion_id(logentry) >... > >(I think is better: >version_id = logentry.getVersion_id()) > >Or we can redefine LogEntry in CMFEditions and leave to getHistory the >re-wrapping of the ZopeVersionControl.LogEntry: >... >return [CMFEdition.LogEntry(checkin_log[id]) for id in version_ids] I'm in favour to build a own LogEntry class (in fact we removed one from CMFEditions) and then access the attributes directly. For this the object has to be marked as publicy accessible (View permission). As the log info is not persistent there is no problem if someone by hasard writes to its attributes. Gregoire |