Merge "Indicate the actual version of HHVM in use"
[lhc/web/wiklou.git] / includes / actions / HistoryAction.php
index 63ba683..523da68 100644 (file)
@@ -105,9 +105,10 @@ class HistoryAction extends FormlessAction {
                wfProfileIn( __METHOD__ );
 
                $this->preCacheMessages();
+               $config = $this->context->getConfig();
 
                # Fill in the file cache if not set already
-               $useFileCache = $this->context->getConfig()->get( 'UseFileCache' );
+               $useFileCache = $config->get( 'UseFileCache' );
                if ( $useFileCache && HTMLFileCache::useFileCache( $this->getContext() ) ) {
                        $cache = HTMLFileCache::newFromTitle( $this->getTitle(), 'history' );
                        if ( !$cache->isCacheGood( /* Assume up to date */ ) ) {
@@ -118,6 +119,13 @@ class HistoryAction extends FormlessAction {
                // Setup page variables.
                $out->setFeedAppendQuery( 'action=history' );
                $out->addModules( 'mediawiki.action.history' );
+               if ( $config->get( 'UseMediaWikiUIEverywhere' ) ) {
+                       $out = $this->getOutput();
+                       $out->addModuleStyles( array(
+                               'mediawiki.ui.input',
+                               'mediawiki.ui.checkbox',
+                       ) );
+               }
 
                // Handle atom/RSS feeds.
                $feedType = $request->getVal( 'feed' );
@@ -476,8 +484,12 @@ class HistoryPager extends ReverseChronologicalPager {
 
                // Button container stored in $this->buttons for re-use in getEndBody()
                $this->buttons = '<div>';
+               $className = 'historysubmit mw-history-compareselectedversions-button';
+               if ( $this->getConfig()->get( 'UseMediaWikiUIEverywhere' ) ) {
+                       $className .= ' mw-ui-button mw-ui-constructive';
+               }
                $this->buttons .= $this->submitButton( $this->msg( 'compareselectedversions' )->text(),
-                       array( 'class' => 'historysubmit mw-history-compareselectedversions-button' )
+                       array( 'class' => $className )
                                + Linker::tooltipAndAccesskeyAttribs( 'compareselectedversions' )
                ) . "\n";
 
@@ -874,6 +886,7 @@ class HistoryPager extends ReverseChronologicalPager {
 
        /**
         * This is called if a write operation is possible from the generated HTML
+        * @param bool $enable
         */
        function preventClickjacking( $enable = true ) {
                $this->preventClickjacking = $enable;