From 208c4f16e7ebb80aaa59059b4cc09da71406b02a Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sat, 12 Sep 2009 22:02:51 +0000 Subject: [PATCH] Add getVisibility function (which fixes revisiondelete fatal) --- includes/filerepo/File.php | 8 ++++++++ includes/filerepo/OldLocalFile.php | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/includes/filerepo/File.php b/includes/filerepo/File.php index f8d7f8a655..c964d5a9ee 100644 --- a/includes/filerepo/File.php +++ b/includes/filerepo/File.php @@ -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? diff --git a/includes/filerepo/OldLocalFile.php b/includes/filerepo/OldLocalFile.php index dfee6cf5a6..2d249d7a04 100644 --- a/includes/filerepo/OldLocalFile.php +++ b/includes/filerepo/OldLocalFile.php @@ -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. -- 2.20.1