From 769130f4496d460bb218d13328f7b0dbd870b658 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Tue, 6 May 2008 11:59:58 +0000 Subject: [PATCH] Don't call preg_replace ~80 times per request. Leave the heavy lifting to Special:Version, using the new svn-revision member of $wgExtensionCredits. --- SyntaxHighlight_GeSHi.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SyntaxHighlight_GeSHi.php b/SyntaxHighlight_GeSHi.php index 9cc26745..82b3cf56 100644 --- a/SyntaxHighlight_GeSHi.php +++ b/SyntaxHighlight_GeSHi.php @@ -43,7 +43,8 @@ if( !defined( 'MEDIAWIKI' ) ) $wgExtensionCredits['parserhook']['SyntaxHighlight_GeSHi'] = array( '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' ), 'description' => 'Provides syntax highlighting using [http://qbnz.com/highlighter/ GeSHi Highlighter]', 'descriptionmsg' => 'syntaxhighlight-desc',