r77028 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77027‎ | r77028 | r77029 >
Date:20:06, 19 November 2010
Author:ashley
Status:deferred (Comments)
Tags:
Comment:
SocialProfile: follow-up to r63062 - define $out as per code review (thanks Mark!)
Modified paths:
  • /trunk/extensions/SocialProfile/UserGifts/SpecialGiveGift.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SocialProfile/UserGifts/SpecialGiveGift.php
@@ -32,6 +32,7 @@
3333 $this->user_name_to = $usertitle->getText();
3434 $this->user_id_to = User::idFromName( $this->user_name_to );
3535 $gift_id = $wgRequest->getVal( 'gift_id' );
 36+ $out = '';
3637
3738 if ( $wgUser->getID() == $this->user_id_to ) {
3839 $wgOut->setPageTitle( wfMsg( 'g-error-title' ) );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r63062SocialProfile: cleanup to UserGifts stuffashley23:09, 27 February 2010

Comments

#Comment by MarkAHershberger (talk | contribs)   02:13, 25 November 2010

if ( $wgUser->getID() == $this->user_id_to ) {

This should use the type-sensitive comparison instead. If an un-logged in user tries to give a gift to the admin, they'll get the warning g-error-message-to-yourself.

Status & tagging log