r100388 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100387‎ | r100388 | r100389 >
Date:22:39, 20 October 2011
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Fix post urls when placing ratings
Modified paths:
  • /trunk/extensions/Contest/includes/ContestContestant.php (modified) (history)
  • /trunk/extensions/Contest/specials/SpecialContestant.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Contest/specials/SpecialContestant.php
@@ -107,7 +107,6 @@
108108 * @param ContestContestant $contestant
109109 */
110110 protected function showPage( ContestContestant $contestant ) {
111 - global $wgScript;
112111 $out = $this->getOutput();
113112
114113 $out->setPageTitle( wfMsgExt(
@@ -121,7 +120,8 @@
122121
123122 $this->showGeneralInfo( $contestant );
124123
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() . '">' );
126126 $out->addHTML( Html::hidden( 'title', $this->getTitle( $this->subPage )->getPrefixedDBkey() ) );
127127 $out->addHTML( Html::hidden( 'wpEditToken', $this->getUser()->editToken() ) );
128128
Index: trunk/extensions/Contest/includes/ContestContestant.php
@@ -20,7 +20,7 @@
2121 * Cached user object, created from the user_id field.
2222 *
2323 * @since 0.1
24 - * @var USer
 24+ * @var User
2525 */
2626 protected $user = null;
2727
@@ -579,7 +579,7 @@
580580 $this->loadFields( 'user_id' );
581581 }
582582 }
583 -
 583+
584584 $this->user = User::newFromId( $this->getField( 'user_id' ) );
585585 }
586586

Follow-up revisions

RevisionCommit summaryAuthorDate
r100390Partial merge of r100388reedy22:44, 20 October 2011

Comments

#Comment by Nikerabbit (talk | contribs)   06:33, 21 October 2011

No escaping?

Status & tagging log