Index: trunk/phase3/includes/Pager.php |
— | — | @@ -1047,20 +1047,26 @@ |
1048 | 1048 | function getLimitForm() { |
1049 | 1049 | global $wgScript; |
1050 | 1050 | |
| 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() { |
1051 | 1065 | # Make the select with some explanatory text |
1052 | 1066 | $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() ) . |
1062 | 1069 | "\n<input type=\"submit\" value=\"$msgSubmit\"/>\n" . |
1063 | | - $this->getHiddenFields( array( 'limit' ) ) . |
1064 | | - "</form>\n"; |
| 1070 | + $this->getHiddenFields( array( 'limit' ) ); |
1065 | 1071 | } |
1066 | 1072 | |
1067 | 1073 | /** |
Index: trunk/extensions/CodeReview/ui/CodeRevisionListView.php |
— | — | @@ -31,13 +31,13 @@ |
32 | 32 | |
33 | 33 | // Check for batch change requests. |
34 | 34 | $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 ) ) { |
36 | 37 | $this->doBatchChange(); |
37 | 38 | return; |
38 | 39 | } |
39 | 40 | |
40 | 41 | $pathForm = $this->showForm(); |
41 | | - $wgOut->addHTML( $pathForm ); |
42 | 42 | |
43 | 43 | // Get the total count across all pages |
44 | 44 | $dbr = wfGetDB( DB_SLAVE ); |
— | — | @@ -50,20 +50,23 @@ |
51 | 51 | $wgUser->isAllowed( 'codereview-add-tag' ); |
52 | 52 | |
53 | 53 | $navBar = $pager->getNavigationBar(); |
54 | | - $limitForm = $pager->getLimitForm(); |
55 | 54 | |
| 55 | + $wgOut->addHTML( $pathForm ); |
| 56 | + |
56 | 57 | $wgOut->addHTML( |
57 | 58 | $navBar . |
58 | | - '<table><tr><td>' . $limitForm . '</td>' . |
| 59 | + '<table><tr><td>' . $pager->getLimitForm() . '</td>' . |
59 | 60 | '<td> <strong>' . wfMsgHtml( 'code-rev-total', $wgLang->formatNum( $revCount ) ) . '</strong></td>' . |
60 | 61 | '</tr></table>' . |
61 | 62 | Xml::openElement( 'form', |
62 | 63 | array( 'action' => $pager->getTitle()->getLocalURL(), 'method' => 'post' ) |
63 | 64 | ) . |
64 | 65 | $pager->getBody() . |
65 | | - $limitForm . |
| 66 | + //$pager->getLimitDropdown() . |
66 | 67 | $navBar . |
67 | | - ( $this->batchForm ? $this->buildBatchInterface( $pager ) : "" ) . |
| 68 | + ( $this->batchForm ? |
| 69 | + $this->buildBatchInterface( $pager ) |
| 70 | + : "" ) . |
68 | 71 | Xml::closeElement( 'form' ) |
69 | 72 | ); |
70 | 73 | |
— | — | @@ -175,7 +178,7 @@ |
176 | 179 | } else { |
177 | 180 | $ret .= Html::hidden( 'title', $special->getPrefixedDBKey() ) ; |
178 | 181 | } |
179 | | - $ret .= "</tr></table></fieldset>" ; |
| 182 | + $ret .= "</tr></table></fieldset></form>" ; |
180 | 183 | |
181 | 184 | return $ret; |
182 | 185 | } |
— | — | @@ -360,4 +363,3 @@ |
361 | 364 | return SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() ); |
362 | 365 | } |
363 | 366 | } |
364 | | - |