dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move trivially compatible tests to the unit tests suite
[lhc/web/wiklou.git]
/
includes
/
page
/
ImagePage.php
diff --git
a/includes/page/ImagePage.php
b/includes/page/ImagePage.php
index
60237ff
..
12cfe83
100644
(file)
--- a/
includes/page/ImagePage.php
+++ b/
includes/page/ImagePage.php
@@
-75,9
+75,10
@@
class ImagePage extends Article {
Hooks::run( 'ImagePageFindFile', [ $this, &$img, &$this->displayImg ] );
if ( !$img ) { // not set by hook?
Hooks::run( 'ImagePageFindFile', [ $this, &$img, &$this->displayImg ] );
if ( !$img ) { // not set by hook?
- $img = wfFindFile( $this->getTitle() );
+ $services = MediaWikiServices::getInstance();
+ $img = $services->getRepoGroup()->findFile( $this->getTitle() );
if ( !$img ) {
if ( !$img ) {
- $img =
wfLocal
File( $this->getTitle() );
+ $img =
$services->getRepoGroup()->getLocalRepo()->new
File( $this->getTitle() );
}
}
$this->mPage->setFile( $img );
}
}
$this->mPage->setFile( $img );
@@
-934,7
+935,7
@@
EOT
) . "\n"
);
) . "\n"
);
- }
;
+ }
$out->addHTML( Html::closeElement( 'ul' ) . "\n" );
$res->free();
$out->addHTML( Html::closeElement( 'ul' ) . "\n" );
$res->free();
@@
-961,7
+962,7
@@
EOT
$out->addHTML( "<ul class='mw-imagepage-duplicates'>\n" );
/**
$out->addHTML( "<ul class='mw-imagepage-duplicates'>\n" );
/**
- * @var
$file F
ile
+ * @var
File $f
ile
*/
foreach ( $dupes as $file ) {
$fromSrc = '';
*/
foreach ( $dupes as $file ) {
$fromSrc = '';
@@
-1222,7
+1223,7
@@
EOT
* @return TitleArray|Title[]
*/
public function getForeignCategories() {
* @return TitleArray|Title[]
*/
public function getForeignCategories() {
- $this->mPage->getForeignCategories();
+
return
$this->mPage->getForeignCategories();
}
}
}
}