Cotonti/Cotonti — comment on commit adafa78c3345f63e7a0a8140c4a2cb4ca9ef6e41
File:  line 0
By GHengeveld:

Here's what we need:
- page_created (initial creation date, currently page_date but _created is clearer)
- page_updated (last update)
- page_begin (when page is first visible on site)
- page_expire (when page is no longer visible on site)
- page_version (version number (integer), initial value 0, increments every time the page is validated (not on edit))

I'm considering the 5 statuses here (draft, pending, validated, published, expired). What we want is to update page_begin to $sys['now'] when the page is published for the first time, not when the page has been published before. Because of this we need to keep a record of whether or not the page has been validated before. The version number does this. If the version is 0, the page is new and therefore page_begin must be updated to $sys['now']. Otherwise it will not be changed.