X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2FLinker.php;h=864019dcc709164fe5a05425f9e343db61cdb2a3;hb=7afced64454ad30d688540f7626448ac2faefebb;hp=e748b3a045867cd3198f9a29513d5d60e49c0e48;hpb=4cc031607c9b8e17265e51372b94399399254966;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Linker.php b/includes/Linker.php index e748b3a045..864019dcc7 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -21,7 +21,7 @@ */ use MediaWiki\Linker\LinkTarget; use MediaWiki\MediaWikiServices; -use MediaWiki\Storage\RevisionRecord; +use MediaWiki\Revision\RevisionRecord; /** * Some internal bits split of from Skin.php. These functions are used @@ -688,13 +688,14 @@ class Linker { if ( $label == '' ) { $label = $title->getPrefixedText(); } + $repoGroup = MediaWikiServices::getInstance()->getRepoGroup(); $currentExists = $time - && MediaWikiServices::getInstance()->getRepoGroup()->findFile( $title ) !== false; + && $repoGroup->findFile( $title ) !== false; if ( ( $wgUploadMissingFileUrl || $wgUploadNavigationUrl || $wgEnableUploads ) && !$currentExists ) { - if ( RepoGroup::singleton()->getLocalRepo()->checkRedirect( $title ) ) { + if ( $repoGroup->getLocalRepo()->checkRedirect( $title ) ) { // We already know it's a redirect, so mark it accordingly return self::link( $title, @@ -890,7 +891,7 @@ class Linker { * Make user link (or user contributions for unregistered users) * @param int $userId User id in database. * @param string $userName User name in database. - * @param string $altUserName Text to display instead of the user name (optional) + * @param string|false $altUserName Text to display instead of the user name (optional) * @return string HTML fragment * @since 1.16.3. $altUserName was added in 1.19. */ @@ -1911,7 +1912,7 @@ class Linker { * @since 1.16.3. $context added in 1.20. $editCount added in 1.21 * @param Revision $rev * @param IContextSource|null $context Context to use or null for the main context. - * @param int $editCount Number of edits that would be reverted + * @param int|false $editCount Number of edits that would be reverted * @return string HTML fragment */ public static function buildRollbackLink( $rev, IContextSource $context = null,