Index: trunk/phase3/includes/SpecialPageFactory.php |
— | — | @@ -267,7 +267,7 @@ |
268 | 268 | } |
269 | 269 | |
270 | 270 | /** |
271 | | - * Add a page to a certain display group for Special:SpecialPages |
| 271 | + * Get the group that the special page belongs in on Special:SpecialPage |
272 | 272 | * |
273 | 273 | * @param $page SpecialPage |
274 | 274 | */ |
Index: trunk/phase3/includes/SpecialPage.php |
— | — | @@ -121,6 +121,7 @@ |
122 | 122 | * |
123 | 123 | * @param $page Mixed: SpecialPage or string |
124 | 124 | * @param $group String |
| 125 | + * @return null |
125 | 126 | * @deprecated since 1.18 call SpecialPageFactory method directly |
126 | 127 | */ |
127 | 128 | static function setGroup( $page, $group ) { |
— | — | @@ -128,9 +129,10 @@ |
129 | 130 | } |
130 | 131 | |
131 | 132 | /** |
132 | | - * Add a page to a certain display group for Special:SpecialPages |
| 133 | + * Get the group that the special page belongs in on Special:SpecialPage |
133 | 134 | * |
134 | 135 | * @param $page SpecialPage |
| 136 | + * @return null |
135 | 137 | * @deprecated since 1.18 call SpecialPageFactory method directly |
136 | 138 | */ |
137 | 139 | static function getGroup( &$page ) { |
— | — | @@ -142,6 +144,8 @@ |
143 | 145 | * Formerly used to disable expensive or dangerous special pages. The |
144 | 146 | * preferred method is now to add a SpecialPage_initList hook. |
145 | 147 | * @deprecated since 1.18 |
| 148 | + * |
| 149 | + * @param $name String the page to remove |
146 | 150 | */ |
147 | 151 | static function removePage( $name ) { |
148 | 152 | unset( SpecialPageFactory::getList()->$name ); |
— | — | @@ -173,6 +177,7 @@ |
174 | 178 | * Get a special page with a given localised name, or NULL if there |
175 | 179 | * is no such special page. |
176 | 180 | * |
| 181 | + * @param $alias String |
177 | 182 | * @return SpecialPage object or null if the page doesn't exist |
178 | 183 | * @deprecated since 1.18 call SpecialPageFactory method directly |
179 | 184 | */ |
— | — | @@ -223,6 +228,7 @@ |
224 | 229 | * @param $title Title object |
225 | 230 | * @param $context RequestContext |
226 | 231 | * @param $including Bool output is being captured for use in {{special:whatever}} |
| 232 | + * @return Bool |
227 | 233 | * @deprecated since 1.18 call SpecialPageFactory method directly |
228 | 234 | */ |
229 | 235 | public static function executePath( &$title, RequestContext &$context, $including = false ) { |
— | — | @@ -234,6 +240,7 @@ |
235 | 241 | * Returns false if there was no such special page, or a title object if it was |
236 | 242 | * a redirect. |
237 | 243 | * |
| 244 | + * @param $title Title |
238 | 245 | * @return String: HTML fragment |
239 | 246 | * @deprecated since 1.18 call SpecialPageFactory method directly |
240 | 247 | */ |
— | — | @@ -257,6 +264,8 @@ |
258 | 265 | /** |
259 | 266 | * Get a localised Title object for a specified special page name |
260 | 267 | * |
| 268 | + * @param $name String |
| 269 | + * @param $subpage String|Bool subpage string, or false to not use a subpage |
261 | 270 | * @return Title object |
262 | 271 | */ |
263 | 272 | public static function getTitleFor( $name, $subpage = false ) { |
— | — | @@ -271,6 +280,8 @@ |
272 | 281 | /** |
273 | 282 | * Get a localised Title object for a page name with a possibly unvalidated subpage |
274 | 283 | * |
| 284 | + * @param $name String |
| 285 | + * @param $subpage String|Bool subpage string, or false to not use a subpage |
275 | 286 | * @return Title object or null if the page doesn't exist |
276 | 287 | */ |
277 | 288 | public static function getSafeTitleFor( $name, $subpage = false ) { |
— | — | @@ -285,6 +296,7 @@ |
286 | 297 | /** |
287 | 298 | * Get a title for a given alias |
288 | 299 | * |
| 300 | + * @param $alias String |
289 | 301 | * @return Title or null if there is no such alias |
290 | 302 | * @deprecated since 1.18 call SpecialPageFactory method directly |
291 | 303 | */ |
— | — | @@ -304,10 +316,10 @@ |
305 | 317 | * |
306 | 318 | * @param $name String: name of the special page, as seen in links and URLs |
307 | 319 | * @param $restriction String: user right required, e.g. "block" or "delete" |
308 | | - * @param $listed Boolean: whether the page is listed in Special:Specialpages |
309 | | - * @param $function Callback: function called by execute(). By default it is constructed from $name |
| 320 | + * @param $listed Bool: whether the page is listed in Special:Specialpages |
| 321 | + * @param $function Callback|Bool: function called by execute(). By default it is constructed from $name |
310 | 322 | * @param $file String: file which is included by execute(). It is also constructed from $name by default |
311 | | - * @param $includable Boolean: whether the page can be included in normal pages |
| 323 | + * @param $includable Bool: whether the page can be included in normal pages |
312 | 324 | */ |
313 | 325 | public function __construct( $name = '', $restriction = '', $listed = true, $function = false, $file = 'default', $includable = false ) { |
314 | 326 | $this->init( $name, $restriction, $listed, $function, $file, $includable ); |
— | — | @@ -316,7 +328,12 @@ |
317 | 329 | /** |
318 | 330 | * Do the real work for the constructor, mainly so __call() can intercept |
319 | 331 | * calls to SpecialPage() |
320 | | - * @see __construct() for param docs |
| 332 | + * @param $name String: name of the special page, as seen in links and URLs |
| 333 | + * @param $restriction String: user right required, e.g. "block" or "delete" |
| 334 | + * @param $listed Bool: whether the page is listed in Special:Specialpages |
| 335 | + * @param $function Callback|Bool: function called by execute(). By default it is constructed from $name |
| 336 | + * @param $file String: file which is included by execute(). It is also constructed from $name by default |
| 337 | + * @param $includable Bool: whether the page can be included in normal pages |
321 | 338 | */ |
322 | 339 | private function init( $name, $restriction, $listed, $function, $file, $includable ) { |
323 | 340 | $this->mName = $name; |
— | — | @@ -401,6 +418,7 @@ |
402 | 419 | /** |
403 | 420 | * Set whether this page is listed in Special:Specialpages, at run-time |
404 | 421 | * @since r3583 (v1.3) |
| 422 | + * @param $listed Bool |
405 | 423 | * @return Bool |
406 | 424 | */ |
407 | 425 | function setListed( $listed ) { |
— | — | @@ -409,6 +427,7 @@ |
410 | 428 | /** |
411 | 429 | * Get or set whether this special page is listed in Special:SpecialPages |
412 | 430 | * @since r11308 (v1.6) |
| 431 | + * @param $x Bool |
413 | 432 | * @return Bool |
414 | 433 | */ |
415 | 434 | function listed( $x = null) { |
— | — | @@ -426,6 +445,8 @@ |
427 | 446 | /** |
428 | 447 | * These mutators are very evil, as the relevant variables should not mutate. So |
429 | 448 | * don't use them. |
| 449 | + * @param $x Mixed |
| 450 | + * @return Mixed |
430 | 451 | * @deprecated since 1.18 |
431 | 452 | */ |
432 | 453 | function name( $x = null ) { return wfSetVar( $this->mName, $x ); } |
— | — | @@ -436,6 +457,7 @@ |
437 | 458 | |
438 | 459 | /** |
439 | 460 | * Whether the special page is being evaluated via transclusion |
| 461 | + * @param $x Bool |
440 | 462 | * @return Bool |
441 | 463 | */ |
442 | 464 | function including( $x = null ) { |
— | — | @@ -511,6 +533,8 @@ |
512 | 534 | * Checks user permissions, calls the function given in mFunction |
513 | 535 | * |
514 | 536 | * This must be overridden by subclasses; it will be made abstract in a future version |
| 537 | + * |
| 538 | + * @param $par String subpage string, if one was specified |
515 | 539 | */ |
516 | 540 | function execute( $par ) { |
517 | 541 | $this->setHeaders(); |
— | — | @@ -567,6 +591,7 @@ |
568 | 592 | /** |
569 | 593 | * Get a self-referential title object |
570 | 594 | * |
| 595 | + * @param $subpage String|Bool |
571 | 596 | * @return Title object |
572 | 597 | */ |
573 | 598 | function getTitle( $subpage = false ) { |
— | — | @@ -662,6 +687,7 @@ |
663 | 688 | * Wrapper around wfMessage that sets the current context. Currently this |
664 | 689 | * is only the title. |
665 | 690 | * |
| 691 | + * @return Message |
666 | 692 | * @see wfMessage |
667 | 693 | */ |
668 | 694 | public function msg( /* $args */ ) { |
— | — | @@ -756,6 +782,8 @@ |
757 | 783 | |
758 | 784 | /** |
759 | 785 | * Basic SpecialPage workflow: get a form, send it to the user; get some data back, |
| 786 | + * |
| 787 | + * @param $par String Subpage string if one was specified |
760 | 788 | */ |
761 | 789 | public function execute( $par ) { |
762 | 790 | $this->setParameter( $par ); |
— | — | @@ -782,6 +810,7 @@ |
783 | 811 | * must throw subclasses of ErrorPageError |
784 | 812 | * |
785 | 813 | * @param $user User: the user to check, or null to use the context user |
| 814 | + * @return Bool true |
786 | 815 | * @throws ErrorPageError |
787 | 816 | */ |
788 | 817 | public function userCanExecute( User $user ) { |
— | — | @@ -886,6 +915,7 @@ |
887 | 916 | * If the special page is a redirect, then get the Title object it redirects to. |
888 | 917 | * False otherwise. |
889 | 918 | * |
| 919 | + * @param $par String Subpage string |
890 | 920 | * @return Title|false |
891 | 921 | */ |
892 | 922 | abstract public function getRedirect( $par ); |