From: Aaron Schulz Date: Sat, 12 Sep 2009 22:02:51 +0000 (+0000) Subject: Add getVisibility function (which fixes revisiondelete fatal) X-Git-Tag: 1.31.0-rc.0~39762 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=208c4f16e7ebb80aaa59059b4cc09da71406b02a;p=lhc%2Fweb%2Fwiklou.git Add getVisibility function (which fixes revisiondelete fatal) --- 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.