Index: trunk/phase3/includes/LogEventsList.php |
— | — | @@ -85,7 +85,7 @@ |
86 | 86 | $this->getUserInput( $user ) . "\n" . |
87 | 87 | $this->getTitleInput( $page ) . "\n" . |
88 | 88 | ( !$wgMiserMode ? ($this->getTitlePattern( $pattern )."\n") : "" ) . |
89 | | - "<p>" . $this->getDateMenu( $year, $month ) . "\n" . |
| 89 | + "<p>" . Xml::dateMenu( $year, $month ) . "\n" . |
90 | 90 | ( $tagSelector ? Xml::tags( 'p', null, implode( ' ', $tagSelector ) ) :'' ). "\n" . |
91 | 91 | ( $filter ? "</p><p>".$this->getFilterLinks( $type, $filter )."\n" : "" ) . "\n" . |
92 | 92 | Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . "</p>\n" . |
— | — | @@ -181,15 +181,6 @@ |
182 | 182 | } |
183 | 183 | |
184 | 184 | /** |
185 | | - * @param $year Integer |
186 | | - * @param $month Integer |
187 | | - * @return string Formatted HTML |
188 | | - */ |
189 | | - private function getDateMenu( $year, $month ) { |
190 | | - return Xml::dateMenu( $year, $month ); |
191 | | - } |
192 | | - |
193 | | - /** |
194 | 185 | * @return boolean Checkbox |
195 | 186 | */ |
196 | 187 | private function getTitlePattern( $pattern ) { |
— | — | @@ -504,7 +495,7 @@ |
505 | 496 | |
506 | 497 | $this->mLogEventsList = $list; |
507 | 498 | |
508 | | - $this->limitType( $type ); // excludes hidden types too |
| 499 | + $this->limitType( $type ); // also excludes hidden types |
509 | 500 | $this->limitUser( $user ); |
510 | 501 | $this->limitTitle( $title, $pattern ); |
511 | 502 | $this->getDateCond( $year, $month ); |
Index: trunk/phase3/includes/PageHistory.php |
— | — | @@ -123,7 +123,7 @@ |
124 | 124 | Xml::fieldset( wfMsg( 'history-fieldset-title' ), false, array( 'id' => 'mw-history-search' ) ) . |
125 | 125 | Xml::hidden( 'title', $this->mTitle->getPrefixedDBKey() ) . "\n" . |
126 | 126 | Xml::hidden( 'action', 'history' ) . "\n" . |
127 | | - $this->getDateMenu( $year, $month ) . ' ' . |
| 127 | + xml::dateMenu( $year, $month ) . ' ' . |
128 | 128 | ( $tagSelector ? ( implode( ' ', $tagSelector ) . ' ' ) : '' ) . |
129 | 129 | Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . "\n" . |
130 | 130 | '</fieldset></form>' |
— | — | @@ -148,37 +148,6 @@ |
149 | 149 | } |
150 | 150 | |
151 | 151 | /** |
152 | | - * @return string Formatted HTML |
153 | | - * @param int $year |
154 | | - * @param int $month |
155 | | - */ |
156 | | - private function getDateMenu( $year, $month ) { |
157 | | - # Offset overrides year/month selection |
158 | | - if( $month && $month !== -1 ) { |
159 | | - $encMonth = intval( $month ); |
160 | | - } else { |
161 | | - $encMonth = ''; |
162 | | - } |
163 | | - if( $year ) { |
164 | | - $encYear = intval( $year ); |
165 | | - } else if( $encMonth ) { |
166 | | - $thisMonth = intval( gmdate( 'n' ) ); |
167 | | - $thisYear = intval( gmdate( 'Y' ) ); |
168 | | - if( intval($encMonth) > $thisMonth ) { |
169 | | - $thisYear--; |
170 | | - } |
171 | | - $encYear = $thisYear; |
172 | | - } else { |
173 | | - $encYear = ''; |
174 | | - } |
175 | | - return Xml::label( wfMsg( 'year' ), 'year' ) . ' '. |
176 | | - Xml::input( 'year', 4, $encYear, array('id' => 'year', 'maxlength' => 4) ) . |
177 | | - ' '. |
178 | | - Xml::label( wfMsg( 'month' ), 'month' ) . ' '. |
179 | | - Xml::monthSelector( $encMonth, -1 ); |
180 | | - } |
181 | | - |
182 | | - /** |
183 | 152 | * Creates begin of history list with a submit button |
184 | 153 | * |
185 | 154 | * @return string HTML output |