r78395 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78394‎ | r78395 | r78396 >
Date:18:17, 14 December 2010
Author:reedy
Status:ok
Tags:
Comment:
Fixup fixme on r76844

Only "known issue", is the bottom limit thing posts, and won't override the top one, if it's set one in the URL, which is a PITA. 2 clicks does it. Hopefully this can be fixed, and uncommented when VVV sorts out our queryparameters? :)
Modified paths:
  • /trunk/extensions/CodeReview/ui/CodeRevisionListView.php (modified) (history)
  • /trunk/phase3/includes/Pager.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Pager.php
@@ -1047,20 +1047,26 @@
10481048 function getLimitForm() {
10491049 global $wgScript;
10501050
 1051+ return Xml::openElement(
 1052+ 'form',
 1053+ array(
 1054+ 'method' => 'get',
 1055+ 'action' => $wgScript
 1056+ ) ) . "\n" . $this->getLimitDropdown() . "</form>\n";
 1057+ }
 1058+
 1059+ /**
 1060+ * Gets a limit selection dropdown
 1061+ *
 1062+ * @return string
 1063+ */
 1064+ function getLimitDropdown() {
10511065 # Make the select with some explanatory text
10521066 $msgSubmit = wfMsgHtml( 'table_pager_limit_submit' );
1053 - return
1054 - Xml::openElement(
1055 - 'form',
1056 - array(
1057 - 'method' => 'get',
1058 - 'action' => $wgScript
1059 - )
1060 - ) . "\n" .
1061 - wfMsgHtml( 'table_pager_limit', $this->getLimitSelect() ) .
 1067+
 1068+ return wfMsgHtml( 'table_pager_limit', $this->getLimitSelect() ) .
10621069 "\n<input type=\"submit\" value=\"$msgSubmit\"/>\n" .
1063 - $this->getHiddenFields( array( 'limit' ) ) .
1064 - "</form>\n";
 1070+ $this->getHiddenFields( array( 'limit' ) );
10651071 }
10661072
10671073 /**
Index: trunk/extensions/CodeReview/ui/CodeRevisionListView.php
@@ -31,13 +31,13 @@
3232
3333 // Check for batch change requests.
3434 $editToken = $wgRequest->getVal( 'wpBatchChangeEditToken' );
35 - if ( $wgRequest->wasPosted() && $wgUser->matchEditToken( $editToken ) ) {
 35+ $revisions = $wgRequest->getArray( 'wpRevisionSelected' );
 36+ if ( $wgRequest->wasPosted() && count( $revisions ) && $wgUser->matchEditToken( $editToken ) ) {
3637 $this->doBatchChange();
3738 return;
3839 }
3940
4041 $pathForm = $this->showForm();
41 - $wgOut->addHTML( $pathForm );
4242
4343 // Get the total count across all pages
4444 $dbr = wfGetDB( DB_SLAVE );
@@ -50,20 +50,23 @@
5151 $wgUser->isAllowed( 'codereview-add-tag' );
5252
5353 $navBar = $pager->getNavigationBar();
54 - $limitForm = $pager->getLimitForm();
5554
 55+ $wgOut->addHTML( $pathForm );
 56+
5657 $wgOut->addHTML(
5758 $navBar .
58 - '<table><tr><td>' . $limitForm . '</td>' .
 59+ '<table><tr><td>' . $pager->getLimitForm() . '</td>' .
5960 '<td>&#160;<strong>' . wfMsgHtml( 'code-rev-total', $wgLang->formatNum( $revCount ) ) . '</strong></td>' .
6061 '</tr></table>' .
6162 Xml::openElement( 'form',
6263 array( 'action' => $pager->getTitle()->getLocalURL(), 'method' => 'post' )
6364 ) .
6465 $pager->getBody() .
65 - $limitForm .
 66+ //$pager->getLimitDropdown() .
6667 $navBar .
67 - ( $this->batchForm ? $this->buildBatchInterface( $pager ) : "" ) .
 68+ ( $this->batchForm ?
 69+ $this->buildBatchInterface( $pager )
 70+ : "" ) .
6871 Xml::closeElement( 'form' )
6972 );
7073
@@ -175,7 +178,7 @@
176179 } else {
177180 $ret .= Html::hidden( 'title', $special->getPrefixedDBKey() ) ;
178181 }
179 - $ret .= "</tr></table></fieldset>" ;
 182+ $ret .= "</tr></table></fieldset></form>" ;
180183
181184 return $ret;
182185 }
@@ -360,4 +363,3 @@
361364 return SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() );
362365 }
363366 }
364 -

Follow-up revisions

RevisionCommit summaryAuthorDate
r814131.17: MFT r78395, r79968, r81311, r81313, r81349, r81352, r81376, r81389, r81...catrope20:45, 2 February 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r76844Variablise limit thingyreedy23:02, 16 November 2010

Status & tagging log