Merge "RCFilters UI: Ajaxify everything"
[lhc/web/wiklou.git] / includes / page / WikiFilePage.php
index c478550..1fa4bfa 100644 (file)
@@ -205,7 +205,7 @@ class WikiFilePage extends WikiPage {
 
                /** @var LocalRepo $repo */
                $repo = $file->getRepo();
-               $dbr = $repo->getSlaveDB();
+               $dbr = $repo->getReplicaDB();
 
                $res = $dbr->select(
                        [ 'page', 'categorylinks' ],
@@ -224,4 +224,20 @@ class WikiFilePage extends WikiPage {
 
                return TitleArray::newFromResult( $res );
        }
+
+       /**
+        * @since 1.28
+        * @return string
+        */
+       public function getWikiDisplayName() {
+               return $this->getFile()->getRepo()->getDisplayName();
+       }
+
+       /**
+        * @since 1.28
+        * @return string
+        */
+       public function getSourceURL() {
+               return $this->getFile()->getDescriptionUrl();
+       }
 }