Index: trunk/phase3/maintenance/archives/patch-querycacheinfo.sql |
— | — | @@ -2,7 +2,7 @@ |
3 | 3 |
|
4 | 4 | -- Special page name
|
5 | 5 | -- Corresponds to a qc_type value
|
6 | | - qci_type varchar(255) NOT NULL default '',
|
| 6 | + qci_type varchar(32) NOT NULL default '',
|
7 | 7 |
|
8 | 8 | -- Timestamp of last update
|
9 | 9 | qci_timestamp char(14) NOT NULL default '19700101000000',
|
Index: trunk/phase3/maintenance/mysql5/tables.sql |
— | — | @@ -960,7 +960,7 @@ |
961 | 961 | |
962 | 962 | -- Special page name |
963 | 963 | -- Corresponds to a qc_type value |
964 | | - qci_type varchar(255) NOT NULL default '', |
| 964 | + qci_type varchar(32) NOT NULL default '', |
965 | 965 | |
966 | 966 | -- Timestamp of last update |
967 | 967 | qci_timestamp char(14) NOT NULL default '19700101000000', |
Index: trunk/phase3/maintenance/tables.sql |
— | — | @@ -950,7 +950,7 @@ |
951 | 951 | |
952 | 952 | -- Special page name |
953 | 953 | -- Corresponds to a qc_type value |
954 | | - qci_type varchar(255) NOT NULL default '', |
| 954 | + qci_type varchar(32) NOT NULL default '', |
955 | 955 | |
956 | 956 | -- Timestamp of last update |
957 | 957 | qci_timestamp char(14) NOT NULL default '19700101000000', |
Index: trunk/phase3/includes/QueryPage.php |
— | — | @@ -277,14 +277,21 @@ |
278 | 278 | "SELECT qc_type as type, qc_namespace as namespace,qc_title as title, qc_value as value |
279 | 279 | FROM $querycache WHERE qc_type='$type'"; |
280 | 280 | |
281 | | - # Fetch the timestamp of this update |
282 | | - $tRes = $dbr->select( 'querycache_info', array( 'qci_timestamp' ), array( 'qci_type' => $type ), $fname ); |
283 | | - $tRow = $dbr->fetchObject( $tRes ); |
284 | | - $updated = $tRow->qci_timestamp; |
285 | | - $updatedTs = $wgLang->timeAndDate( $updated, true, true ); |
| 281 | + if( !$this->listoutput ) { |
286 | 282 | |
287 | | - if ( ! $this->listoutput ) |
288 | | - $wgOut->addWikiText( wfMsg( 'perfcached', $updatedTs ) ); |
| 283 | + # Fetch the timestamp of this update |
| 284 | + $tRes = $dbr->select( 'querycache_info', array( 'qci_timestamp' ), array( 'qci_type' => $type ), $fname ); |
| 285 | + $tRow = $dbr->fetchObject( $tRes ); |
| 286 | + |
| 287 | + if( $tRow ) { |
| 288 | + $updated = $wgLang->timeAndDate( $tRow->qci_timestamp, true, true ); |
| 289 | + $cacheNotice = wfMsg( 'perfcachedts', $updated ); |
| 290 | + } else { |
| 291 | + $cacheNotice = wfMsg( 'perfcached' ); |
| 292 | + } |
| 293 | + |
| 294 | + $wgOut->addWikiText( $cacheNotice ); |
| 295 | + } |
289 | 296 | |
290 | 297 | } |
291 | 298 | |
Index: trunk/phase3/languages/Messages.php |
— | — | @@ -327,7 +327,8 @@ |
328 | 328 | 'badtitletext' => 'The requested page title was invalid, empty, or an incorrectly linked inter-language or inter-wiki title. It may contain one more characters which cannot be used in titles.', |
329 | 329 | 'perfdisabled' => 'Sorry! This feature has been temporarily disabled because it slows the database down to the point that no one can use the wiki.', |
330 | 330 | 'perfdisabledsub' => 'Here is a saved copy from $1:', # obsolete? |
331 | | -'perfcached' => 'The following data is cached, and was last updated $1.', |
| 331 | +'perfcached' => 'The following data is cached and may not be up to date.', |
| 332 | +'perfcachedts' => 'The following data is cached, and was last updated $1.', |
332 | 333 | 'wrong_wfQuery_params' => 'Incorrect parameters to wfQuery()<br /> |
333 | 334 | Function: $1<br /> |
334 | 335 | Query: $2', |