Index: trunk/extensions/SocialProfile/UserGifts/SpecialGiveGift.php |
— | — | @@ -219,19 +219,13 @@ |
220 | 220 | * @return String: HTML |
221 | 221 | */ |
222 | 222 | function displayFormNoUser() { |
223 | | - global $wgUser, $wgOut, $wgRequest, $wgFriendingEnabled; |
| 223 | + global $wgUser, $wgOut, $wgFriendingEnabled; |
224 | 224 | |
225 | | - $output = $wgOut->setPageTitle( wfMsg( 'g-give-no-user-title' ) ); |
| 225 | + $wgOut->setPageTitle( wfMsg( 'g-give-no-user-title' ) ); |
226 | 226 | |
227 | | - // @todo FIXME: $wgRequest->getVal()...seriously? |
228 | | - // Seems that this should use the proper MW function (maybe |
229 | | - // $this->getTitle()->getFullURL() or something) instead. |
230 | | - // Maybe that's the reason why I (and other people) frequently have |
231 | | - // problems with this special page. |
232 | | - // --Jack Phoenix <jack@countervandalism.net>, 6 April 2011 |
233 | | - $output .= '<form action="" method="get" enctype="multipart/form-data" name="gift"> |
234 | | - <input type="hidden" name="title" value="' . $wgRequest->getVal( 'title' ) . '" /> |
235 | | - <div class="g-message">' . |
| 227 | + $output = '<form action="" method="get" enctype="multipart/form-data" name="gift">' . |
| 228 | + Xml::hidden( 'title', $this->getTitle() ) . |
| 229 | + '<div class="g-message">' . |
236 | 230 | wfMsg( 'g-give-no-user-message' ) . |
237 | 231 | '</div> |
238 | 232 | <div class="g-give-container">'; |
— | — | @@ -248,13 +242,13 @@ |
249 | 243 | '</div> |
250 | 244 | <div class="g-gift-select"> |
251 | 245 | <select onchange="javascript:chooseFriend(this.value)"> |
252 | | - <option value="#" selected="selected">' . |
253 | | - wfMsg( 'g-select-a-friend' ) . |
254 | | - '</option>'; |
| 246 | + <option value="#" selected="selected">' . |
| 247 | + wfMsg( 'g-select-a-friend' ) . |
| 248 | + '</option>'; |
255 | 249 | foreach ( $friends as $friend ) { |
256 | 250 | $output .= '<option value="' . urlencode( $friend['user_name'] ) . '">' . |
257 | 251 | $friend['user_name'] . |
258 | | - '</option>'; |
| 252 | + '</option>' . "\n"; |
259 | 253 | } |
260 | 254 | $output .= '</select> |
261 | 255 | </div> |
— | — | @@ -340,7 +334,8 @@ |
341 | 335 | if ( $numofpages > 1 ) { |
342 | 336 | $output .= '<div class="page-nav">'; |
343 | 337 | if ( $page > 1 ) { |
344 | | - $output .= '<a href="' . $giveGiftLink->escapeFullURL( 'user=' . $user_safe . '&page=' . ( $page - 1 ) ) . '">' . wfMsg( 'g-previous' ) . '</a> '; |
| 338 | + $output .= '<a href="' . $giveGiftLink->escapeFullURL( 'user=' . $user_safe . '&page=' . ( $page - 1 ) ) . '">' . |
| 339 | + wfMsg( 'g-previous' ) . '</a> '; |
345 | 340 | } |
346 | 341 | |
347 | 342 | if ( ( $total % $per_page ) != 0 ) { |
— | — | @@ -358,7 +353,8 @@ |
359 | 354 | } |
360 | 355 | |
361 | 356 | if ( ( $total - ( $per_page * $page ) ) > 0 ) { |
362 | | - $output .= ' <a href="' . $giveGiftLink->escapeFullURL( 'user=' . $user_safe . '&page=' . ( $page + 1 ) ) . '">' . wfMsg( 'g-next' ) . '</a>'; |
| 357 | + $output .= ' <a href="' . $giveGiftLink->escapeFullURL( 'user=' . $user_safe . '&page=' . ( $page + 1 ) ) . '">' . |
| 358 | + wfMsg( 'g-next' ) . '</a>'; |
363 | 359 | } |
364 | 360 | $output .= '</div>'; |
365 | 361 | } |