Index: trunk/extensions/Contest/specials/SpecialContestant.php |
— | — | @@ -107,7 +107,6 @@ |
108 | 108 | * @param ContestContestant $contestant |
109 | 109 | */ |
110 | 110 | protected function showPage( ContestContestant $contestant ) { |
111 | | - global $wgScript; |
112 | 111 | $out = $this->getOutput(); |
113 | 112 | |
114 | 113 | $out->setPageTitle( wfMsgExt( |
— | — | @@ -121,7 +120,8 @@ |
122 | 121 | |
123 | 122 | $this->showGeneralInfo( $contestant ); |
124 | 123 | |
125 | | - $out->addHTML( '<form method="post" action="' . htmlspecialchars( $wgScript ) . '">' ); |
| 124 | + $action = SpecialPage::getTitleFor( 'Contestant', $contestant->getField( 'id' ) ); |
| 125 | + $out->addHTML( '<form method="post" action="' . $action->getLocalURL() . '">' ); |
126 | 126 | $out->addHTML( Html::hidden( 'title', $this->getTitle( $this->subPage )->getPrefixedDBkey() ) ); |
127 | 127 | $out->addHTML( Html::hidden( 'wpEditToken', $this->getUser()->editToken() ) ); |
128 | 128 | |
Index: trunk/extensions/Contest/includes/ContestContestant.php |
— | — | @@ -20,7 +20,7 @@ |
21 | 21 | * Cached user object, created from the user_id field. |
22 | 22 | * |
23 | 23 | * @since 0.1 |
24 | | - * @var USer |
| 24 | + * @var User |
25 | 25 | */ |
26 | 26 | protected $user = null; |
27 | 27 | |
— | — | @@ -579,7 +579,7 @@ |
580 | 580 | $this->loadFields( 'user_id' ); |
581 | 581 | } |
582 | 582 | } |
583 | | - |
| 583 | + |
584 | 584 | $this->user = User::newFromId( $this->getField( 'user_id' ) ); |
585 | 585 | } |
586 | 586 | |