Index: trunk/extensions/Translate/TranslatePage.php |
— | — | @@ -20,9 +20,7 @@ |
21 | 21 | protected $options = null; |
22 | 22 | |
23 | 23 | function __construct() { |
24 | | - wfMemIn( __METHOD__ ); |
25 | 24 | SpecialPage::SpecialPage( 'Translate' ); |
26 | | - wfMemOut( __METHOD__ ); |
27 | 25 | } |
28 | 26 | |
29 | 27 | /** |
— | — | @@ -30,7 +28,6 @@ |
31 | 29 | * GLOBALS: $wgHooks, $wgOut. |
32 | 30 | */ |
33 | 31 | public function execute( $parameters ) { |
34 | | - wfMemIn( __METHOD__ ); |
35 | 32 | wfLoadExtensionMessages( 'Translate' ); |
36 | 33 | TranslateUtils::injectCSS(); |
37 | 34 | global $wgOut, $wgTranslateBlacklist; |
— | — | @@ -64,7 +61,6 @@ |
65 | 62 | $wgOut->addHTML( $this->settingsForm( $errors ) ); |
66 | 63 | |
67 | 64 | if ( count( $errors ) ) { |
68 | | - wfMemOut( __METHOD__ ); |
69 | 65 | return; |
70 | 66 | } else { |
71 | 67 | $checks = array( |
— | — | @@ -110,11 +106,9 @@ |
111 | 107 | $wgOut->addHTML( $description . $links . $output . $links ); |
112 | 108 | } |
113 | 109 | } |
114 | | - wfMemOut( __METHOD__ ); |
115 | 110 | } |
116 | 111 | |
117 | 112 | protected function setup( $parameters ) { |
118 | | - wfMemIn( __METHOD__ ); |
119 | 113 | global $wgUser, $wgRequest; |
120 | 114 | |
121 | 115 | $defaults = array( |
— | — | @@ -163,14 +157,12 @@ |
164 | 158 | |
165 | 159 | $this->group = MessageGroups::getGroup( $this->options['group'] ); |
166 | 160 | $this->task = TranslateTasks::getTask( $this->options['task'] ); |
167 | | - wfMemOut( __METHOD__ ); |
168 | 161 | } |
169 | 162 | |
170 | 163 | /** |
171 | 164 | * GLOBALS: $wgScript |
172 | 165 | */ |
173 | 166 | protected function settingsForm( $errors ) { |
174 | | - wfMemIn( __METHOD__ ); |
175 | 167 | global $wgScript; |
176 | 168 | |
177 | 169 | $task = $this->taskSelector(); |
— | — | @@ -183,7 +175,7 @@ |
184 | 176 | $options = array(); |
185 | 177 | foreach ( array( 'task', 'group', 'language', 'limit' ) as $g ) { |
186 | 178 | $options[] = self::optionRow( |
187 | | - Xml::tags( 'label', array( 'for' => $g ), wfMsg( self::MSG . $g, 'escapenoentities' ) ), |
| 179 | + Xml::tags( 'label', array( 'for' => $g ), wfMsgExt( self::MSG . $g, 'escapenoentities' ) ), |
188 | 180 | $$g, |
189 | 181 | array_key_exists( $g, $errors ) ? $errors[$g] : null |
190 | 182 | ); |
— | — | @@ -200,7 +192,6 @@ |
201 | 193 | Xml::closeElement( 'table' ) . |
202 | 194 | Xml::closeElement( 'form' ) . |
203 | 195 | Xml::closeElement( 'fieldset' ); |
204 | | - wfMemOut( __METHOD__ ); |
205 | 196 | return $form; |
206 | 197 | } |
207 | 198 | |
— | — | @@ -217,7 +208,6 @@ |
218 | 209 | /* Selectors ahead */ |
219 | 210 | |
220 | 211 | protected function groupSelector() { |
221 | | - wfMemIn( __METHOD__ ); |
222 | 212 | $groups = MessageGroups::singleton()->getGroups(); |
223 | 213 | $selector = new HTMLSelector( 'group', 'group', $this->options['group'] ); |
224 | 214 | foreach ( $groups as $id => $class ) { |
— | — | @@ -225,18 +215,15 @@ |
226 | 216 | $selector->addOption( $class->getLabel(), $id ); |
227 | 217 | } |
228 | 218 | } |
229 | | - wfMemOut( __METHOD__ ); |
230 | 219 | return $selector->getHTML(); |
231 | 220 | } |
232 | 221 | |
233 | 222 | protected function taskSelector() { |
234 | | - wfMemIn( __METHOD__ ); |
235 | 223 | $selector = new HTMLSelector( 'task', 'task', $this->options['task'] ); |
236 | 224 | foreach ( TranslateTasks::getTasks() as $id ) { |
237 | 225 | $label = call_user_func( array( 'TranslateTask', 'labelForTask' ), $id ); |
238 | 226 | $selector->addOption( $label, $id ); |
239 | 227 | } |
240 | | - wfMemOut( __METHOD__ ); |
241 | 228 | return $selector->getHTML(); |
242 | 229 | } |
243 | 230 | |
— | — | @@ -246,32 +233,26 @@ |
247 | 234 | } |
248 | 235 | |
249 | 236 | protected function limitSelector() { |
250 | | - wfMemIn( __METHOD__ ); |
251 | 237 | global $wgLang; |
252 | 238 | $items = array( 100, 250, 500, 1000, 2500 ); |
253 | 239 | $selector = new HTMLSelector( 'limit', 'limit', $this->options['limit'] ); |
254 | 240 | foreach ( $items as $count ) { |
255 | 241 | $selector->addOption( wfMsgExt( self::MSG . 'limit-option', 'parsemag', $wgLang->formatNum( $count ) ), $count ); |
256 | 242 | } |
257 | | - wfMemOut( __METHOD__ ); |
258 | 243 | return $selector->getHTML(); |
259 | 244 | } |
260 | 245 | |
261 | 246 | private $paging = null; |
262 | 247 | public function cbAddPagingNumbers( $start, $count, $total ) { |
263 | | - wfMemIn( __METHOD__ ); |
264 | 248 | $this->paging = array( |
265 | 249 | 'start' => $start, |
266 | 250 | 'count' => $count, |
267 | 251 | 'total' => $total |
268 | 252 | ); |
269 | | - wfMemOut( __METHOD__ ); |
270 | 253 | } |
271 | 254 | |
272 | 255 | protected function doStupidLinks() { |
273 | | - wfMemIn( __METHOD__ ); |
274 | 256 | if ( $this->paging === null ) { |
275 | | - wfMemOut( __METHOD__ ); |
276 | 257 | return ''; |
277 | 258 | } |
278 | 259 | |
— | — | @@ -311,7 +292,6 @@ |
312 | 293 | $navigation = Xml::tags( 'p', null, $showing . ' ' . $navigation ); |
313 | 294 | } |
314 | 295 | |
315 | | - wfMemOut( __METHOD__ ); |
316 | 296 | return |
317 | 297 | Xml::openElement( 'fieldset' ) . |
318 | 298 | Xml::element( 'legend', null, wfMsg( self::MSG . 'navigation-legend' ) ) . |
— | — | @@ -320,7 +300,6 @@ |
321 | 301 | } |
322 | 302 | |
323 | 303 | private function makeOffsetLink( $label, $offset ) { |
324 | | - wfMemIn( __METHOD__ ); |
325 | 304 | global $wgUser; |
326 | 305 | $skin = $wgUser->getSkin(); |
327 | 306 | $link = $skin->makeLinkObj( $this->getTitle(), $label, |
— | — | @@ -329,7 +308,6 @@ |
330 | 309 | $this->nondefaults |
331 | 310 | ) |
332 | 311 | ); |
333 | | - wfMemOut( __METHOD__ ); |
334 | 312 | return $link; |
335 | 313 | } |
336 | 314 | |