Merge "Revert "Made LCStoreDB try to use a separate DB connection""
[lhc/web/wiklou.git] / includes / filerepo / file / ArchivedFile.php
index 845fd71..a71acde 100644 (file)
@@ -27,7 +27,7 @@
  * @ingroup FileAbstraction
  */
 class ArchivedFile {
-       /** @var int filearchive row ID */
+       /** @var int Filearchive row ID */
        private $id;
 
        /** @var string File name */
@@ -42,7 +42,7 @@ class ArchivedFile {
        /** @var int File size in bytes */
        private $size;
 
-       /** @var int size in bytes */
+       /** @var int Size in bytes */
        private $bits;
 
        /** @var int Width */
@@ -281,6 +281,10 @@ class ArchivedFile {
         * @return string
         */
        public function getName() {
+               if ( $this->name === false ) {
+                       $this->load();
+               }
+
                return $this->name;
        }
 
@@ -379,7 +383,7 @@ class ArchivedFile {
        }
 
        /**
-        * Returns the mime type of the file.
+        * Returns the MIME type of the file.
         * @return string
         */
        public function getMimeType() {