From 2f4f6c718333612c4178c6622e301d7a8cb38bf3 Mon Sep 17 00:00:00 2001 From: Ricordisamoa Date: Tue, 6 Jan 2015 17:26:00 +0100 Subject: [PATCH] Always use the canonical extension name when necessary Items in $wgExtensionCredits can expose a 'namemsg' attribute, but it should only be used for localized strings. SpecialVersion->execute() correctly uses 'name', while commit 326f3f450ce56420090e3bb30eb9a9cccfe1816e inadvertently made getCreditsForExtension() use 'namemsg'. Same as ace5db002378ca8b3ff63a66ba5ab35267754b9f for license files. Change-Id: Ifbcecc906f41eced48493c48d4f2a85eed232551 --- includes/specials/SpecialVersion.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php index a1556dcb5b..41c69bcab8 100644 --- a/includes/specials/SpecialVersion.php +++ b/includes/specials/SpecialVersion.php @@ -734,7 +734,7 @@ class SpecialVersion extends SpecialPage { list( $vcsVersion, $vcsLink, $vcsDate ) = $cache->get( $memcKey ); if ( !$vcsVersion ) { - wfDebug( "Getting VCS info for extension $extensionName" ); + wfDebug( "Getting VCS info for extension {$extension['name']}" ); $gitInfo = new GitInfo( $extensionPath ); $vcsVersion = $gitInfo->getHeadSHA1(); if ( $vcsVersion !== false ) { @@ -750,7 +750,7 @@ class SpecialVersion extends SpecialPage { } $cache->set( $memcKey, array( $vcsVersion, $vcsLink, $vcsDate ), 60 * 60 * 24 ); } else { - wfDebug( "Pulled VCS info for extension $extensionName from cache" ); + wfDebug( "Pulled VCS info for extension {$extension['name']} from cache" ); } } @@ -837,12 +837,12 @@ class SpecialVersion extends SpecialPage { // ... now get the authors for this extension $authors = isset( $extension['author'] ) ? $extension['author'] : array(); - $authors = $this->listAuthors( $authors, $extensionName, $extensionPath ); + $authors = $this->listAuthors( $authors, $extension['name'], $extensionPath ); // Finally! Create the table $html = Html::openElement( 'tr', array( 'class' => 'mw-version-ext', - 'id' => "mw-version-ext-{$extensionName}" + 'id' => "mw-version-ext-{$extension['name']}" ) ); -- 2.20.1