Don't call preg_replace ~80 times per request. Leave the heavy lifting to Special:Version, using the new svn-revision member of $wgExtensionCredits.

This commit is contained in:
Tim Starling 2008-05-06 11:59:58 +00:00
parent 7f92292de6
commit 769130f449

View file

@ -43,7 +43,8 @@ if( !defined( 'MEDIAWIKI' ) )
$wgExtensionCredits['parserhook']['SyntaxHighlight_GeSHi'] = array( $wgExtensionCredits['parserhook']['SyntaxHighlight_GeSHi'] = array(
'name' => 'SyntaxHighlight', 'name' => 'SyntaxHighlight',
'version' => preg_replace('/^.* (\d\d\d\d-\d\d-\d\d) .*$/', '\1', '$LastChangedDate$'), #just the date of the last change 'svn-date' => '$LastChangedDate$',
'svn-revision' => '$LastChangedRevision$',
'author' => array( 'Brion Vibber', 'Tim Starling', 'Rob Church' ), 'author' => array( 'Brion Vibber', 'Tim Starling', 'Rob Church' ),
'description' => 'Provides syntax highlighting using [http://qbnz.com/highlighter/ GeSHi Highlighter]', 'description' => 'Provides syntax highlighting using [http://qbnz.com/highlighter/ GeSHi Highlighter]',
'descriptionmsg' => 'syntaxhighlight-desc', 'descriptionmsg' => 'syntaxhighlight-desc',