From a836bae768539042a5e217de6ff7335820a3bfe1 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 15 Oct 2009 10:20:19 +0000 Subject: [PATCH] Made isDeleted() et all call $this->load() first --- includes/filerepo/OldLocalFile.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/filerepo/OldLocalFile.php b/includes/filerepo/OldLocalFile.php index 15fc977ab0..d2d78c9b12 100644 --- a/includes/filerepo/OldLocalFile.php +++ b/includes/filerepo/OldLocalFile.php @@ -177,6 +177,7 @@ class OldLocalFile extends LocalFile { * @return bool */ function isDeleted( $field ) { + $this->load(); return ($this->deleted & $field) == $field; } @@ -185,6 +186,7 @@ class OldLocalFile extends LocalFile { * @return int */ function getVisibility() { + $this->load(); return (int)$this->deleted; } @@ -195,6 +197,7 @@ class OldLocalFile extends LocalFile { * @return bool */ function userCan( $field ) { + $this->load(); if( isset($this->deleted) && ($this->deleted & $field) ) { global $wgUser; $permission = ''; -- 2.20.1