From: Brion Vibber Date: Thu, 20 Dec 2007 02:40:02 +0000 (+0000) Subject: Tweak to r28390: X-Git-Tag: 1.31.0-rc.0~50333 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=d197cc8faf2c49d19628171d6f4d23cc36d76055;p=lhc%2Fweb%2Fwiklou.git Tweak to r28390: Instead of disabling the 'Compare selected revisions' button when there's only one revision, just don't show it. We don't show any radio buttons in this case either, so there's nothing to consider submitting if we wanted to; it's cleaner to just leave it out. --- diff --git a/includes/PageHistory.php b/includes/PageHistory.php index d81e7ff732..d2da47a5eb 100644 --- a/includes/PageHistory.php +++ b/includes/PageHistory.php @@ -164,16 +164,17 @@ class PageHistory { */ function submitButton( $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' ), + if ( $this->linesonpage > 1 ) { + return Xml::submitButton( wfMsg( 'compareselectedversions' ), $bits + array( 'class' => 'historysubmit', 'accesskey' => wfMsg( 'accesskey-compareselectedversions' ), 'title' => wfMsg( 'tooltip-compareselectedversions' ), ) ); + } else { + return ''; + } } /**