- $s .= '<form action="' . $wgTitle->escapeLocalURL( '-' ) . '" method="get">';
- $prefixedkey = htmlspecialchars($wgTitle->getPrefixedDbKey());
-
- // The following line is SUPPOSED to have double-quotes around the
- // $prefixedkey variable, because htmlspecialchars() doesn't escape
- // single-quotes.
- //
- // On at least two occasions people have changed it to single-quotes,
- // which creates invalid HTML and incorrect display of the resulting
- // link.
- //
- // Please do not break this a third time. Thank you for your kind
- // consideration and cooperation.
- //
- $s .= "<input type='hidden' name='title' value=\"{$prefixedkey}\" />\n";
-
- $s .= $this->submitButton();
+ if( $this->linesonpage > 1 && $wgUser->isAllowed('deleterevision') ) {
+ $revdel = SpecialPage::getTitleFor( 'Revisiondelete' );
+ $s .= Xml::openElement( 'form',
+ array(
+ 'action' => $revdel->getLocalURL( array(
+ 'type' => 'revision',
+ 'target' => $this->mTitle->getPrefixedDbKey()
+ ) ),
+ 'method' => 'post',
+ 'id' => 'mw-history-revdeleteform',
+ 'style' => 'visibility:hidden;float:right;'
+ )
+ );
+ $s .= Xml::hidden( 'ids', '', array('id'=>'revdel-oldid') );
+ $s .= Xml::submitButton( wfMsg( 'showhideselectedversions' ) );
+ $s .= Xml::closeElement( 'form' );
+ }
+ $s .= Xml::openElement( 'form', array( 'action' => $wgScript,
+ 'id' => 'mw-history-compare' ) );
+ $s .= Xml::hidden( 'title', $this->mTitle->getPrefixedDbKey() );
+ if( $wgEnableHtmlDiff ) {
+ $s .= $this->submitButton( wfMsg( 'visualcomparison'),
+ array(
+ 'name' => 'htmldiff',
+ 'class' => 'historysubmit',
+ 'accesskey' => wfMsg( 'accesskey-visualcomparison' ),
+ 'title' => wfMsg( 'tooltip-compareselectedversions' ),
+ )
+ );
+ $s .= $this->submitButton( wfMsg( 'wikicodecomparison'),
+ array(
+ 'class' => 'historysubmit',
+ 'accesskey' => wfMsg( 'accesskey-compareselectedversions' ),
+ 'title' => wfMsg( 'tooltip-compareselectedversions' ),
+ )
+ );
+ } else {
+ $s .= $this->submitButton( wfMsg( 'compareselectedversions'),
+ array(
+ 'class' => 'historysubmit',
+ 'accesskey' => wfMsg( 'accesskey-compareselectedversions' ),
+ 'title' => wfMsg( 'tooltip-compareselectedversions' ),
+ )
+ );
+ }