r48180 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48179‎ | r48180 | r48181 >
Date:19:47, 8 March 2009
Author:ashley
Status:deferred
Tags:
Comment:
UserBoard: remove a few unused globals + tweak spacing
Modified paths:
  • /trunk/extensions/SocialProfile/UserBoard/UserBoard_AjaxFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SocialProfile/UserBoard/UserBoard_AjaxFunctions.php
@@ -4,24 +4,24 @@
55 */
66 $wgAjaxExportList [] = 'wfSendBoardMessage';
77 function wfSendBoardMessage( $user_name, $message, $message_type, $count ){
8 - global $IP, $wgMemc, $wgUser;
9 - $user_name = stripslashes($user_name);
10 - $user_name = urldecode($user_name);
11 - $user_id_to = User::idFromName($user_name);
 8+ global $wgMemc, $wgUser;
 9+ $user_name = stripslashes( $user_name );
 10+ $user_name = urldecode( $user_name );
 11+ $user_id_to = User::idFromName( $user_name );
1212 $b = new UserBoard();
1313
14 - $m = $b->sendBoardMessage($wgUser->getID(), $wgUser->getName(), $user_id_to, $user_name, urldecode($message), $message_type);
 14+ $m = $b->sendBoardMessage( $wgUser->getID(), $wgUser->getName(), $user_id_to, $user_name, urldecode( $message ), $message_type );
1515
16 - return $b->displayMessages($user_id_to, 0, $count);
 16+ return $b->displayMessages( $user_id_to, 0, $count );
1717 }
1818
1919 $wgAjaxExportList [] = 'wfDeleteBoardMessage';
2020 function wfDeleteBoardMessage( $ub_id ){
21 - global $IP, $wgMemc, $wgUser;
 21+ global $wgMemc, $wgUser;
2222
2323 $b = new UserBoard();
24 - if( $b->doesUserOwnMessage($wgUser->getID(), $ub_id) ){
25 - $b->deleteMessage($ub_id);
 24+ if( $b->doesUserOwnMessage( $wgUser->getID(), $ub_id ) ){
 25+ $b->deleteMessage( $ub_id );
2626 }
27 - return "ok";
 27+ return 'ok';
2828 }
\ No newline at end of file

Status & tagging log