Index: trunk/phase3/includes/HTMLForm.php |
— | — | @@ -505,7 +505,7 @@ |
506 | 506 | |
507 | 507 | /** |
508 | 508 | * Format and display an error message stack. |
509 | | - * @param $errors Mixed String or Array of message keys |
| 509 | + * @param $errors String|Array|Status |
510 | 510 | * @return String |
511 | 511 | */ |
512 | 512 | function getErrors( $errors ) { |
— | — | @@ -627,20 +627,32 @@ |
628 | 628 | : $this->mTitle; |
629 | 629 | } |
630 | 630 | |
| 631 | + /** |
| 632 | + * @return RequestContext |
| 633 | + */ |
631 | 634 | public function getContext(){ |
632 | 635 | return $this->mContext instanceof RequestContext |
633 | 636 | ? $this->mContext |
634 | 637 | : RequestContext::getMain(); |
635 | 638 | } |
636 | 639 | |
| 640 | + /** |
| 641 | + * @return OutputPage |
| 642 | + */ |
637 | 643 | public function getOutput(){ |
638 | 644 | return $this->getContext()->output; |
639 | 645 | } |
640 | 646 | |
| 647 | + /** |
| 648 | + * @return WebRequest |
| 649 | + */ |
641 | 650 | public function getRequest(){ |
642 | 651 | return $this->getContext()->request; |
643 | 652 | } |
644 | 653 | |
| 654 | + /** |
| 655 | + * @return User |
| 656 | + */ |
645 | 657 | public function getUser(){ |
646 | 658 | return $this->getContext()->user; |
647 | 659 | } |
— | — | @@ -778,6 +790,10 @@ |
779 | 791 | protected $mID; |
780 | 792 | protected $mClass = ''; |
781 | 793 | protected $mDefault; |
| 794 | + |
| 795 | + /** |
| 796 | + * @var HTMLForm |
| 797 | + */ |
782 | 798 | public $mParent; |
783 | 799 | |
784 | 800 | /** |
— | — | @@ -1280,6 +1296,10 @@ |
1281 | 1297 | return ' '; |
1282 | 1298 | } |
1283 | 1299 | |
| 1300 | + /** |
| 1301 | + * @param $request WebRequest |
| 1302 | + * @return String |
| 1303 | + */ |
1284 | 1304 | function loadDataFromRequest( $request ) { |
1285 | 1305 | $invert = false; |
1286 | 1306 | if ( isset( $this->mParams['invert'] ) && $this->mParams['invert'] ) { |
— | — | @@ -1407,6 +1427,10 @@ |
1408 | 1428 | return "$select<br />\n$textbox"; |
1409 | 1429 | } |
1410 | 1430 | |
| 1431 | + /** |
| 1432 | + * @param $request WebRequest |
| 1433 | + * @return String |
| 1434 | + */ |
1411 | 1435 | function loadDataFromRequest( $request ) { |
1412 | 1436 | if ( $request->getCheck( $this->mName ) ) { |
1413 | 1437 | $val = $request->getText( $this->mName ); |
— | — | @@ -1492,6 +1516,10 @@ |
1493 | 1517 | return $html; |
1494 | 1518 | } |
1495 | 1519 | |
| 1520 | + /** |
| 1521 | + * @param $request WebRequest |
| 1522 | + * @return String |
| 1523 | + */ |
1496 | 1524 | function loadDataFromRequest( $request ) { |
1497 | 1525 | if ( $this->mParent->getMethod() == 'post' ) { |
1498 | 1526 | if( $request->wasPosted() ){ |