From d197cc8faf2c49d19628171d6f4d23cc36d76055 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 20 Dec 2007 02:40:02 +0000 Subject: [PATCH] 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. --- includes/PageHistory.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 ''; + } } /** -- 2.20.1