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:
Nick Jenkins 2007-05-01 09:10:55 +00:00
parent 1a486d5295
commit c3df856a82

View file

@ -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;