Added exists() function
authorAaron Schulz <aaron@users.mediawiki.org>
Wed, 30 Sep 2009 19:35:39 +0000 (19:35 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Wed, 30 Sep 2009 19:35:39 +0000 (19:35 +0000)
includes/filerepo/ArchivedFile.php

index a256f1f..a2a6518 100644 (file)
@@ -48,6 +48,7 @@ class ArchivedFile
                $this->timestamp = NULL;
                $this->deleted = 0;
                $this->dataLoaded = false;
+               $this->exists = false;
                
                if( is_object($title) ) {
                        $this->title = $title;
@@ -142,6 +143,7 @@ class ArchivedFile
                        return;
                }
                $this->dataLoaded = true;
+               $this->exists = true;
 
                return true;
        }
@@ -193,6 +195,11 @@ class ArchivedFile
                $this->load();
                return $this->id;
        }
+       
+       public function exists() {
+               $this->load();
+               return $this->exists;
+       }
 
        /**
         * Return the FileStore key