"SELECT qc_type as type, qc_namespace as namespace,qc_title as title, qc_value as value
FROM $querycache WHERE qc_type='$type'";
- # Fetch the timestamp of this update
- $tRes = $dbr->select( 'querycache_info', array( 'qci_timestamp' ), array( 'qci_type' => $type ), $fname );
- $tRow = $dbr->fetchObject( $tRes );
- $updated = $tRow->qci_timestamp;
- $updatedTs = $wgLang->timeAndDate( $updated, true, true );
-
- if ( ! $this->listoutput )
- $wgOut->addWikiText( wfMsg( 'perfcached', $updatedTs ) );
+ if( !$this->listoutput ) {
+
+ # Fetch the timestamp of this update
+ $tRes = $dbr->select( 'querycache_info', array( 'qci_timestamp' ), array( 'qci_type' => $type ), $fname );
+ $tRow = $dbr->fetchObject( $tRes );
+
+ if( $tRow ) {
+ $updated = $wgLang->timeAndDate( $tRow->qci_timestamp, true, true );
+ $cacheNotice = wfMsg( 'perfcachedts', $updated );
+ } else {
+ $cacheNotice = wfMsg( 'perfcached' );
+ }
+
+ $wgOut->addWikiText( $cacheNotice );
+ }
}
'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.',
'perfdisabled' => 'Sorry! This feature has been temporarily disabled because it slows the database down to the point that no one can use the wiki.',
'perfdisabledsub' => 'Here is a saved copy from $1:', # obsolete?
-'perfcached' => 'The following data is cached, and was last updated $1.',
+'perfcached' => 'The following data is cached and may not be up to date.',
+'perfcachedts' => 'The following data is cached, and was last updated $1.',
'wrong_wfQuery_params' => 'Incorrect parameters to wfQuery()<br />
Function: $1<br />
Query: $2',
\r
-- Special page name\r
-- Corresponds to a qc_type value\r
- qci_type varchar(255) NOT NULL default '',\r
+ qci_type varchar(32) NOT NULL default '',\r
\r
-- Timestamp of last update\r
qci_timestamp char(14) NOT NULL default '19700101000000',\r
-- Special page name
-- Corresponds to a qc_type value
- qci_type varchar(255) NOT NULL default '',
+ qci_type varchar(32) NOT NULL default '',
-- Timestamp of last update
qci_timestamp char(14) NOT NULL default '19700101000000',
-- Special page name
-- Corresponds to a qc_type value
- qci_type varchar(255) NOT NULL default '',
+ qci_type varchar(32) NOT NULL default '',
-- Timestamp of last update
qci_timestamp char(14) NOT NULL default '19700101000000',