https://www.mediawiki.org/wiki/Special:Code/MediaWiki/108372

Revision: 108372
Author:   krinkle
Date:     2012-01-08 22:32:11 +0000 (Sun, 08 Jan 2012)
Log Message:
-----------
[HistoryAction] Clean up
* Don't build $s as well as $this->buttons for re-use later in getEndBody(), 
simply use it in both cases.
* Adding a css class for compareselectedversions button just like there is for 
the revisiondelete button

Modified Paths:
--------------
    trunk/phase3/includes/actions/HistoryAction.php

Modified: trunk/phase3/includes/actions/HistoryAction.php
===================================================================
--- trunk/phase3/includes/actions/HistoryAction.php     2012-01-08 22:29:56 UTC 
(rev 108371)
+++ trunk/phase3/includes/actions/HistoryAction.php     2012-01-08 22:32:11 UTC 
(rev 108372)
@@ -409,20 +409,20 @@
                $s .= Html::hidden( 'title', 
$this->getTitle()->getPrefixedDbKey() ) . "\n";
                $s .= Html::hidden( 'action', 'historysubmit' ) . "\n";
 
-               $s .= '<div>' . $this->submitButton( $this->msg( 
'compareselectedversions' )->text(),
-                       array( 'class' => 'historysubmit' ) ) . "\n";
-
+               // Button container stored in $this->buttons for re-use in 
getEndBody()
                $this->buttons = '<div>';
                $this->buttons .= $this->submitButton( $this->msg( 
'compareselectedversions' )->text(),
-                       array( 'class' => 'historysubmit' )
+                       array( 'class' => 'historysubmit 
mw-history-compareselectedversions-button' )
                                + Linker::tooltipAndAccesskeyAttribs( 
'compareselectedversions' )
                ) . "\n";
 
                if ( $this->getUser()->isAllowed( 'deleterevision' ) ) {
-                       $s .= $this->getRevisionButton( 'revisiondelete', 
'showhideselectedversions' );
+                       $this->buttons .= $this->getRevisionButton( 
'revisiondelete', 'showhideselectedversions' );
                }
                $this->buttons .= '</div>';
-               $s .= '</div><ul id="pagehistory">' . "\n";
+
+               $s .= $this->buttons;
+               $s .= '<ul id="pagehistory">' . "\n";
                return $s;
        }
 
@@ -438,7 +438,6 @@
                        ),
                        $this->msg( $msg )->text()
                ) . "\n";
-               $this->buttons .= $element;
                return $element;
        }
 


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to