mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CiteThisPage
synced 2024-11-12 01:14:26 +00:00
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:
parent
af36dab9fa
commit
efbfbd44a4
3
Cite.php
3
Cite.php
|
@ -21,7 +21,8 @@ if ( ! defined( 'MEDIAWIKI' ) )
|
|||
$wgExtensionFunctions[] = 'wfCite';
|
||||
$wgExtensionCredits['parserhook'][] = array(
|
||||
'name' => 'Cite',
|
||||
'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' => 'Ævar Arnfjörð Bjarmason',
|
||||
'description' => 'Adds <nowiki><ref[ name=id]></nowiki> and <nowiki><references/></nowiki> tags, for citations', // kept for b/c
|
||||
'descriptionmsg' => 'cite_desc',
|
||||
|
|
|
@ -15,7 +15,8 @@ if (!defined('MEDIAWIKI')) die();
|
|||
|
||||
$wgExtensionCredits['specialpage'][] = array(
|
||||
'name' => 'Cite',
|
||||
'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' => 'Ævar Arnfjörð Bjarmason',
|
||||
'description' => 'adds a [[Special:Cite|citation]] special page & toolbox link', // kept for b/c
|
||||
'descriptionmsg' => 'cite_article_desc',
|
||||
|
|
Loading…
Reference in a new issue