Index: trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php |
— | — | @@ -10,7 +10,7 @@ |
11 | 11 | * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later |
12 | 12 | */ |
13 | 13 | |
14 | | -class UserProfilePage extends Article{ |
| 14 | +class UserProfilePage extends Article { |
15 | 15 | |
16 | 16 | var $title = null; |
17 | 17 | |
— | — | @@ -242,12 +242,12 @@ |
243 | 243 | } else if ($wgUser->getName()==$user_name) { |
244 | 244 | $output .= "<div class=\"user-section-heading\"> |
245 | 245 | <div class=\"user-section-title\"> |
246 | | - ".wfMSg("custom-info-title")." |
| 246 | + ".wfMsg("custom-info-title")." |
247 | 247 | </div> |
248 | 248 | <div class=\"user-section-actions\"> |
249 | 249 | <div class=\"action-right\"> |
250 | 250 | <a href=\"".$edit_info_link->escapeFullURL()."/custom\"> |
251 | | - ".wfMSg("user-edit-this")." |
| 251 | + ".wfMsg("user-edit-this")." |
252 | 252 | </a> |
253 | 253 | </div> |
254 | 254 | <div class=\"cleared\"></div> |
— | — | @@ -255,7 +255,7 @@ |
256 | 256 | </div> |
257 | 257 | <div class=\"cleared\"></div> |
258 | 258 | <div class=\"no-info-container\"> |
259 | | - ".wfMSg("custom-no-info")." |
| 259 | + ".wfMsg("custom-no-info")." |
260 | 260 | </div>"; |
261 | 261 | } |
262 | 262 | |
— | — | @@ -586,7 +586,7 @@ |
587 | 587 | <span style=\"color:#797979;\">" . wfMsgHtml( 'userboard_messagetype' ) . "</span> <select id=\"message_type\"><option value=\"0\">" . wfMsgHtml( 'userboard_public' ) . "</option><option value=\"1\">" . wfMsgHtml( 'userboard_private' ) . "</option></select><p> |
588 | 588 | <textarea name=\"message\" id=\"message\" cols=\"43\" rows=\"4\"/></textarea> |
589 | 589 | <div class=\"user-page-message-box-button\"> |
590 | | - <input type=\"button\" value=\"Send\" class=\"site-button\" onclick=\"javascript:send_message();\"> |
| 590 | + <input type=\"button\" value=" . wfMsg("userboard_sendbutton") . " class=\"site-button\" onclick=\"javascript:send_message();\"> |
591 | 591 | </div> |
592 | 592 | </div>"; |
593 | 593 | } else { |
Index: trunk/extensions/SocialProfile/UserProfile/UserProfile.php |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | <?php |
3 | | -//GLOBAL VIDEO NAMESPACE REFERENCE |
| 3 | +//Global profile namespace reference |
4 | 4 | define( 'NS_USER_PROFILE', 202 ); |
5 | 5 | define( 'NS_USER_WIKI', 200 ); |
6 | 6 | |
— | — | @@ -17,7 +17,7 @@ |
18 | 18 | //ArticleFromTitle |
19 | 19 | //Calls UserProfilePage instead of standard article |
20 | 20 | function wfUserProfileFromTitle( &$title, &$article ){ |
21 | | - global $wgUser, $wgRequest, $IP, $wgOut, $wgTitle, $wgSupressPageTitle,$wgSupressSubTitle, $wgMemc, |
| 21 | + global $wgUser, $wgRequest, $IP, $wgOut, $wgTitle, $wgSupressPageTitle, $wgSupressSubTitle, $wgMemc, |
22 | 22 | $wgUserPageChoice, $wgParser, $wgUserProfileDirectory, $wgUserProfileScripts, $wgStyleVersion; |
23 | 23 | |
24 | 24 | if ( strpos( $title->getText(), "/" ) === false && ( NS_USER == $title->getNamespace() || NS_USER_PROFILE == $title->getNamespace() ) ) { |
— | — | @@ -40,7 +40,7 @@ |
41 | 41 | if( $wgRequest->getVal("action") == "edit" ){ |
42 | 42 | $wgOut->redirect( $title->getFullURL() ); |
43 | 43 | } |
44 | | - }else{ |
| 44 | + } else { |
45 | 45 | $wgOut->enableClientCache(false); |
46 | 46 | $wgParser->disableCache(); |
47 | 47 | } |
Index: trunk/extensions/SocialProfile/UserRelationship/SpecialAddRelationship.php |
— | — | @@ -212,7 +212,7 @@ |
213 | 213 | <div class=\"cleared\"></div> |
214 | 214 | </div> |
215 | 215 | <div class=\"relationship-textbox-title\"> |
216 | | - Add a Personal Message |
| 216 | + ".wfMsg('ur-add-personal-message')." |
217 | 217 | </div> |
218 | 218 | <textarea name=\"message\" id=\"message\" rows=\"3\" cols=\"50\"></textarea> |
219 | 219 | <div class=\"relationship-buttons\"> |
Index: trunk/extensions/SocialProfile/UserRelationship/UserRelationship.i18n.php |
— | — | @@ -23,6 +23,7 @@ |
24 | 24 | 'ur-add-friend' => 'Add as friend', |
25 | 25 | 'ur-add-foe' => 'Add as foe', |
26 | 26 | 'ur-add-no-user' => 'No user selected. Please request friends/foes through the correct link.', |
| 27 | + 'ur-add-personal-message' => 'Add a Personal Message', |
27 | 28 | 'ur-remove-relationship' => 'Remove as $1', |
28 | 29 | 'ur-give-gift' => 'Give a gift', |
29 | 30 | 'ur-previous' => 'prev', |
— | — | @@ -2024,3 +2025,4 @@ |
2025 | 2026 | 'ur-login' => 'Đăng nhập', |
2026 | 2027 | ); |
2027 | 2028 | |
| 2029 | + |
Index: trunk/extensions/SocialProfile/UserRelationship/UserRelationshipClass.php |
— | — | @@ -25,7 +25,7 @@ |
26 | 26 | $user_id_to = User::idFromName($user_to); |
27 | 27 | $dbr =& wfGetDB( DB_MASTER ); |
28 | 28 | $fname = $wgDBprefix.'user_relationship_request::addToDatabase'; |
29 | | - $dbr->insert( $wgDBprefix.'`user_relationship_request`', |
| 29 | + $dbr->insert( '`'.$wgDBprefix.'user_relationship_request`', |
30 | 30 | array( |
31 | 31 | 'ur_user_id_from' => $this->user_id, |
32 | 32 | 'ur_user_name_from' => $this->user_name, |
— | — | @@ -141,7 +141,7 @@ |
142 | 142 | global $wgMemc, $wgDBprefix; |
143 | 143 | |
144 | 144 | $dbr =& wfGetDB( DB_MASTER ); |
145 | | - $s = $dbr->selectRow( $wgDBprefix.'`user_relationship_request`', |
| 145 | + $s = $dbr->selectRow( '`'.$wgDBprefix.'user_relationship_request`', |
146 | 146 | array( 'ur_user_id_from','ur_user_name_from','ur_type'), |
147 | 147 | array( 'ur_id' => $relationship_request_id ), $fname |
148 | 148 | ); |
— | — | @@ -156,7 +156,7 @@ |
157 | 157 | } |
158 | 158 | |
159 | 159 | $fname = $wgDBprefix.'user_relationship::addToDatabase'; |
160 | | - $dbr->insert( $wgDBprefix.'`user_relationship`', |
| 160 | + $dbr->insert( '`'.$wgDBprefix.'user_relationship`', |
161 | 161 | array( |
162 | 162 | 'r_user_id' => $this->user_id, |
163 | 163 | 'r_user_name' => $this->user_name, |
— | — | @@ -168,7 +168,7 @@ |
169 | 169 | ); |
170 | 170 | |
171 | 171 | $fname = $wgDBprefix.'user_relationship::addToDatabase'; |
172 | | - $dbr->insert( $wgDBprefix.'`user_relationship`', |
| 172 | + $dbr->insert( '`'.$wgDBprefix.'user_relationship`', |
173 | 173 | array( |
174 | 174 | 'r_user_id' => $ur_user_id_from, |
175 | 175 | 'r_user_name' => $ur_user_name_from, |
— | — | @@ -247,7 +247,7 @@ |
248 | 248 | public function updateRelationshipRequestStatus($relationship_request_id, $status){ |
249 | 249 | global $wgDBprefix; |
250 | 250 | $dbw =& wfGetDB( DB_MASTER ); |
251 | | - $dbw->update( $wgDBprefix.'`user_relationship_request`', |
| 251 | + $dbw->update( '`'.$wgDBprefix.'user_relationship_request`', |
252 | 252 | array( /* SET */ |
253 | 253 | 'ur_status' => $status |
254 | 254 | ), array( /* WHERE */ |
— | — | @@ -259,7 +259,7 @@ |
260 | 260 | public function verifyRelationshipRequest($relationship_request_id){ |
261 | 261 | global $wgDBprefix; |
262 | 262 | $dbr =& wfGetDB( DB_MASTER ); |
263 | | - $s = $dbr->selectRow( $wgDBprefix.'`user_relationship_request`', array( 'ur_user_id_to' ), array( 'ur_id' => $relationship_request_id ), $fname ); |
| 263 | + $s = $dbr->selectRow( '`'.$wgDBprefix.'user_relationship_request`', array( 'ur_user_id_to' ), array( 'ur_id' => $relationship_request_id ), $fname ); |
264 | 264 | if ( $s !== false ) { |
265 | 265 | if($this->user_id == $s->ur_user_id_to){ |
266 | 266 | return true; |
— | — | @@ -280,13 +280,13 @@ |
281 | 281 | } |
282 | 282 | } |
283 | 283 | |
284 | | - static function userHasRequestByID($user1,$user2){ |
| 284 | + static function userHasRequestByID($user1, $user2){ |
285 | 285 | global $wgDBprefix; |
286 | 286 | $dbr =& wfGetDB( DB_MASTER ); |
287 | | - $s = $dbr->selectRow( $wgDBprefix.'`user_relationship_request`', array( 'ur_type' ), array( 'ur_user_id_to' => $user1, 'ur_user_id_from' => $user2, 'ur_status' => 0 ), __METHOD__ ); |
| 287 | + $s = $dbr->selectRow( '`'.$wgDBprefix.'user_relationship_request`', array( 'ur_type' ), array( 'ur_user_id_to' => $user1, 'ur_user_id_from' => $user2, 'ur_status' => 0 ), __METHOD__ ); |
288 | 288 | if ( $s === false ) { |
289 | 289 | return false; |
290 | | - }else{ |
| 290 | + } else { |
291 | 291 | return true; |
292 | 292 | } |
293 | 293 | } |
— | — | @@ -301,7 +301,7 @@ |
302 | 302 | while ($row = $dbr->fetchObject( $res ) ) { |
303 | 303 | if($row->ur_type==1){ |
304 | 304 | $type_name = "Friend"; |
305 | | - }else{ |
| 305 | + } else { |
306 | 306 | $type_name = "Foe"; |
307 | 307 | } |
308 | 308 | $request[] = array( |
— | — | @@ -359,7 +359,7 @@ |
360 | 360 | $key = wfMemcKey( 'user_relationship', 'open_request', $rel_type, $user_id ); |
361 | 361 | $dbr =& wfGetDB( DB_SLAVE ); |
362 | 362 | $request_count = 0; |
363 | | - $s = $dbr->selectRow( $wgDBprefix.'`user_relationship_request`', array( 'count(*) as count' ), array( 'ur_user_id_to' => $user_id, 'ur_status' => 0, 'ur_type' => $rel_type ), __METHOD__ ); |
| 363 | + $s = $dbr->selectRow( '`'.$wgDBprefix.'user_relationship_request`', array( 'count(*) as count' ), array( 'ur_user_id_to' => $user_id, 'ur_status' => 0, 'ur_type' => $rel_type ), __METHOD__ ); |
364 | 364 | if ( $s !== false )$request_count = $s->count; |
365 | 365 | |
366 | 366 | $wgMemc->set($key,$request_count); |
Index: trunk/extensions/SocialProfile/avatars/default_ml.gif |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/extensions/SocialProfile/avatars/default_ml.gif |
___________________________________________________________________ |
Name: svn:mime-type |
367 | 367 | + application/octet-stream |
Index: trunk/extensions/SocialProfile/avatars/default_l.gif |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/extensions/SocialProfile/avatars/default_l.gif |
___________________________________________________________________ |
Name: svn:mime-type |
368 | 368 | + application/octet-stream |
Index: trunk/extensions/SocialProfile/avatars/default_m.gif |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/extensions/SocialProfile/avatars/default_m.gif |
___________________________________________________________________ |
Name: svn:mime-type |
369 | 369 | + application/octet-stream |
Index: trunk/extensions/SocialProfile/avatars/default_s.gif |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/extensions/SocialProfile/avatars/default_s.gif |
___________________________________________________________________ |
Name: svn:mime-type |
370 | 370 | + application/octet-stream |
Index: trunk/extensions/SocialProfile/avatars/README.txt |
— | — | @@ -0,0 +1,4 @@ |
| 2 | +==Avatar Notes== |
| 3 | +Please create an avatar directory under the path for images used in your MediaWiki Installaion. This directory should be writeable. |
| 4 | + |
| 5 | +Copy the 4 default images into the folder. If a user does not have an avatar, these images will show up. |
\ No newline at end of file |
Property changes on: trunk/extensions/SocialProfile/avatars/README.txt |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 6 | + native |
Index: trunk/extensions/SocialProfile/UserBoard/UserBoardClass.php |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | $user_name_from = stripslashes($user_name_from); |
26 | 26 | $user_name_to = stripslashes($user_name_to); |
27 | 27 | |
28 | | - $dbr->insert( $wgDBprefix.'`user_board`', |
| 28 | + $dbr->insert( '`'.$wgDBprefix.'user_board`', |
29 | 29 | array( |
30 | 30 | 'ub_user_id_from' => $user_id_from, |
31 | 31 | 'ub_user_name_from' => $user_name_from, |
— | — | @@ -48,7 +48,7 @@ |
49 | 49 | if($message_type==0){ |
50 | 50 | //public message count |
51 | 51 | $stats->incStatField("user_board_count"); |
52 | | - }else{ |
| 52 | + } else { |
53 | 53 | //private message count |
54 | 54 | $stats->incStatField("user_board_count_priv"); |
55 | 55 | } |
— | — | @@ -60,12 +60,7 @@ |
61 | 61 | } |
62 | 62 | |
63 | 63 | public function sendBoardNotificationEmail($user_id_to,$user_from){ |
64 | | - require_once( "UserBoard.i18n.php" ); |
65 | | - # Add messages |
66 | | - global $wgMessageCache; |
67 | | - foreach( $wgUserBoardMessages as $key => $value ) { |
68 | | - $wgMessageCache->addMessages( $wgUserBoardMessages[$key], $key ); |
69 | | - } |
| 64 | + wfLoadExtensionMessages( 'SocialProfileUserBoard' ); |
70 | 65 | |
71 | 66 | $user = User::newFromId($user_id_to); |
72 | 67 | $user->loadFromId(); |
— | — | @@ -129,7 +124,7 @@ |
130 | 125 | |
131 | 126 | if( $data != "" ){ |
132 | 127 | $count = $data; |
133 | | - }else{ |
| 128 | + } else { |
134 | 129 | $count = self::getNewMessageCountDB($user_id); |
135 | 130 | } |
136 | 131 | return $count; |
— | — | @@ -182,7 +177,7 @@ |
183 | 178 | if(! ($user_id == $wgUser->getID() || $user_id_2 == $wgUser->getID()) ){ |
184 | 179 | $user_sql .= " and ub_type = 0 "; |
185 | 180 | } |
186 | | - }else{ |
| 181 | + } else { |
187 | 182 | $user_sql = "ub_user_id = {$user_id}"; |
188 | 183 | if($user_id != $wgUser->getID() ){ |
189 | 184 | $user_sql .= " and ub_type = 0 "; |
— | — | @@ -243,15 +238,15 @@ |
244 | 239 | public function displayMessages($user_id,$user_id_2=0,$count=10,$page=0){ |
245 | 240 | global $wgUser,$max_link_text_length, $wgTitle; |
246 | 241 | $messages = $this->getUserBoardMessages($user_id,$user_id_2,$count,$page); |
247 | | - |
| 242 | + wfLoadExtensionMessages( 'SocialProfileUserBoard' ); |
248 | 243 | if ($messages) { |
249 | 244 | |
250 | 245 | foreach ($messages as $message) { |
251 | 246 | $user = Title::makeTitle( NS_USER, $message["user_name_from"] ); |
252 | 247 | $avatar = new wAvatar($message["user_id_from"],"m"); |
253 | 248 | |
254 | | - $board_to_board =""; |
255 | | - $board_link=""; |
| 249 | + $board_to_board = ""; |
| 250 | + $board_link = ""; |
256 | 251 | $message_type_label = ""; |
257 | 252 | $delete_link = ""; |
258 | 253 | if($wgUser->getName()!=$message["user_name_from"]){ |
— | — | @@ -269,7 +264,7 @@ |
270 | 265 | |
271 | 266 | $max_link_text_length = 50; |
272 | 267 | $message_text = $message["message_text"]; |
273 | | - $message_text = preg_replace_callback( "/(<a[^>]*>)(.*?)(<\/a>)/i",'cut_link_text',$message["message_text"]); |
| 268 | + #$message_text = preg_replace_callback( "/(<a[^>]*>)(.*?)(<\/a>)/i",'cut_link_text',$message["message_text"]); |
274 | 269 | |
275 | 270 | $output .= "<div class=\"user-board-message\" > |
276 | 271 | <div class=\"user-board-message-from\"> |
Index: trunk/extensions/SocialProfile/UserBoard/README.txt |
— | — | @@ -1,13 +1,11 @@ |
2 | 2 | Requirements |
3 | 3 | ======================= |
4 | | - |
5 | | -Mediawiki 1.11 |
| 4 | +MediaWiki 1.11 |
6 | 5 | YUI |
7 | 6 | UserStats package |
8 | 7 | |
9 | 8 | Installation |
10 | 9 | ======================= |
11 | | - |
12 | 10 | This assumes you have copied all the neccessary files into |
13 | 11 | /extensions/SocialProfile/UserBoard. |
14 | 12 | |
— | — | @@ -37,4 +35,4 @@ |
38 | 36 | add the following line (changing path as neccessary) |
39 | 37 | |
40 | 38 | global $IP; |
41 | | -require_once ("$IP/extensions/SocialProfile/UserBoard/UserBoard_AjaxFunctions.php" ); |
| 39 | +require_once ("$IP/extensions/SocialProfile/UserBoard/UserBoard_AjaxFunctions.php"); |
Index: trunk/extensions/SocialProfile/UserStats/UserStatsClass.php |
— | — | @@ -5,7 +5,7 @@ |
6 | 6 | $wgUserStatsTrackWeekly = false; |
7 | 7 | $wgUserStatsTrackMonthly = false; |
8 | 8 | |
9 | | -class UserStatsTrack{ |
| 9 | +class UserStatsTrack { |
10 | 10 | //for referencing purposes |
11 | 11 | var $stats_fields = array( |
12 | 12 | "edit"=>"stats_edit_count", |
— | — | @@ -97,7 +97,7 @@ |
98 | 98 | } |
99 | 99 | |
100 | 100 | function incStatField( $field, $val=1 ){ |
101 | | - global $wgUser, $IP, $wgDBprefix, $wgMemc, $wgSitename,$wgSystemGifts, $wgUserStatsTrackWeekly, $wgUserStatsTrackMonthly, $wgUserStatsPointValues; |
| 101 | + global $wgUser, $IP, $wgDBprefix, $wgMemc, $wgSitename, $wgSystemGifts, $wgUserStatsTrackWeekly, $wgUserStatsTrackMonthly, $wgUserStatsPointValues; |
102 | 102 | if( !$wgUser->isBot() && !$wgUser->isAnon() && $this->stats_fields[$field]) { |
103 | 103 | $dbw = wfGetDB( DB_MASTER ); |
104 | 104 | $dbw->update( 'user_stats', |
— | — | @@ -158,7 +158,7 @@ |
159 | 159 | $sql .= 'stats_comment_blocked='; |
160 | 160 | $sql .= "(SELECT COUNT(*) as CommentCount FROM Comments_block WHERE cb_user_id_blocked = " . $this->user_id; |
161 | 161 | $sql .= ")"; |
162 | | - $sql .= " WHERE stats_user_id = " . $this->user_id ; |
| 162 | + $sql .= " WHERE stats_user_id = " . $this->user_id; |
163 | 163 | $res = $dbr->query($sql); |
164 | 164 | |
165 | 165 | $this->clearCache(); |
— | — | @@ -202,12 +202,12 @@ |
203 | 203 | $sql = "update ".$wgDBprefix."user_stats set "; |
204 | 204 | if($vote_type==1){ |
205 | 205 | $sql .= 'stats_comment_score_positive_rec='; |
206 | | - }else{ |
| 206 | + } else { |
207 | 207 | $sql .= 'stats_comment_score_negative_rec='; |
208 | 208 | } |
209 | 209 | $sql .= "(SELECT COUNT(*) as CommentVoteCount FROM Comments_Vote WHERE Comment_Vote_ID IN (select CommentID FROM Comments WHERE Comment_user_id = " . $this->user_id . ") AND Comment_Vote_Score=" . $vote_type; |
210 | 210 | $sql .= ")"; |
211 | | - $sql .= " WHERE stats_user_id = " . $this->user_id ; |
| 211 | + $sql .= " WHERE stats_user_id = " . $this->user_id; |
212 | 212 | $res = $dbr->query($sql); |
213 | 213 | |
214 | 214 | $this->clearCache(); |
— | — | @@ -217,7 +217,7 @@ |
218 | 218 | function updateCreatedOpinionsCount(){ |
219 | 219 | global $wgUser, $wgOut, $wgDBprefix; |
220 | 220 | if( !$wgUser->isAnon() && $this->user_id) { |
221 | | - $ctg = "Opinions by User " . ($this->user_name) ; |
| 221 | + $ctg = "Opinions by User " . ($this->user_name); |
222 | 222 | $parser = new Parser(); |
223 | 223 | $CtgTitle = Title::newFromText( $parser->transformMsg(trim($ctg), $wgOut->parserOptions() ) ); |
224 | 224 | $CtgTitle = $CtgTitle->getDbKey(); |
— | — | @@ -225,7 +225,7 @@ |
226 | 226 | $sql = "update ".$wgDBprefix."user_stats set stats_opinions_created="; |
227 | 227 | $sql .= "(SELECT count(*) as CreatedOpinions FROM {$dbr->tableName( 'page' )} INNER JOIN {$dbr->tableName( 'categorylinks' )} ON page_id = cl_from WHERE (cl_to) = " . $dbr->addQuotes($CtgTitle) . " "; |
228 | 228 | $sql .= ")"; |
229 | | - $sql .= " WHERE stats_user_id = " . $this->user_id ; |
| 229 | + $sql .= " WHERE stats_user_id = " . $this->user_id; |
230 | 230 | |
231 | 231 | $res = $dbr->query($sql); |
232 | 232 | |
— | — | @@ -243,7 +243,7 @@ |
244 | 244 | $sql = "update ".$wgDBprefix."user_stats set stats_opinions_published = "; |
245 | 245 | $sql .= "(SELECT count(*) as PromotedOpinions FROM {$dbr->tableName( 'page' )} INNER JOIN {$dbr->tableName( 'categorylinks' )} ON page_id = cl_from INNER JOIN published_page ON page_id=published_page_id WHERE (cl_to) = " . $dbr->addQuotes($CtgTitle) . " AND published_type=1 " . " " . $timeSQL; |
246 | 246 | $sql .= ")"; |
247 | | - $sql .= " WHERE stats_user_id = " . $this->user_id ; |
| 247 | + $sql .= " WHERE stats_user_id = " . $this->user_id; |
248 | 248 | $res = $dbr->query($sql); |
249 | 249 | |
250 | 250 | $this->clearCache(); |
— | — | @@ -255,7 +255,7 @@ |
256 | 256 | $dbr = wfGetDB( DB_MASTER ); |
257 | 257 | if($rel_type==1){ |
258 | 258 | $col="stats_friends_count"; |
259 | | - }else{ |
| 259 | + } else { |
260 | 260 | $col="stats_foe_count"; |
261 | 261 | } //Where is low_priority? where was this table created? |
262 | 262 | $sql = "update low_priority ".$wgDBprefix."user_stats set {$col}= |
— | — | @@ -268,7 +268,7 @@ |
269 | 269 | } |
270 | 270 | |
271 | 271 | function updateGiftCountRec(){ |
272 | | - global $wgUser,$wgStatsStartTimestamp, $wgDBprefix; |
| 272 | + global $wgUser, $wgStatsStartTimestamp, $wgDBprefix; |
273 | 273 | if( !$wgUser->isAnon() ) { |
274 | 274 | $dbr = wfGetDB( DB_MASTER ); |
275 | 275 | $sql = "update low_priority ".$wgDBprefix."user_stats set stats_gifts_rec_count= |
— | — | @@ -368,7 +368,7 @@ |
369 | 369 | |
370 | 370 | $dbr =& wfGetDB( DB_MASTER ); |
371 | 371 | $sql = "SELECT * |
372 | | - FROM ".$wgDBprefix."user_stats where stats_user_id = " . $this->user_id ; |
| 372 | + FROM ".$wgDBprefix."user_stats where stats_user_id = " . $this->user_id; |
373 | 373 | $res = $dbr->query($sql); |
374 | 374 | $row = $dbr->fetchObject( $res ); |
375 | 375 | if($row){ |
— | — | @@ -393,7 +393,7 @@ |
394 | 394 | } |
395 | 395 | } |
396 | 396 | |
397 | | -class UserStats{ |
| 397 | +class UserStats { |
398 | 398 | /** |
399 | 399 | * Constructor |
400 | 400 | * @private |
Index: trunk/extensions/SocialProfile/UserStats/README.txt |
— | — | @@ -1,11 +1,9 @@ |
2 | 2 | Requirements |
3 | 3 | ======================= |
| 4 | +MediaWiki 1.11 |
4 | 5 | |
5 | | -Mediawiki 1.11 |
6 | | - |
7 | 6 | Installation |
8 | 7 | ======================= |
9 | | - |
10 | 8 | If you are installing all extensions part of SocialProfile, there is no |
11 | 9 | need to follow the instructions below. |
12 | 10 | |