From: Bryan Davis Date: Tue, 15 Jul 2014 21:47:32 +0000 (-0600) Subject: Populate $extensionPath if isset( $extension['path'] ) X-Git-Tag: 1.31.0-rc.0~14934 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=b57baa047956ab92a6edd334f421a1528c501623;p=lhc%2Fweb%2Fwiklou.git Populate $extensionPath if isset( $extension['path'] ) $extensionPath is initialized to null and then only set when no cached vcs information was found. Instead set it to the proper value as soon as we know that $extension['path'] exists. This will fix display of license file links for most extensions. Change-Id: I93bfedf3ae0cb7e6f9e077aa1d83906f7a3283b2 --- diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php index a857da4af2..28ad0f4f88 100644 --- a/includes/specials/SpecialVersion.php +++ b/includes/specials/SpecialVersion.php @@ -650,6 +650,7 @@ class SpecialVersion extends SpecialPage { if ( isset( $extension['path'] ) ) { global $IP; + $extensionPath = dirname( $extension['path'] ); if ( $this->coreId == '' ) { wfDebug( 'Looking up core head id' ); $coreHeadSHA1 = self::getGitHeadSha1( $IP ); @@ -668,7 +669,6 @@ class SpecialVersion extends SpecialPage { if ( !$vcsVersion ) { wfDebug( "Getting VCS info for extension $extensionName" ); - $extensionPath = dirname( $extension['path'] ); $gitInfo = new GitInfo( $extensionPath ); $vcsVersion = $gitInfo->getHeadSHA1(); if ( $vcsVersion !== false ) {