Index: trunk/phase3/includes/Article.php |
— | — | @@ -75,6 +75,10 @@ |
76 | 76 | $this->mPage = $this->newPage( $title ); |
77 | 77 | } |
78 | 78 | |
| 79 | + /** |
| 80 | + * @param $title Title |
| 81 | + * @return WikiPage |
| 82 | + */ |
79 | 83 | protected function newPage( Title $title ) { |
80 | 84 | return new WikiPage( $title ); |
81 | 85 | } |
Index: trunk/extensions/GlobalBlocking/SpecialGlobalBlock.php |
— | — | @@ -63,10 +63,10 @@ |
64 | 64 | if (is_array($errors) && count($errors)>0) { |
65 | 65 | $errorstr = $this->formatErrors( $errors ); |
66 | 66 | } |
67 | | - |
| 67 | + |
68 | 68 | $this->form( $errorstr ); |
69 | 69 | } |
70 | | - |
| 70 | + |
71 | 71 | function formatErrors( $errors ) { |
72 | 72 | $errorstr = ''; |
73 | 73 | foreach ( $errors as $error ) { |
— | — | @@ -77,22 +77,22 @@ |
78 | 78 | $error = array(); |
79 | 79 | } |
80 | 80 | $errorstr .= Xml::tags( 'li', null, wfMsgExt( $msg, array( 'parseinline' ), $error ) ); |
81 | | - |
| 81 | + |
82 | 82 | // Special case |
83 | 83 | if ($msg == 'globalblocking-block-alreadyblocked') { |
84 | 84 | $this->mModifyForm = true; |
85 | 85 | } |
86 | 86 | } |
87 | | - |
| 87 | + |
88 | 88 | $errorstr = Xml::tags( 'ul', null, $errorstr ); |
89 | 89 | $header = wfMsgExt( 'globalblocking-block-errors', |
90 | 90 | 'parse', |
91 | 91 | array(count( $errors )) |
92 | 92 | ); |
93 | 93 | $errorstr = "$header\n$errorstr"; |
94 | | - |
| 94 | + |
95 | 95 | $errorstr = Xml::tags( 'div', array( 'class' => 'error' ), $errorstr ); |
96 | | - |
| 96 | + |
97 | 97 | return $errorstr; |
98 | 98 | } |
99 | 99 | |
— | — | @@ -101,7 +101,7 @@ |
102 | 102 | $this->mAddress = trim( $wgRequest->getText( 'wpAddress' ) ); |
103 | 103 | if (!$this->mAddress) |
104 | 104 | $this->mAddress = $par; |
105 | | - |
| 105 | + |
106 | 106 | $this->mReason = $wgRequest->getText( 'wpReason' ); |
107 | 107 | $this->mReasonList = $wgRequest->getText( 'wpBlockReasonList' ); |
108 | 108 | $this->mExpiry = $this->mExpirySelection = $wgRequest->getText( 'wpExpiry' ); |
— | — | @@ -117,12 +117,12 @@ |
118 | 118 | global $wgOut, $wgUser; |
119 | 119 | $options = array(); |
120 | 120 | $skin = $wgUser->getSkin(); |
121 | | - |
| 121 | + |
122 | 122 | if ($this->mAnonOnly) |
123 | 123 | $options[] = 'anon-only'; |
124 | 124 | if ($this->mModify) |
125 | 125 | $options[] = 'modify'; |
126 | | - |
| 126 | + |
127 | 127 | $reasonstr = $this->mReasonList; |
128 | 128 | if( $reasonstr != 'other' && $this->mReason != '' ) { |
129 | 129 | // Entry from drop down menu + additional comment |
— | — | @@ -132,11 +132,11 @@ |
133 | 133 | } |
134 | 134 | |
135 | 135 | $errors = GlobalBlocking::block( $this->mAddress, $reasonstr, $this->mExpiry, $options ); |
136 | | - |
| 136 | + |
137 | 137 | if ( count($errors) ) { |
138 | 138 | return $errors; |
139 | 139 | } |
140 | | - |
| 140 | + |
141 | 141 | if ($this->mModify) { |
142 | 142 | $textMessage = 'globalblocking-modify-success'; |
143 | 143 | $subMessage = 'globalblocking-modify-successsub'; |
— | — | @@ -144,14 +144,14 @@ |
145 | 145 | $textMessage = 'globalblocking-block-success'; |
146 | 146 | $subMessage = 'globalblocking-block-successsub'; |
147 | 147 | } |
148 | | - |
| 148 | + |
149 | 149 | $wgOut->addWikitext( wfMsg($textMessage, $this->mAddress ) ); |
150 | 150 | $wgOut->setSubtitle( wfMsg( $subMessage ) ); |
151 | | - |
| 151 | + |
152 | 152 | $link = $skin->link( SpecialPage::getTitleFor( 'GlobalBlockList' ), |
153 | 153 | wfMsg( 'globalblocking-return' ) ); |
154 | 154 | $wgOut->addHTML( $link ); |
155 | | - |
| 155 | + |
156 | 156 | return array(); |
157 | 157 | } |
158 | 158 | |
— | — | @@ -178,7 +178,7 @@ |
179 | 179 | 'id' => 'mw-globalblock-form' ) ); |
180 | 180 | $form .= Html::hidden( 'title', SpecialPage::getTitleFor('GlobalBlock')->getPrefixedText() ); |
181 | 181 | |
182 | | - $fields = array (); |
| 182 | + $fields = array(); |
183 | 183 | |
184 | 184 | // Who to block |
185 | 185 | $fields['ipaddress'] = |
— | — | @@ -187,7 +187,7 @@ |
188 | 188 | $this->mAddress, |
189 | 189 | array('id' => 'mw-globalblock-address' ) |
190 | 190 | ); |
191 | | - |
| 191 | + |
192 | 192 | // How long to block them for |
193 | 193 | $dropdown = wfMsgForContentNoTrans( 'globalblocking-expiry-options' ); |
194 | 194 | if ( $dropdown === '' || $dropdown == '-' ) { |
— | — | @@ -199,8 +199,8 @@ |
200 | 200 | $dropdown = false; |
201 | 201 | } |
202 | 202 | } |
203 | | - |
204 | | - if ($dropdown == false ) { |
| 203 | + |
| 204 | + if ( $dropdown == false ) { |
205 | 205 | $fields['globalblocking-block-expiry'] = |
206 | 206 | Xml::input( |
207 | 207 | 'wpExpiry', |
— | — | @@ -224,7 +224,7 @@ |
225 | 225 | array( 'id' => 'mw-globalblock-expiry-selector-other' ) |
226 | 226 | ); |
227 | 227 | } |
228 | | - |
| 228 | + |
229 | 229 | // Why to block them |
230 | 230 | $fields['globalblocking-block-reason'] = |
231 | 231 | Xml::listDropDown( |
— | — | @@ -266,7 +266,7 @@ |
267 | 267 | |
268 | 268 | #FIXME: make this actually use HTMLForm, instead of just its JavaScript |
269 | 269 | $wgOut->addModules( 'mediawiki.htmlform' ); |
270 | | - |
| 270 | + |
271 | 271 | $wgOut->addHTML( $form ); |
272 | 272 | |
273 | 273 | // Show loglist of previous blocks |
Index: trunk/extensions/Translate/scripts/sync-group.php |
— | — | @@ -385,7 +385,7 @@ |
386 | 386 | |
387 | 387 | /** |
388 | 388 | * Does the actual edit. |
389 | | - * @param $title \Title |
| 389 | + * @param $title Title |
390 | 390 | * @param $translation \string |
391 | 391 | * @param $comment \string Edit summary. |
392 | 392 | */ |
Index: trunk/extensions/Translate/TranslateEditAddons.php |
— | — | @@ -414,7 +414,7 @@ |
415 | 415 | * when updating a translation. |
416 | 416 | * Hook: Translate:newTranslation |
417 | 417 | * @param $handle MessageHandle |
418 | | - * @param $revision Revision |
| 418 | + * @param $revision int |
419 | 419 | * @param $text string |
420 | 420 | * @param $user User |
421 | 421 | * @return bool |
Index: trunk/extensions/OpenSearchXml/OpenSearchXml.php |
— | — | @@ -39,6 +39,10 @@ |
40 | 40 | |
41 | 41 | $wgOpenSearchAdvertiseXml = true; |
42 | 42 | |
| 43 | +/** |
| 44 | + * @param $urls array |
| 45 | + * @return bool |
| 46 | + */ |
43 | 47 | function efOpenSearchXmlUrls( &$urls ) { |
44 | 48 | global $wgEnableAPI, $wgOpenSearchAdvertiseXml; |
45 | 49 | if( $wgEnableAPI && $wgOpenSearchAdvertiseXml ) { |
— | — | @@ -51,6 +55,9 @@ |
52 | 56 | return true; |
53 | 57 | } |
54 | 58 | |
| 59 | +/** |
| 60 | + * @return string |
| 61 | + */ |
55 | 62 | function efOpenSearchXmlTemplate() { |
56 | 63 | global $wgCanonicalServer, $wgScriptPath; |
57 | 64 | $ns = implode( '|', SearchEngine::defaultNamespaces() ); |