Always use the canonical extension name when necessary
authorRicordisamoa <ricordisamoa@openmailbox.org>
Tue, 6 Jan 2015 16:26:00 +0000 (17:26 +0100)
committerRicordisamoa <ricordisamoa@openmailbox.org>
Tue, 6 Jan 2015 18:40:07 +0000 (19:40 +0100)
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

index a1556dc..41c69bc 100644 (file)
@@ -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']}"
                        )
                );