Use an instance variable, not a static one
authorRob Church <robchurch@users.mediawiki.org>
Mon, 20 Aug 2007 14:57:30 +0000 (14:57 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Mon, 20 Aug 2007 14:57:30 +0000 (14:57 +0000)
includes/FileRevertForm.php

index 6945a18..1adde88 100644 (file)
@@ -11,6 +11,7 @@ class FileRevertForm {
        private $title = null;
        private $file = null;
        private $oldimage = '';
+       private $timestamp = false;
        
        /**
         * Constructor
@@ -153,12 +154,11 @@ class FileRevertForm {
         * @return string
         */
        private function getTimestamp() {
-               static $timestamp = false;
-               if( $timestamp === false ) {
+               if( $this->timestamp === false ) {
                        $file = RepoGroup::singleton()->getLocalRepo()->newFromArchiveName( $this->title, $this->oldimage );
-                       $timestamp = $file->getTimestamp();
+                       $this->timestamp = $file->getTimestamp();
                }
-               return $timestamp;
+               return $this->timestamp;
        }
        
 }
\ No newline at end of file