Merge "Add method parameter type documentation"
[lhc/web/wiklou.git] / includes / filerepo / FileRepo.php
index aa41135..1195d5f 100644 (file)
@@ -965,7 +965,7 @@ class FileRepo {
        public function storeTemp( $originalName, $srcPath ) {
                $this->assertWritableRepo(); // fail out if read-only
 
-               $date = gmdate( "YmdHis" );
+               $date = MWTimestamp::getInstance()->format( 'YmdHis' );
                $hashPath = $this->getHashPath( $originalName );
                $dstUrlRel = $hashPath . $date . '!' . rawurlencode( $originalName );
                $virtualUrl = $this->getVirtualUrl( 'temp' ) . '/' . $dstUrlRel;
@@ -1564,7 +1564,7 @@ class FileRepo {
        public function newFatal( $message /*, parameters...*/ ) {
                $params = func_get_args();
                array_unshift( $params, $this );
-               return MWInit::callStaticMethod( 'FileRepoStatus', 'newFatal', $params );
+               return call_user_func_array( array( 'FileRepoStatus', 'newFatal' ), $params );
        }
 
        /**
@@ -1716,6 +1716,22 @@ class FileRepo {
         * @throws MWException
         */
        protected function assertWritableRepo() {}
+
+
+       /**
+        * Return information about the repository.
+        *
+        * @return array
+        * @since 1.22
+        */
+       public function getInfo() {
+               return array(
+                       'name' => $this->getName(),
+                       'displayname' => $this->getDisplayName(),
+                       'rootUrl' => $this->getRootUrl(),
+                       'local' => $this->isLocal(),
+               );
+       }
 }
 
 /**