From b57baa047956ab92a6edd334f421a1528c501623 Mon Sep 17 00:00:00 2001 From: Bryan Davis Date: Tue, 15 Jul 2014 15:47:32 -0600 Subject: [PATCH] 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 --- includes/specials/SpecialVersion.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ) { -- 2.20.1