Index: trunk/extensions/SocialProfile/UserBoard/UserBoardClass.php |
— | — | @@ -3,18 +3,11 @@ |
4 | 4 | * Functions for managing user board data |
5 | 5 | */ |
6 | 6 | class UserBoard { |
7 | | - /**#@+ |
8 | | - * @private |
9 | | - */ |
10 | | - var $user_id; |
11 | | - var $user_name; |
12 | 7 | |
13 | 8 | /** |
14 | 9 | * Constructor |
15 | | - * @private |
16 | 10 | */ |
17 | | - /* private */ function __construct() { |
18 | | - } |
| 11 | + public function __construct() {} |
19 | 12 | |
20 | 13 | /** |
21 | 14 | * Sends a user board message to another user. |
— | — | @@ -155,9 +148,6 @@ |
156 | 149 | |
157 | 150 | $key = wfMemcKey( 'user', 'newboardmessage', $user_id ); |
158 | 151 | $newCount = 0; |
159 | | - /* @todo FIXME: why is this commented out? This obviously should be |
160 | | - enabled, because without this, this function is basically identical |
161 | | - to clearNewMessagesCount... |
162 | 152 | $dbw = wfGetDB( DB_MASTER ); |
163 | 153 | $s = $dbw->selectRow( |
164 | 154 | 'user_board', |
— | — | @@ -168,7 +158,6 @@ |
169 | 159 | if ( $s !== false ) { |
170 | 160 | $newCount = $s->count; |
171 | 161 | } |
172 | | - */ |
173 | 162 | |
174 | 163 | $wgMemc->set( $key, $newCount ); |
175 | 164 | |
— | — | @@ -205,8 +194,8 @@ |
206 | 195 | * @return Boolean: true if user owns the message, otherwise false |
207 | 196 | */ |
208 | 197 | public function doesUserOwnMessage( $user_id, $ub_id ) { |
209 | | - $dbw = wfGetDB( DB_MASTER ); |
210 | | - $s = $dbw->selectRow( |
| 198 | + $dbr = wfGetDB( DB_SLAVE ); |
| 199 | + $s = $dbr->selectRow( |
211 | 200 | 'user_board', |
212 | 201 | array( 'ub_user_id' ), |
213 | 202 | array( 'ub_id' => $ub_id ), |
— | — | @@ -391,8 +380,8 @@ |
392 | 381 | <div class=\"user-board-message-from\"> |
393 | 382 | <a href=\"{$user->escapeFullURL()}\" title=\"{$message['user_name_from']}\">{$message['user_name_from']}</a> {$message_type_label} |
394 | 383 | </div> |
395 | | - <div class=\"user-board-message-time\">" |
396 | | - . wfMsgHtml( 'userboard_posted_ago', $this->getTimeAgo( $message['timestamp'] ) ) . |
| 384 | + <div class=\"user-board-message-time\">" . |
| 385 | + wfMsgHtml( 'userboard_posted_ago', $this->getTimeAgo( $message['timestamp'] ) ) . |
397 | 386 | "</div> |
398 | 387 | <div class=\"user-board-message-content\"> |
399 | 388 | <div class=\"user-board-message-image\"> |
Index: trunk/extensions/SocialProfile/UserBoard/SpecialUserBoard.php |
— | — | @@ -144,8 +144,8 @@ |
145 | 145 | |
146 | 146 | if ( $total ) { |
147 | 147 | $output .= '<div class="user-page-message-top"> |
148 | | - <span class="user-page-message-count" style="font-size:11px;color:#666666;">' |
149 | | - . wfMsg( 'userboard_showingmessages', $total, $start, $end, $end - $start + 1 ) . |
| 148 | + <span class="user-page-message-count">' . |
| 149 | + wfMsg( 'userboard_showingmessages', $total, $start, $end, $end - $start + 1 ) . |
150 | 150 | "</span> {$board_to_board} |
151 | 151 | </div>"; |
152 | 152 | } |
— | — | @@ -221,7 +221,7 @@ |
222 | 222 | $output .= '<div class="user-page-message-form"> |
223 | 223 | <input type="hidden" id="user_name_to" name="user_name_to" value="' . $user_name_to . '"/> |
224 | 224 | <input type="hidden" id="user_name_from" name="user_name_from" value="' . $user_name_from . '"/> |
225 | | - <span style="color:#797979;">' . wfMsg( 'userboard_messagetype' ) . ' </span> |
| 225 | + <span class="user-board-message-type">' . wfMsg( 'userboard_messagetype' ) . ' </span> |
226 | 226 | <select id="message_type"> |
227 | 227 | <option value="0">' . wfMsg( 'userboard_public' ) . '</option> |
228 | 228 | <option value="1">' . wfMsg( 'userboard_private' ) . '</option> |
— | — | @@ -285,7 +285,7 @@ |
286 | 286 | // $ub_message_text = preg_replace_callback( "/(<a[^>]*>)(.*?)(<\/a>)/i", 'cut_link_text', $ub_message['message_text'] ); |
287 | 287 | $ub_message_text = $ub_message['message_text']; |
288 | 288 | |
289 | | - $output .= "<div class=\"user-board-message\" style=\"width:550px\"> |
| 289 | + $output .= "<div class=\"user-board-message\"> |
290 | 290 | <div class=\"user-board-message-from\"> |
291 | 291 | <a href=\"{$user->escapeFullURL()}\" title=\"{$ub_message['user_name_from']}}\">{$ub_message['user_name_from']} </a> {$ub_message_type_label} |
292 | 292 | </div> |
Index: trunk/extensions/SocialProfile/UserBoard/UserBoard.css |
— | — | @@ -37,6 +37,7 @@ |
38 | 38 | .user-board-message { |
39 | 39 | border: 1px solid #D4DFD7; |
40 | 40 | margin: 0px 0px 15px 0px; |
| 41 | + width: 550px; |
41 | 42 | } |
42 | 43 | |
43 | 44 | .user-board-message-from { |
— | — | @@ -102,3 +103,12 @@ |
103 | 104 | .user-page-message-form textarea { |
104 | 105 | width: 80%; |
105 | 106 | } |
| 107 | + |
| 108 | +.user-page-message-count { |
| 109 | + color: #666666; |
| 110 | + font-size: 11px; |
| 111 | +} |
| 112 | + |
| 113 | +.user-board-message-type { |
| 114 | + color: #797979; |
| 115 | +} |
\ No newline at end of file |