Add getVisibility function (which fixes revisiondelete fatal)
authorAaron Schulz <aaron@users.mediawiki.org>
Sat, 12 Sep 2009 22:02:51 +0000 (22:02 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Sat, 12 Sep 2009 22:02:51 +0000 (22:02 +0000)
includes/filerepo/File.php
includes/filerepo/OldLocalFile.php

index f8d7f8a..c964d5a 100644 (file)
@@ -938,6 +938,14 @@ abstract class File {
        function isDeleted( $field ) {
                return false;
        }
+       
+       /**
+        * Return the deletion bitfield
+        * STUB
+        */     
+       function getVisibility() {
+               return 0;
+       }
 
        /**
         * Was this file ever deleted from the wiki?
index dfee6cf..2d249d7 100644 (file)
@@ -180,6 +180,14 @@ class OldLocalFile extends LocalFile {
                return ($this->deleted & $field) == $field;
        }
 
+       /**
+        * Returns bitfield value
+        * @return int
+        */
+       function getVisibility() {
+               return (int)$this->deleted;
+       }
+
        /**
         * Determine if the current user is allowed to view a particular
         * field of this image file, if it's marked as deleted.