I have no desire to have a header, this is more for reporting purposes as one might understand that having old data in a knowledge base article could be bad :) but i do see the logic, i will adjust my SQL to only review the current version's rev_timestamp. I also follow your logic on having the bot edit the page and place the template on it {{outdate}} but my only fear is it will make and follow up reporting indicate that the page has been edited within the given 365 day time frame. I will have to present this to the team and see if this is an acceptable compromise.
Thanks for all the input Brion you have been very helpful and also thanks for being a MediaWiki super hero!
Zach H.
On Thu, Oct 20, 2011 at 6:20 PM, Brion Vibber brion@pobox.com wrote:
On Thu, Oct 20, 2011 at 3:36 PM, Zach H. luckenbach@gmail.com wrote:
So we are currently using the MediaWiki software to run a Knowledge base system and have a policy that says we will review ALL articles that have not been touched in 365 days to ensure they are still relevant. Coming up
with
the SQL code to find these was very easy, one feature I was asked to implement was 'is it possible to add a "outdated" tag to a article' so
I
added the {{outdated}} tag to the wiki, now the hard part is, how do I programmatically update the most current revision without adjusting the page_touched date? is it even possible? I know I can do this via SQL but that is VERY kludgy and I can see all sorts of issues this could cause so
I
wanted to ask the pro's.
Well, that would kinda defeat the purpose of page_touched, which is to provide a cache invalidation timestamp when something that would change the rendering of the page changes, such as content, creation or deletion of linked pages & images, etc.
Note that page_touched can be updated for many reasons other than the page being edited; all the things above and more, including someone running ?action=purge on the page.
page_touched is not a suitable proxy for something like "has not been edited since time X".
If what you want is to show a special header on the page when viewing it and it hasn't been edited in X days, then you probably want something like this:
- hook into one of the various output-related methods to add things to
output before the top of the page
- calculate age-since-editing against the current version's rev_timestamp
(not page_touched!)
- output or don't output something, based on that
If you really want to edit the pages to add a template to them, then you should probably follow the sensible logic that this counts as an edit -- that gets the page out of your hair until the next time you look for unedited pages? And you'd want to make sure you don't add it over and over again, etc.
-- brion _______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l