Merge "Correct case of Title::getPrefixedDBkey() calls"
[lhc/web/wiklou.git] / includes / actions / HistoryAction.php
index a1d1c3a..2b088b4 100644 (file)
  * http://www.gnu.org/copyleft/gpl.html
  *
  * @file
+ * @ingroup Actions
  */
 
 /**
- * This class handles printing the history page for an article.  In order to
+ * This class handles printing the history page for an article. In order to
  * be efficient, it uses timestamps rather than offsets for paging, to avoid
  * costly LIMIT,offset queries.
  *
  * Construct it by passing in an Article, and call $h->history() to print the
  * history.
  *
+ * @ingroup Actions
  */
 class HistoryAction extends FormlessAction {
        const DIR_PREV = 0;
@@ -132,7 +134,7 @@ class HistoryAction extends FormlessAction {
                                array( 'delete', 'move' ),
                                $this->getTitle(),
                                '',
-                               array(  'lim' => 10,
+                               array( 'lim' => 10,
                                        'conds' => array( "log_action != 'revision'" ),
                                        'showIfEmpty' => false,
                                        'msgKey' => array( 'moveddeleted-notice' )
@@ -145,9 +147,9 @@ class HistoryAction extends FormlessAction {
                /**
                 * Add date selector to quickly get to a certain time
                 */
-               $year        = $request->getInt( 'year' );
-               $month       = $request->getInt( 'month' );
-               $tagFilter   = $request->getVal( 'tagfilter' );
+               $year = $request->getInt( 'year' );
+               $month = $request->getInt( 'month' );
+               $tagFilter = $request->getVal( 'tagfilter' );
                $tagSelector = ChangeTags::buildTagFilterSelector( $tagFilter );
 
                /**
@@ -174,7 +176,7 @@ class HistoryAction extends FormlessAction {
                                false,
                                array( 'id' => 'mw-history-search' )
                        ) .
-                       Html::hidden( 'title', $this->getTitle()->getPrefixedDBKey() ) . "\n" .
+                       Html::hidden( 'title', $this->getTitle()->getPrefixedDBkey() ) . "\n" .
                        Html::hidden( 'action', 'history' ) . "\n" .
                        Xml::dateMenu( ( $year == null ? date( "Y" ) : $year ), $month ) . ' ' .
                        ( $tagSelector ? ( implode( ' ', $tagSelector ) . ' ' ) : '' ) .
@@ -241,7 +243,7 @@ class HistoryAction extends FormlessAction {
        /**
         * Output a subscription feed listing recent edits to this page.
         *
-        * @param $type String: feed type
+        * @param string $type feed type
         */
        function feed( $type ) {
                global $wgFeedClasses, $wgFeedLimit;
@@ -331,6 +333,7 @@ class HistoryAction extends FormlessAction {
 
 /**
  * @ingroup Pager
+ * @ingroup Actions
  */
 class HistoryPager extends ReverseChronologicalPager {
        public $lastRow = false, $counter, $historyPage, $buttons, $conds;
@@ -440,7 +443,7 @@ class HistoryPager extends ReverseChronologicalPager {
                $this->getOutput()->wrapWikiMsg( "<div class='mw-history-legend'>\n$1\n</div>", 'histlegend' );
                $s = Html::openElement( 'form', array( 'action' => $wgScript,
                        'id' => 'mw-history-compare' ) ) . "\n";
-               $s .= Html::hidden( 'title', $this->getTitle()->getPrefixedDbKey() ) . "\n";
+               $s .= Html::hidden( 'title', $this->getTitle()->getPrefixedDBkey() ) . "\n";
                $s .= Html::hidden( 'action', 'historysubmit' ) . "\n";
 
                // Button container stored in $this->buttons for re-use in getEndBody()
@@ -508,14 +511,14 @@ class HistoryPager extends ReverseChronologicalPager {
        /**
         * Creates a submit button
         *
-        * @param $message String: text of the submit button, will be escaped
-        * @param $attributes Array: attributes
+        * @param string $message text of the submit button, will be escaped
+        * @param array $attributes attributes
         * @return String: HTML output for the submit button
         */
        function submitButton( $message, $attributes = array() ) {
                # Disable submit button if history has 1 revision only
                if ( $this->getNumRows() > 1 ) {
-                       return Xml::submitButton( $message , $attributes );
+                       return Xml::submitButton( $message, $attributes );
                } else {
                        return '';
                }
@@ -580,7 +583,7 @@ class HistoryPager extends ReverseChronologicalPager {
                        // Otherwise, show the link...
                        } else {
                                $query = array( 'type' => 'revision',
-                                       'target' => $this->getTitle()->getPrefixedDbkey(), 'ids' => $rev->getId() );
+                                       'target' => $this->getTitle()->getPrefixedDBkey(), 'ids' => $rev->getId() );
                                $del .= Linker::revDeleteLink( $query,
                                        $rev->isDeleted( Revision::DELETED_RESTRICTED ), false );
                        }
@@ -609,7 +612,7 @@ class HistoryPager extends ReverseChronologicalPager {
                                ? $this->parentLens[$row->rev_parent_id]
                                : 0;
                        $sDiff = ChangesList::showCharacterDifference( $prevSize, $rev->getSize() );
-                       $fSize = Linker::formatRevisionSize($rev->getSize());
+                       $fSize = Linker::formatRevisionSize( $rev->getSize() );
                        $s .= ' <span class="mw-changeslist-separator">. .</span> ' . "$fSize $sDiff";
                }
 
@@ -617,7 +620,7 @@ class HistoryPager extends ReverseChronologicalPager {
                $s2 = Linker::revComment( $rev, false, true );
 
                if ( $notificationtimestamp && ( $row->rev_timestamp >= $notificationtimestamp ) ) {
-                       $s2 .= ' <span class="updatedmarker">' .  $this->msg( 'updatedmarker' )->escaped() . '</span>';
+                       $s2 .= ' <span class="updatedmarker">' . $this->msg( 'updatedmarker' )->escaped() . '</span>';
                        $classes[] = 'mw-history-line-updated';
                }
 
@@ -671,7 +674,7 @@ class HistoryPager extends ReverseChronologicalPager {
                        $s .= ' <span class="mw-changeslist-separator">. .</span> ' . $s2;
                }
 
-               wfRunHooks( 'PageHistoryLineEnding', array( $this, &$row , &$s, &$classes ) );
+               wfRunHooks( 'PageHistoryLineEnding', array( $this, &$row, &$s, &$classes ) );
 
                $attribs = array();
                if ( $classes ) {