Move IDatabase/IMaintainableDatabase to Rdbms namespace
[lhc/web/wiklou.git] / includes / filerepo / file / LocalFile.php
index a1cb0a2..c109fba 100644 (file)
@@ -22,6 +22,7 @@
  */
 
 use \MediaWiki\Logger\LoggerFactory;
+use Wikimedia\Rdbms\IDatabase;
 
 /**
  * Class to represent a local file in the wiki's own database
@@ -391,7 +392,7 @@ class LocalFile extends File {
         * @param int $flags
         */
        function loadFromDB( $flags = 0 ) {
-               $fname = get_class( $this ) . '::' . __FUNCTION__;
+               $fname = static::class . '::' . __FUNCTION__;
 
                # Unconditionally set loaded=true, we don't want the accessors constantly rechecking
                $this->dataLoaded = true;
@@ -416,7 +417,7 @@ class LocalFile extends File {
         * This covers fields that are sometimes not cached.
         */
        protected function loadExtraFromDB() {
-               $fname = get_class( $this ) . '::' . __FUNCTION__;
+               $fname = static::class . '::' . __FUNCTION__;
 
                # Unconditionally set loaded=true, we don't want the accessors constantly rechecking
                $this->extraDataLoaded = true;
@@ -1100,7 +1101,7 @@ class LocalFile extends File {
         */
        public function nextHistoryLine() {
                # Polymorphic function name to distinguish foreign and local fetches
-               $fname = get_class( $this ) . '::' . __FUNCTION__;
+               $fname = static::class . '::' . __FUNCTION__;
 
                $dbr = $this->repo->getReplicaDB();