mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CiteThisPage
synced 2024-11-23 23:24:09 +00:00
Cast oldid to int to save people injecting random crap into the
oldid parameter (it was HTML escaped, but it could be used to make tidy whinge about "escaping malformed URI reference"). Also there doesn't seem to be a need to pass the integer parameters by reference, so remove that.
This commit is contained in:
parent
1a486d5295
commit
c3df856a82
|
@ -40,11 +40,11 @@ function wfSpecialCite() {
|
|||
}
|
||||
}
|
||||
|
||||
function wfSpecialCiteNav( &$skintemplate, &$nav_urls, &$oldid, &$revid ) {
|
||||
function wfSpecialCiteNav( &$skintemplate, &$nav_urls, $oldid, $revid ) {
|
||||
if ( $skintemplate->mTitle->getNamespace() === NS_MAIN && $revid !== 0 )
|
||||
$nav_urls['cite'] = array(
|
||||
'text' => wfMsg( 'cite_article_link' ),
|
||||
'href' => $skintemplate->makeSpecialUrl( 'Cite', "page=" . wfUrlencode( "{$skintemplate->thispage}" ) . "&id=$oldid" )
|
||||
'href' => $skintemplate->makeSpecialUrl( 'Cite', "page=" . wfUrlencode( "{$skintemplate->thispage}" ) . "&id=" . intval( $oldid ) )
|
||||
);
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue