Index: trunk/extensions/WikiLove/WikiLove.local.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * Custom ResourceLoader module that loads a custom WikiLove.js per-wiki. |
5 | 5 | */ |
6 | 6 | class WikiLoveLocal extends ResourceLoaderWikiModule { |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | 'MediaWiki:WikiLove.js' => array( 'type' => 'script' ), |
10 | 10 | ); |
11 | 11 | } |
12 | | - |
| 12 | + |
13 | 13 | public function getMessages() { |
14 | 14 | global $wgWikiLoveOptionMessages; |
15 | 15 | return $wgWikiLoveOptionMessages; |
Index: trunk/extensions/LiquidThreads/api/ApiFeedLQTThreads.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * This program is free software; you can redistribute it and/or modify |
5 | 5 | * it under the terms of the GNU General Public License as published by |
6 | 6 | * the Free Software Foundation; either version 2 of the License, or |
Index: trunk/extensions/ProofreadPage/ApiQueryProofread.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * Created on August 8, 2011 |
5 | 5 | * |
6 | 6 | * API module for MediaWiki's Proofread extension |
— | — | @@ -72,7 +72,7 @@ |
73 | 73 | if ( !isset( $qualityLevels[ $title ] ) ) { |
74 | 74 | continue; |
75 | 75 | } |
76 | | - |
| 76 | + |
77 | 77 | $pageQuality = $qualityLevels[ $title ]; |
78 | 78 | $val = array( 'quality' => $pageQuality, 'quality_text' => $qualityText[ $pageQuality ] ); |
79 | 79 | $result->addValue( array( 'query', 'pages', $pageid ), 'proofread', $val ); |
Index: trunk/extensions/PrefSwitch/PrefSwitch.classes.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * Classes for PrefSwitch extension |
5 | 5 | * |
6 | 6 | * @file |
— | — | @@ -7,9 +7,9 @@ |
8 | 8 | */ |
9 | 9 | |
10 | 10 | class PrefSwitchSurvey { |
11 | | - |
| 11 | + |
12 | 12 | /* Private Static Members */ |
13 | | - |
| 13 | + |
14 | 14 | // Correlation between names of field types and implementation classes |
15 | 15 | protected static $fieldTypes = array( |
16 | 16 | 'select' => 'PrefSwitchSurveyFieldSelect', |
— | — | @@ -20,9 +20,9 @@ |
21 | 21 | 'text' => 'PrefSwitchSurveyFieldText', |
22 | 22 | 'smallinput' => 'PrefSwitchSurveyFieldSmallInput', |
23 | 23 | ); |
24 | | - |
| 24 | + |
25 | 25 | /* Static Methods */ |
26 | | - |
| 26 | + |
27 | 27 | /** |
28 | 28 | * Render the HTML for a survey. |
29 | 29 | * @param $name string Survey name |
— | — | @@ -57,7 +57,7 @@ |
58 | 58 | $html .= Xml::closeElement( 'dl' ); |
59 | 59 | return $html; |
60 | 60 | } |
61 | | - |
| 61 | + |
62 | 62 | /** |
63 | 63 | * Save a survey to the database |
64 | 64 | * @param $name string Survey name |
— | — | @@ -85,10 +85,10 @@ |
86 | 86 | } |
87 | 87 | } |
88 | 88 | } |
89 | | -interface PrefSwitchSurveyField { |
| 89 | +interface PrefSwitchSurveyField { |
90 | 90 | |
91 | 91 | /* Static Methods */ |
92 | | - |
| 92 | + |
93 | 93 | /** |
94 | 94 | * Render the HTML for a question |
95 | 95 | * @param $question string Question ID |
— | — | @@ -98,7 +98,7 @@ |
99 | 99 | * @return string HTML |
100 | 100 | */ |
101 | 101 | public static function render( $question, $config, $answer, $answerData ); |
102 | | - |
| 102 | + |
103 | 103 | /** |
104 | 104 | * Get values to insert into the database for a question |
105 | 105 | * @param $question Question ID |
— | — | @@ -142,7 +142,7 @@ |
143 | 143 | $html .= Xml::closeElement( 'dd' ); |
144 | 144 | return $html; |
145 | 145 | } |
146 | | - |
| 146 | + |
147 | 147 | public static function save( $question, $request ) { |
148 | 148 | $answer = $request->getVal( "prefswitch-survey-{$question}", '' ); |
149 | 149 | switch ( $answer ) { |
Index: trunk/extensions/FlaggedRevs/api/actions/ApiReview.php |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | | -/* |
| 4 | +/** |
5 | 5 | * Created on Dec 20, 2008 |
6 | 6 | * |
7 | 7 | * API module for MediaWiki's FlaggedRevs extension |
— | — | @@ -132,14 +132,14 @@ |
133 | 133 | $this->dieUsage( "Provided page is not reviewable.", 'notreviewable' ); |
134 | 134 | } elseif ( $status === 'review_page_notexists' ) { |
135 | 135 | $this->dieUsage( "Provided page does not exist.", 'notarget' ); |
136 | | - } |
| 136 | + } |
137 | 137 | } |
138 | 138 | } |
139 | 139 | |
140 | 140 | public function mustBePosted() { |
141 | 141 | return true; |
142 | 142 | } |
143 | | - |
| 143 | + |
144 | 144 | public function isWriteMode() { |
145 | 145 | return true; |
146 | 146 | } |
Index: trunk/extensions/FlaggedRevs/api/actions/ApiStabilize.php |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | | -/* |
| 4 | +/** |
5 | 5 | * Created on Sep 19, 2009 |
6 | 6 | * |
7 | 7 | * API module for MediaWiki's FlaggedRevs extension |
Index: trunk/extensions/FlaggedRevs/api/actions/ApiReviewActivity.php |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | | -/* |
| 4 | +/** |
5 | 5 | * Created on June 13, 2011 |
6 | 6 | * |
7 | 7 | * API module for MediaWiki's FlaggedRevs extension |
Index: trunk/extensions/FlaggedRevs/api/reports/ApiFlagConfig.php |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | | -/* |
| 4 | +/** |
5 | 5 | * Created on November 6, 2009 |
6 | 6 | * |
7 | 7 | * API module for MediaWiki's FlaggedRevs extension |
— | — | @@ -50,7 +50,7 @@ |
51 | 51 | public function mustBePosted() { |
52 | 52 | return false; |
53 | 53 | } |
54 | | - |
| 54 | + |
55 | 55 | public function isWriteMode() { |
56 | 56 | return false; |
57 | 57 | } |
— | — | @@ -58,7 +58,7 @@ |
59 | 59 | public function getAllowedParams() { |
60 | 60 | return array(); |
61 | 61 | } |
62 | | - |
| 62 | + |
63 | 63 | public function getParamDescription() { |
64 | 64 | return array(); |
65 | 65 | } |
— | — | @@ -79,7 +79,7 @@ |
80 | 80 | public function getExamples() { |
81 | 81 | return 'api.php?action=flagconfig'; |
82 | 82 | } |
83 | | - |
| 83 | + |
84 | 84 | public function getVersion() { |
85 | 85 | return __CLASS__ . ': $Id$'; |
86 | 86 | } |
Index: trunk/extensions/FlaggedRevs/api/reports/ApiQueryFlagged.php |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | | -/* |
| 4 | +/** |
5 | 5 | * Created on Sep 17, 2008 |
6 | 6 | * |
7 | 7 | * API module for MediaWiki's FlaggedRevs extension |
— | — | @@ -34,7 +34,7 @@ |
35 | 35 | if ( !$pageids ) { |
36 | 36 | return true; |
37 | 37 | } |
38 | | - |
| 38 | + |
39 | 39 | // Construct SQL Query |
40 | 40 | $this->addTables( 'flaggedpages' ); |
41 | 41 | $this->addFields( array( |
— | — | @@ -82,7 +82,7 @@ |
83 | 83 | 'api.php?action=query&generator=allpages&gapfrom=K&prop=flagged' |
84 | 84 | ); |
85 | 85 | } |
86 | | - |
| 86 | + |
87 | 87 | public function getVersion() { |
88 | 88 | return __CLASS__ . ': $Id$'; |
89 | 89 | } |
Index: trunk/extensions/FlaggedRevs/api/reports/ApiQueryOldreviewedpages.php |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | | -/* |
| 4 | +/** |
5 | 5 | * Created on Sep 17, 2008 |
6 | 6 | * |
7 | 7 | * API module for MediaWiki's FlaggedRevs extension |
— | — | @@ -240,7 +240,7 @@ |
241 | 241 | ' api.php?action=query&generator=oldreviewedpages&gorlimit=4&prop=info', |
242 | 242 | ); |
243 | 243 | } |
244 | | - |
| 244 | + |
245 | 245 | public function getVersion() { |
246 | 246 | return __CLASS__ . ': $Id$'; |
247 | 247 | } |
Index: trunk/extensions/FlaggedRevs/api/reports/ApiQueryReviewedpages.php |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | | -/* |
| 4 | +/** |
5 | 5 | * Created on June 29, 2009 |
6 | 6 | * |
7 | 7 | * API module for MediaWiki's FlaggedRevs extension |
— | — | @@ -198,7 +198,7 @@ |
199 | 199 | ' api.php?action=query&generator=reviewedpages&grplimit=4&prop=info', |
200 | 200 | ); |
201 | 201 | } |
202 | | - |
| 202 | + |
203 | 203 | public function getVersion() { |
204 | 204 | return __CLASS__ . ': $Id$'; |
205 | 205 | } |
Index: trunk/extensions/FlaggedRevs/api/reports/ApiQueryUnreviewedpages.php |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | | -/* |
| 4 | +/** |
5 | 5 | * Created on June 29, 2009 |
6 | 6 | * |
7 | 7 | * API module for MediaWiki's FlaggedRevs extension |
— | — | @@ -182,7 +182,7 @@ |
183 | 183 | ' api.php?action=query&generator=unreviewedpages&urnamespace=0&gurlimit=4&prop=info', |
184 | 184 | ); |
185 | 185 | } |
186 | | - |
| 186 | + |
187 | 187 | public function getVersion() { |
188 | 188 | return __CLASS__ . ': $Id$'; |
189 | 189 | } |
Index: trunk/extensions/FlaggedRevs/api/reports/ApiQueryConfiguredPages.php |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | | -/* |
| 4 | +/** |
5 | 5 | * Created on April 8, 2011 |
6 | 6 | * |
7 | 7 | * API module for MediaWiki's FlaggedRevs extension |
Index: trunk/extensions/Collection/Collection.php |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | | -/* |
| 4 | +/** |
5 | 5 | * Collection Extension for MediaWiki |
6 | 6 | * |
7 | 7 | * Copyright (C) PediaPress GmbH |
Index: trunk/extensions/Collection/Collection.suggest.php |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | | -/* |
| 4 | +/** |
5 | 5 | * Collection Extension for MediaWiki |
6 | 6 | * |
7 | 7 | * Copyright (C) 2008-2009, PediaPress GmbH |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | * http://www.gnu.org/copyleft/gpl.html |
23 | 23 | */ |
24 | 24 | |
25 | | -/* |
| 25 | +/** |
26 | 26 | * Class: CollectionSuggest |
27 | 27 | * |
28 | 28 | * This class contains only static methods, so theres no need for a constructer. |
— | — | @@ -215,9 +215,9 @@ |
216 | 216 | } |
217 | 217 | } |
218 | 218 | |
219 | | -/* |
| 219 | +/** |
220 | 220 | * class: Proposals |
221 | | - * |
| 221 | + * |
222 | 222 | * it needs 3 Lists: |
223 | 223 | * - one with the bookmembers |
224 | 224 | * - one where it can save the banned articles |
— | — | @@ -229,8 +229,8 @@ |
230 | 230 | * links of that article as second dimension can be accessed with the method |
231 | 231 | * getLinkList() |
232 | 232 | * |
233 | | - * |
234 | 233 | * |
| 234 | + * |
235 | 235 | * the Class can only sort the proposals, if it can access the function compareProps |
236 | 236 | */ |
237 | 237 | class Proposals { |
— | — | @@ -240,20 +240,20 @@ |
241 | 241 | * class attributes |
242 | 242 | * ================================================== |
243 | 243 | * |
244 | | - * only mLinkList and mPropList can be accessed from |
| 244 | + * only mLinkList and mPropList can be accessed from |
245 | 245 | * outside the class via getLinkList() and getPropsosals() |
246 | 246 | */ |
247 | 247 | private $mColl; |
248 | 248 | private $mPropList; |
249 | 249 | private $mLinkList; |
250 | 250 | private $mBanList; |
251 | | - |
| 251 | + |
252 | 252 | /* |
253 | 253 | * ================================================== |
254 | 254 | * constructor |
255 | 255 | * ================================================== |
256 | | - * |
257 | | - * @param $coll the collection |
| 256 | + * |
| 257 | + * @param $coll the collection |
258 | 258 | * @param $ban the list of the banned articles |
259 | 259 | * @param $props the lilst of the proposals |
260 | 260 | */ |
— | — | @@ -291,7 +291,7 @@ |
292 | 292 | * default is true |
293 | 293 | * @return a 2-dimensional array that contains the proposals |
294 | 294 | * the first dimesion is numeric, the second contains |
295 | | - * 3 entries: |
| 295 | + * 3 entries: |
296 | 296 | * - 'name': the name of a proposed article |
297 | 297 | * - 'num' : how often this artikel was linked in the |
298 | 298 | * bookmembers |
— | — | @@ -302,7 +302,7 @@ |
303 | 303 | if ( $doUpdate ) { |
304 | 304 | $this->updateLinkList(); |
305 | 305 | } |
306 | | - |
| 306 | + |
307 | 307 | $this->getPropList(); |
308 | 308 | |
309 | 309 | if ( $num > 0 ) { |
— | — | @@ -405,7 +405,7 @@ |
406 | 406 | if ( preg_match( '/[:#]/', $link ) ) { // skip links with ':' and '#' |
407 | 407 | continue; |
408 | 408 | } |
409 | | - |
| 409 | + |
410 | 410 | // handle links with a displaytitle |
411 | 411 | $matches = array(); |
412 | 412 | if ( preg_match( '/(.+?)\|(.+)/', $link, $matches ) ) { |
— | — | @@ -456,7 +456,7 @@ |
457 | 457 | } |
458 | 458 | } |
459 | 459 | } |
460 | | - |
| 460 | + |
461 | 461 | if ( count( $linkcount ) == 0 ) { |
462 | 462 | return array(); |
463 | 463 | } |
— | — | @@ -570,10 +570,10 @@ |
571 | 571 | } |
572 | 572 | } |
573 | 573 | |
574 | | -/* |
| 574 | +/** |
575 | 575 | * sort $mPropList by the entries values |
576 | 576 | * sort alphabetically by equal values |
577 | | - * |
| 577 | + * |
578 | 578 | * @param $a, $b: arrays that contain two entries |
579 | 579 | * the keys: 'name' & 'val' |
580 | 580 | * 'name': an articlename |
Index: trunk/extensions/Collection/Collection.hooks.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * Collection Extension for MediaWiki |
5 | 5 | * |
6 | 6 | * Copyright (C) PediaPress GmbH |
Index: trunk/extensions/Collection/Collection.session.php |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | | -/* |
| 4 | +/** |
5 | 5 | * Collection Extension for MediaWiki |
6 | 6 | * |
7 | 7 | * Copyright (C) PediaPress GmbH |
Index: trunk/extensions/Collection/Collection.body.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * Collection Extension for MediaWiki |
5 | 5 | * |
6 | 6 | * Copyright (C) PediaPress GmbH |
— | — | @@ -1050,8 +1050,8 @@ |
1051 | 1051 | |
1052 | 1052 | $template = new CollectionRenderingTemplate(); |
1053 | 1053 | $template->set( 'status', $status ); |
1054 | | - if ( !isset( $response['status']['progress'] ) ) { |
1055 | | - $response['status']['progress'] = 1.00; |
| 1054 | + if ( !isset( $response['status']['progress'] ) ) { |
| 1055 | + $response['status']['progress'] = 1.00; |
1056 | 1056 | } |
1057 | 1057 | $template->set( 'progress', $response['status']['progress'] ); |
1058 | 1058 | $wgOut->addTemplate( $template ); |
— | — | @@ -1073,13 +1073,13 @@ |
1074 | 1074 | |
1075 | 1075 | function download() { |
1076 | 1076 | global $wgOut, $wgRequest, $wgCollectionContentTypeToFilename; |
1077 | | - |
| 1077 | + |
1078 | 1078 | $tempfile = tmpfile(); |
1079 | 1079 | $r = self::mwServeCommand( 'render_status', array( |
1080 | 1080 | 'collection_id' => $wgRequest->getVal( 'collection_id' ), |
1081 | 1081 | 'writer' => $wgRequest->getVal( 'writer' ), |
1082 | 1082 | ) ); |
1083 | | - |
| 1083 | + |
1084 | 1084 | $info = false; |
1085 | 1085 | if ( isset( $r['url'] ) ) { |
1086 | 1086 | $result = Http::get( $r['url'] ); |
Index: trunk/extensions/Collection/Collection.templates.php |
— | — | @@ -293,7 +293,7 @@ |
294 | 294 | <input name="append" type="submit" value="<?php $this->msg( 'coll-append' ) ?>" /> |
295 | 295 | <input name="cancel" type="submit" value="<?php $this->msg( 'coll-cancel' ) ?>" /> |
296 | 296 | <input name="bookcmd" type="hidden" value="load_collection" /> |
297 | | - <input name="colltitle" type="hidden" value="<?php echo htmlspecialchars( $this->data['title']->getPrefixedText() ) ?>" /> |
| 297 | + <input name="colltitle" type="hidden" value="<?php echo htmlspecialchars( $this->data['title']->getPrefixedText() ) ?>" /> |
298 | 298 | </form> |
299 | 299 | |
300 | 300 | <?php |
— | — | @@ -399,9 +399,9 @@ |
400 | 400 | } |
401 | 401 | } |
402 | 402 | |
403 | | -/* |
| 403 | +/** |
404 | 404 | * Template for suggest feature |
405 | | - * |
| 405 | + * |
406 | 406 | * It needs the two methods getProposalList() and getMemberList() |
407 | 407 | * to run with Ajax |
408 | 408 | */ |
— | — | @@ -451,7 +451,7 @@ |
452 | 452 | |
453 | 453 | $prop = $this->data['proposals']; |
454 | 454 | $out = ''; |
455 | | - |
| 455 | + |
456 | 456 | $num = count( $prop ); |
457 | 457 | if ( $num == 0 ) { |
458 | 458 | return "<li>" . wfMsgHtml( 'coll-suggest_empty' ) . "</li>"; |
Index: trunk/extensions/WikimediaMaintenance/cleanupTitles64966.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * Script to clean up broken, unparseable titles. |
5 | 5 | * |
6 | 6 | * Usage: php cleanupTitles.php [--fix] |
— | — | @@ -42,7 +42,7 @@ |
43 | 43 | $verified = $wgContLang->normalize( $display ); |
44 | 44 | $title = Title::newFromText( $verified ); |
45 | 45 | |
46 | | - if( !is_null( $title ) |
| 46 | + if( !is_null( $title ) |
47 | 47 | && $title->canExist() |
48 | 48 | && $title->getNamespace() == $row->page_namespace |
49 | 49 | && $title->getDBkey() === $row->page_title ) |
— | — | @@ -114,7 +114,7 @@ |
115 | 115 | } |
116 | 116 | |
117 | 117 | # Old cleanupTitles could move articles there. See bug 23147. |
118 | | - $ns = $row->page_namespace; |
| 118 | + $ns = $row->page_namespace; |
119 | 119 | if ( $ns < 0) $ns = 0; |
120 | 120 | |
121 | 121 | $clean = 'Broken/' . $prior; |
Index: trunk/extensions/OpenSearchXml/ApiOpenSearchXml.php |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | | -/* |
| 4 | +/** |
5 | 5 | * Created on Oct 13, 2006 |
6 | 6 | * Adapted to XML output variant, plus extra text extraction 2008 |
7 | 7 | * Text extraction adapted from ActiveAbstract extension. |
Index: trunk/extensions/OpenSearchXml/OpenSearchXml.php |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | | -/* |
| 4 | +/** |
5 | 5 | * Copyright (C) 2008 Brion Vibber <brion@wikimedia.org> |
6 | 6 | * http://www.mediawiki.org/ |
7 | 7 | * |
Index: trunk/extensions/Wikimania/Wikimania.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * Extension for managing the Wikimania conferences |
5 | 5 | */ |
6 | 6 | |
Index: trunk/extensions/Wikimania/specials/SpecialCheckWikimaniaStatus.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * Check your registration status |
5 | 5 | */ |
6 | 6 | class SpecialCheckWikimaniaStatus extends SpecialPage { |
Index: trunk/extensions/Wikimania/specials/SpecialRegisterForWikimania.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -/* |
| 3 | +/** |
4 | 4 | * Register for Wikimania |
5 | 5 | */ |
6 | 6 | class SpecialRegisterForWikimania extends SpecialPage { |
Index: trunk/extensions/Wikimania/backend/Wikimania.php |
— | — | @@ -45,7 +45,6 @@ |
46 | 46 | */ |
47 | 47 | private $country; |
48 | 48 | |
49 | | - |
50 | 49 | /** |
51 | 50 | * Do a bit of delayed setup, based on this year's config |
52 | 51 | * @param $year int Year to host Wikimania for |
Index: trunk/extensions/Wikimania/backend/WikimaniaRegistration.php |
— | — | @@ -3,15 +3,29 @@ |
4 | 4 | * Class referring to a specific registration |
5 | 5 | */ |
6 | 6 | class WikimaniaRegistration extends HTMLForm { |
| 7 | + |
| 8 | + /** |
| 9 | + * @param $wm Wikimania |
| 10 | + * @param $context ContextSource |
| 11 | + */ |
7 | 12 | public function __construct( Wikimania $wm, $context = null ) { |
8 | 13 | parent::__construct( $this->getFields( $wm, $context->getUser() ), $context, 'wikimania' ); |
9 | 14 | } |
10 | 15 | |
| 16 | + /** |
| 17 | + * @param $u user |
| 18 | + * @return string |
| 19 | + */ |
11 | 20 | public static function generateRegistrationID( User $u ) { |
12 | 21 | $str = $u->getName() . ":" . microtime() . ":" . wfGetIP(); |
13 | 22 | return substr( sha1( $str ), 0, 5 ); |
14 | 23 | } |
15 | 24 | |
| 25 | + /** |
| 26 | + * @param $wm Wikimania |
| 27 | + * @param $u User |
| 28 | + * @return array |
| 29 | + */ |
16 | 30 | private function getFields( Wikimania $wm, User $u ) { |
17 | 31 | static $fields; |
18 | 32 | if( !$fields ) { |
— | — | @@ -76,6 +90,10 @@ |
77 | 91 | return $fields; |
78 | 92 | } |
79 | 93 | |
| 94 | + /** |
| 95 | + * @static |
| 96 | + * @return array |
| 97 | + */ |
80 | 98 | private static function getGenderPossibilities() { |
81 | 99 | return array( |
82 | 100 | wfMsg( 'gender-male') => 'male', |