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
Merge "mediawiki.api.watch: Use formatversion=2 for API requests"
[lhc/web/wiklou.git]
/
includes
/
specials
/
SpecialVersion.php
diff --git
a/includes/specials/SpecialVersion.php
b/includes/specials/SpecialVersion.php
index
c8b85ae
..
272f074
100644
(file)
--- a/
includes/specials/SpecialVersion.php
+++ b/
includes/specials/SpecialVersion.php
@@
-633,7
+633,7
@@
class SpecialVersion extends SpecialPage {
usort( $wgExtensionCredits[$type], [ $this, 'compare' ] );
foreach ( $wgExtensionCredits[$type] as $extension ) {
usort( $wgExtensionCredits[$type], [ $this, 'compare' ] );
foreach ( $wgExtensionCredits[$type] as $extension ) {
- $out .= $this->getCreditsForExtension( $extension );
+ $out .= $this->getCreditsForExtension( $
type, $
extension );
}
}
}
}
@@
-669,11
+669,12
@@
class SpecialVersion extends SpecialPage {
* - Description of extension (descriptionmsg or description)
* - List of authors (author) and link to a ((AUTHORS)|(CREDITS))(\.txt)? file if it exists
*
* - Description of extension (descriptionmsg or description)
* - List of authors (author) and link to a ((AUTHORS)|(CREDITS))(\.txt)? file if it exists
*
+ * @param string $type Category name of the extension
* @param array $extension
*
* @return string Raw HTML
*/
* @param array $extension
*
* @return string Raw HTML
*/
- public function getCreditsForExtension( array $extension ) {
+ public function getCreditsForExtension(
$type,
array $extension ) {
$out = $this->getOutput();
// We must obtain the information for all the bits and pieces!
$out = $this->getOutput();
// We must obtain the information for all the bits and pieces!
@@
-784,12
+785,12
@@
class SpecialVersion extends SpecialPage {
if ( isset( $extension['name'] ) ) {
$licenseName = null;
if ( isset( $extension['license-name'] ) ) {
if ( isset( $extension['name'] ) ) {
$licenseName = null;
if ( isset( $extension['license-name'] ) ) {
- $licenseName =
$out->parseInline( $extension['license-name']
);
+ $licenseName =
new HtmlArmor( $out->parseInline( $extension['license-name'] )
);
} elseif ( $this->getExtLicenseFileName( $extensionPath ) ) {
} elseif ( $this->getExtLicenseFileName( $extensionPath ) ) {
- $licenseName = $this->msg( 'version-ext-license' )->
escaped
();
+ $licenseName = $this->msg( 'version-ext-license' )->
text
();
}
if ( $licenseName !== null ) {
}
if ( $licenseName !== null ) {
- $licenseLink =
Linker::l
ink(
+ $licenseLink =
$this->getLinkRenderer()->makeL
ink(
$this->getPageTitle( 'License/' . $extension['name'] ),
$licenseName,
[
$this->getPageTitle( 'License/' . $extension['name'] ),
$licenseName,
[
@@
-830,7
+831,7
@@
class SpecialVersion extends SpecialPage {
// Finally! Create the table
$html = Html::openElement( 'tr', [
'class' => 'mw-version-ext',
// Finally! Create the table
$html = Html::openElement( 'tr', [
'class' => 'mw-version-ext',
- 'id' => Sanitizer::escapeId( 'mw-version-ext-' . $extension['name'] )
+ 'id' => Sanitizer::escapeId( 'mw-version-ext-' . $
type . '-' . $
extension['name'] )
]
);
]
);
@@
-955,6
+956,7
@@
class SpecialVersion extends SpecialPage {
*/
public function listAuthors( $authors, $extName, $extDir ) {
$hasOthers = false;
*/
public function listAuthors( $authors, $extName, $extDir ) {
$hasOthers = false;
+ $linkRenderer = $this->getLinkRenderer();
$list = [];
foreach ( (array)$authors as $item ) {
$list = [];
foreach ( (array)$authors as $item ) {
@@
-962,9
+964,9
@@
class SpecialVersion extends SpecialPage {
$hasOthers = true;
if ( $extName && $this->getExtAuthorsFileName( $extDir ) ) {
$hasOthers = true;
if ( $extName && $this->getExtAuthorsFileName( $extDir ) ) {
- $text =
Linker::l
ink(
+ $text =
$linkRenderer->makeL
ink(
$this->getPageTitle( "Credits/$extName" ),
$this->getPageTitle( "Credits/$extName" ),
- $this->msg( 'version-poweredby-others' )->
escaped
()
+ $this->msg( 'version-poweredby-others' )->
text
()
);
} else {
$text = $this->msg( 'version-poweredby-others' )->escaped();
);
} else {
$text = $this->msg( 'version-poweredby-others' )->escaped();
@@
-981,9
+983,9
@@
class SpecialVersion extends SpecialPage {
}
if ( $extName && !$hasOthers && $this->getExtAuthorsFileName( $extDir ) ) {
}
if ( $extName && !$hasOthers && $this->getExtAuthorsFileName( $extDir ) ) {
- $list[] = $text =
Linker::l
ink(
+ $list[] = $text =
$linkRenderer->makeL
ink(
$this->getPageTitle( "Credits/$extName" ),
$this->getPageTitle( "Credits/$extName" ),
- $this->msg( 'version-poweredby-others' )->
escaped
()
+ $this->msg( 'version-poweredby-others' )->
text
()
);
}
);
}