From 60b04004a19acc7e30a622f9a4bbe7935078b940 Mon Sep 17 00:00:00 2001 From: Rob Church Date: Mon, 17 Apr 2006 22:57:39 +0000 Subject: [PATCH] Add meta tag and JavaScript variables to cached special pages which provides the timestamp of the last update, in YYYYMMDDHHMMSS format. --- RELEASE-NOTES | 5 ++++- includes/QueryPage.php | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 409942655c..592535ed5c 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -70,7 +70,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Maintenance script to import the contents of a text file into a wiki page * Add $wgReservedUsernames configuration directive to block account creation/use * (bug 5576) Remove debugging hack in session check -* (bug 5426) Lowercase treatment of titles in rights log leads to broken links on Special:Log +* (bug 5426) Lowercase treatment of titles in rights log leads to broken links + on Special:Log * Minor improvements to French localisation files * (bug 5181) Update "nogomatch" for Slovak * (bug 5594) Id translation up to # Login and logout pages section @@ -87,6 +88,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Edit toolbar now works in pure XHTML mode (application/xhtml+xml) * Add watchlist clear function to allow quick purging of all items * (bug 5625) Additional namespace translations for Welsh +* Add meta tag and JavaScript variables to cached special pages which provides + the timestamp of the last update, in YYYYMMDDHHMMSS format. == Compatibility == diff --git a/includes/QueryPage.php b/includes/QueryPage.php index 77bcce0f78..79ce0ba667 100644 --- a/includes/QueryPage.php +++ b/includes/QueryPage.php @@ -286,6 +286,8 @@ class QueryPage { if( $tRow ) { $updated = $wgLang->timeAndDate( $tRow->qci_timestamp, true, true ); $cacheNotice = wfMsg( 'perfcachedts', $updated ); + $wgOut->addMeta( 'Data-Cache-Time', $tRow->qci_timestamp ); + $wgOut->addScript( '' ); } else { $cacheNotice = wfMsg( 'perfcached' ); } -- 2.20.1