API: Clean up uncaught exception backtrace output
[lhc/web/wiklou.git] / includes / actions / HistoryAction.php
index 99006ed..6ee5d2c 100644 (file)
@@ -181,10 +181,6 @@ class HistoryAction extends FormlessAction {
 
                // Add the general form
                $action = htmlspecialchars( wfScript() );
-               $className = 'historysubmit mw-history-compareselectedversions-button';
-               if ( $config->get( 'UseMediaWikiUIEverywhere' ) ) {
-                       $className .= ' mw-ui-button mw-ui-progressive';
-               }
                $out->addHTML(
                        "<form action=\"$action\" method=\"get\" id=\"mw-history-searchform\">" .
                        Xml::fieldset(
@@ -200,14 +196,15 @@ class HistoryAction extends FormlessAction {
                        ) . '&#160;' .
                        ( $tagSelector ? ( implode( '&#160;', $tagSelector ) . '&#160;' ) : '' ) .
                        $checkDeleted .
-                       Xml::submitButton(
+                       Html::submitButton(
                                $this->msg( 'allpagessubmit' )->text(),
-                               array( 'class' => $className )
+                               array(),
+                               array( 'mw-ui-progressive' )
                        ) . "\n" .
                        '</fieldset></form>'
                );
 
-               wfRunHooks( 'PageHistoryBeforeList', array( &$this->page, $this->getContext() ) );
+               Hooks::run( 'PageHistoryBeforeList', array( &$this->page, $this->getContext() ) );
 
                // Create and output the list.
                $pager = new HistoryPager( $this, $year, $month, $tagFilter, $conds );
@@ -423,7 +420,7 @@ class HistoryPager extends ReverseChronologicalPager {
                        $queryInfo['options'],
                        $this->tagFilter
                );
-               wfRunHooks( 'PageHistoryPager::getQueryInfo', array( &$this, &$queryInfo ) );
+               Hooks::run( 'PageHistoryPager::getQueryInfo', array( &$this, &$queryInfo ) );
 
                return $queryInfo;
        }
@@ -492,12 +489,10 @@ 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';
-               }
+               $attrs = array( 'class' => $className )
+                       + Linker::tooltipAndAccesskeyAttribs( 'compareselectedversions' );
                $this->buttons .= $this->submitButton( $this->msg( 'compareselectedversions' )->text(),
-                       array( 'class' => $className )
-                               + Linker::tooltipAndAccesskeyAttribs( 'compareselectedversions' )
+                       $attrs
                ) . "\n";
 
                if ( $this->getUser()->isAllowed( 'deleterevision' ) ) {
@@ -568,7 +563,7 @@ class HistoryPager extends ReverseChronologicalPager {
        function submitButton( $message, $attributes = array() ) {
                # Disable submit button if history has 1 revision only
                if ( $this->getNumRows() > 1 ) {
-                       return Xml::submitButton( $message, $attributes );
+                       return Html::submitButton( $message, $attributes );
                } else {
                        return '';
                }
@@ -715,7 +710,7 @@ class HistoryPager extends ReverseChronologicalPager {
                        }
                }
                // Allow extension to add their own links here
-               wfRunHooks( 'HistoryRevisionTools', array( $rev, &$tools ) );
+               Hooks::run( 'HistoryRevisionTools', array( $rev, &$tools ) );
 
                if ( $tools ) {
                        $s2 .= ' ' . $this->msg( 'parentheses' )->rawParams( $lang->pipeList( $tools ) )->escaped();
@@ -733,7 +728,7 @@ class HistoryPager extends ReverseChronologicalPager {
                        $s .= ' <span class="mw-changeslist-separator">. .</span> ' . $s2;
                }
 
-               wfRunHooks( 'PageHistoryLineEnding', array( $this, &$row, &$s, &$classes ) );
+               Hooks::run( 'PageHistoryLineEnding', array( $this, &$row, &$s, &$classes ) );
 
                $attribs = array();
                if ( $classes ) {