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 9f92bd9beb
commit 5dd8ae2660

View file

@ -23,7 +23,8 @@ $wgExtensionCredits['parserhook'][] = array(
'name' => 'Poem',
'author' => array( 'Nikola Smolenski', 'Brion Vibber', 'Steve Sanbeg' ),
'url' => 'http://www.mediawiki.org/wiki/Extension:Poem',
'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$',
'description' => 'Adds <tt>&lt;poem&gt;</tt> tag for poem formatting',
'descriptionmsg' => 'poem-desc',
);