Made isDeleted() et all call $this->load() first
authorAaron Schulz <aaron@users.mediawiki.org>
Thu, 15 Oct 2009 10:20:19 +0000 (10:20 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Thu, 15 Oct 2009 10:20:19 +0000 (10:20 +0000)
includes/filerepo/OldLocalFile.php

index 15fc977..d2d78c9 100644 (file)
@@ -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 = '';