*/
public static function getVersion( $flags = '' ) {
global $wgVersion, $IP;
- wfProfileIn( __METHOD__ );
$gitInfo = self::getGitHeadSha1( $IP );
$svnInfo = self::getSvnInfo( $IP );
)->text();
}
- wfProfileOut( __METHOD__ );
-
return $version;
}
*/
public static function getVersionLinked() {
global $wgVersion;
- wfProfileIn( __METHOD__ );
$gitVersion = self::getVersionLinkedGit();
if ( $gitVersion ) {
}
}
- wfProfileOut( __METHOD__ );
-
return $v;
}
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 ) {
}
$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" );
}
}
// ... and license information; if a license file exists we
// will link to it
$licenseLink = '';
- if ( isset( $extension['license-name'] ) ) {
- $licenseLink = Linker::link(
- $this->getPageTitle( 'License/' . $extensionName ),
- $out->parseInline( $extension['license-name'] ),
- array(
- 'class' => 'mw-version-ext-license',
- 'dir' => 'auto',
- )
- );
- } elseif ( $this->getExtLicenseFileName( $extensionPath ) ) {
- $licenseLink = Linker::link(
- $this->getPageTitle( 'License/' . $extensionName ),
- $this->msg( 'version-ext-license' ),
- array(
- 'class' => 'mw-version-ext-license',
- 'dir' => 'auto',
- )
- );
+ if ( isset( $extension['name'] ) ) {
+ $licenseName = null;
+ if ( isset( $extension['license-name'] ) ) {
+ $licenseName = $out->parseInline( $extension['license-name'] );
+ } elseif ( $this->getExtLicenseFileName( $extensionPath ) ) {
+ $licenseName = $this->msg( 'version-ext-license' );
+ }
+ if ( $licenseName !== null ) {
+ $licenseLink = Linker::link(
+ $this->getPageTitle( 'License/' . $extension['name'] ),
+ $licenseName,
+ array(
+ 'class' => 'mw-version-ext-license',
+ 'dir' => 'auto',
+ )
+ );
+ }
}
// ... and generate the description; which can be a parameterized l10n message
// ... 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']}"
)
);