* (bug 12145) Add localized names of kk-variants
* (bug 12259) Localize the numbers in deleted pages on the sysop view
* Set proper page title for successful file deletion
+* (bug 11221) Do not show 'Compare selected versions' button for a history page
+ with one revision only
== Parser changes in 1.12 ==
wfProfileOut( $fname );
}
- /** @todo document */
+ /**
+ * Creates begin of history list with a submit button
+ *
+ * @return string HTML output
+ */
function beginHistoryList() {
global $wgTitle;
$this->lastdate = '';
return $s;
}
- /** @todo document */
+ /**
+ * Creates end of history list with a submit button
+ *
+ * @return string HTML output
+ */
function endHistoryList() {
$s = '</ul>';
$s .= $this->submitButton( array( 'id' => 'historysubmit' ) );
return $s;
}
- /** @todo document */
+ /**
+ * Creates a submit button
+ *
+ * @param array $bits optional CSS ID
+ * @return string HTML output for the submit button
+ */
function submitButton( $bits = array() ) {
- return ( $this->linesonpage > 0 )
- ? wfElement( 'input', array_merge( $bits,
- array(
+ # Disable submit button if history has 1 revision only
+ if ( $this->linesonpage == 1 ) {
+ $bits = $bits + array( 'disabled' => 'disabled' );
+ }
+ return Xml::submitButton( wfMsg( 'compareselectedversions' ),
+ $bits + array(
'class' => 'historysubmit',
- 'type' => 'submit',
'accesskey' => wfMsg( 'accesskey-compareselectedversions' ),
- 'title' => wfMsg( 'tooltip-compareselectedversions' ).' ['.wfMsg( 'accesskey-compareselectedversions' ).']',
- 'value' => wfMsg( 'compareselectedversions' ),
- ) ) )
- : '';
+ 'title' => wfMsg( 'tooltip-compareselectedversions' ),
+ )
+ );
}
/**