r56250 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56249‎ | r56250 | r56251 >
Date:22:02, 12 September 2009
Author:aaron
Status:ok
Tags:
Comment:
Add getVisibility function (which fixes revisiondelete fatal)
Modified paths:
  • /trunk/phase3/includes/filerepo/File.php (modified) (history)
  • /trunk/phase3/includes/filerepo/OldLocalFile.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/OldLocalFile.php
@@ -181,6 +181,14 @@
182182 }
183183
184184 /**
 185+ * Returns bitfield value
 186+ * @return int
 187+ */
 188+ function getVisibility() {
 189+ return (int)$this->deleted;
 190+ }
 191+
 192+ /**
185193 * Determine if the current user is allowed to view a particular
186194 * field of this image file, if it's marked as deleted.
187195 * @param int $field
Index: trunk/phase3/includes/filerepo/File.php
@@ -938,6 +938,14 @@
939939 function isDeleted( $field ) {
940940 return false;
941941 }
 942+
 943+ /**
 944+ * Return the deletion bitfield
 945+ * STUB
 946+ */
 947+ function getVisibility() {
 948+ return 0;
 949+ }
942950
943951 /**
944952 * Was this file ever deleted from the wiki?

Status & tagging log