Index: trunk/extensions/SocialProfile/UserBoard/UserBoard_AjaxFunctions.php |
— | — | @@ -4,24 +4,24 @@ |
5 | 5 | */ |
6 | 6 | $wgAjaxExportList [] = 'wfSendBoardMessage'; |
7 | 7 | 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 ); |
12 | 12 | $b = new UserBoard(); |
13 | 13 | |
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 ); |
15 | 15 | |
16 | | - return $b->displayMessages($user_id_to, 0, $count); |
| 16 | + return $b->displayMessages( $user_id_to, 0, $count ); |
17 | 17 | } |
18 | 18 | |
19 | 19 | $wgAjaxExportList [] = 'wfDeleteBoardMessage'; |
20 | 20 | function wfDeleteBoardMessage( $ub_id ){ |
21 | | - global $IP, $wgMemc, $wgUser; |
| 21 | + global $wgMemc, $wgUser; |
22 | 22 | |
23 | 23 | $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 ); |
26 | 26 | } |
27 | | - return "ok"; |
| 27 | + return 'ok'; |
28 | 28 | } |
\ No newline at end of file |