r24953 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24952‎ | r24953 | r24954 >
Date:14:57, 20 August 2007
Author:robchurch
Status:old
Tags:
Comment:
Use an instance variable, not a static one
Modified paths:
  • /trunk/phase3/includes/FileRevertForm.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/FileRevertForm.php
@@ -11,6 +11,7 @@
1212 private $title = null;
1313 private $file = null;
1414 private $oldimage = '';
 15+ private $timestamp = false;
1516
1617 /**
1718 * Constructor
@@ -153,12 +154,11 @@
154155 * @return string
155156 */
156157 private function getTimestamp() {
157 - static $timestamp = false;
158 - if( $timestamp === false ) {
 158+ if( $this->timestamp === false ) {
159159 $file = RepoGroup::singleton()->getLocalRepo()->newFromArchiveName( $this->title, $this->oldimage );
160 - $timestamp = $file->getTimestamp();
 160+ $this->timestamp = $file->getTimestamp();
161161 }
162 - return $timestamp;
 162+ return $this->timestamp;
163163 }
164164
165165 }
\ No newline at end of file

Follow-up revisions

RevisionCommit summaryAuthorDate
r25016Merged revisions 24866-25015 via svnmerge from...david23:06, 21 August 2007

Status & tagging log