r23111 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23110‎ | r23111 | r23112 >
Date:07:10, 20 June 2007
Author:tstarling
Status:old
Tags:
Comment:
Removed mImageTimestamps, if an extension needs this then it can be set in a ParserAfterTidy hook, using a single DB query.
Modified paths:
  • /trunk/phase3/includes/ParserOutput.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ParserOutput.php
@@ -16,7 +16,6 @@
1717 $mTemplates, # 2-D map of NS/DBK to ID for the template references. ID=zero for broken.
1818 $mTemplateIds, # 2-D map of NS/DBK to rev ID for the template references. ID=zero for broken.
1919 $mImages, # DB keys of the images used, in the array key only
20 - $mImageTimestamps, # Map of DBK to rev ID for the template references. ID=zero for broken.
2120 $mExternalLinks, # External link URLs, in the key only
2221 $mHTMLtitle, # Display HTML title
2322 $mSubtitle, # Additional subtitle
@@ -44,7 +43,6 @@
4544 $this->mNoGallery = false;
4645 $this->mHeadItems = array();
4746 $this->mTemplateIds = array();
48 - $this->mImageTimestamps = array();
4947 }
5048
5149 function getText() { return $this->mText; }
@@ -92,19 +90,8 @@
9391 $this->mLinks[$ns][$dbk] = $id;
9492 }
9593
96 - function addImage( $name, $timestamp=NULL ) {
97 - if( isset($this->mImages[$name]) )
98 - return; // No repeated pointless DB calls!
 94+ function addImage( $name ) {
9995 $this->mImages[$name] = 1;
100 - if( is_null($timestamp) ) {
101 - wfProfileIn( __METHOD__ );
102 - $dbr = wfGetDB(DB_SLAVE);
103 - $timestamp = $dbr->selectField('image', 'img_timestamp',
104 - array('img_name' => $name),
105 - __METHOD__ );
106 - }
107 - $timestamp = $timestamp ? $timestamp : null;
108 - $this->mImageTimestamps[$name] = $timestamp; // For versioning
10996 }
11097
11198 function addTemplate( $title, $page_id, $rev_id ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r23120Merged revisions 23103-23119 via svnmerge from...david08:43, 20 June 2007

Status & tagging log