r85150 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85149‎ | r85150 | r85151 >
Date:20:18, 1 April 2011
Author:ashley
Status:ok
Tags:
Comment:
SocialProfile: document UserRelationshipClass.php, rename some variables and change one ternary expression to a proper if() block
Modified paths:
  • /trunk/extensions/SocialProfile/UserRelationship/UserRelationshipClass.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SocialProfile/UserRelationship/UserRelationshipClass.php
@@ -19,8 +19,20 @@
2020 $this->user_id = User::idFromName( $this->user_name );
2121 }
2222
23 - public function addRelationshipRequest( $user_to, $type, $message, $email = true ) {
24 - $user_id_to = User::idFromName( $user_to );
 23+ /**
 24+ * Add a relationship request to the database.
 25+ *
 26+ * @param $user_to String: user name of the recipient of the relationship
 27+ * request
 28+ * @param $type Integer: 1 for friend request, 2 (or anything else than 1)
 29+ * for foe request
 30+ * @param $message String: user-supplied message to to the recipient; may
 31+ * be empty
 32+ * @param $email Boolean: send out email to the recipient of the request?
 33+ * @return Integer: ID of the new relationship request
 34+ */
 35+ public function addRelationshipRequest( $userTo, $type, $message, $email = true ) {
 36+ $userIdTo = User::idFromName( $userTo );
2537 $dbw = wfGetDB( DB_MASTER );
2638
2739 $dbw->insert(
@@ -28,124 +40,172 @@
2941 array(
3042 'ur_user_id_from' => $this->user_id,
3143 'ur_user_name_from' => $this->user_name,
32 - 'ur_user_id_to' => $user_id_to,
33 - 'ur_user_name_to' => $user_to,
 44+ 'ur_user_id_to' => $userIdTo,
 45+ 'ur_user_name_to' => $userTo,
3446 'ur_type' => $type,
3547 'ur_message' => $message,
3648 'ur_date' => date( 'Y-m-d H:i:s' )
3749 ), __METHOD__
3850 );
39 - $request_id = $dbw->insertId();
 51+ $requestId = $dbw->insertId();
4052
41 - $this->incNewRequestCount( $user_id_to, $type );
 53+ $this->incNewRequestCount( $userIdTo, $type );
4254
4355 if ( $email ) {
44 - $this->sendRelationshipRequestEmail( $user_id_to, $this->user_name, $type );
 56+ $this->sendRelationshipRequestEmail( $userIdTo, $this->user_name, $type );
4557 }
46 - return $request_id;
 58+
 59+ return $requestId;
4760 }
4861
49 - public function sendRelationshipRequestEmail( $user_id_to, $user_from, $type ) {
50 - $user = User::newFromId( $user_id_to );
 62+ /**
 63+ * Send e-mail about a new relationship request to the user whose user ID
 64+ * is $userIdTo if they have opted in for these notification e-mails.
 65+ *
 66+ * @param $userIdTo Integer: user ID of the recipient
 67+ * @param $userFrom String: name of the user who requested the relationship
 68+ * @param $type Integer: 1 for friend request, 2 (or anything else than 1)
 69+ * for foe request
 70+ */
 71+ public function sendRelationshipRequestEmail( $userIdTo, $userFrom, $type ) {
 72+ $user = User::newFromId( $userIdTo );
5173 $user->loadFromDatabase();
5274 if ( $user->getEmail() && $user->getIntOption( 'notifyfriendrequest', 1 ) ) {
53 - $request_link = SpecialPage::getTitleFor( 'ViewRelationshipRequests' );
54 - $update_profile_link = SpecialPage::getTitleFor( 'UpdateProfile' );
 75+ $requestLink = SpecialPage::getTitleFor( 'ViewRelationshipRequests' );
 76+ $updateProfileLink = SpecialPage::getTitleFor( 'UpdateProfile' );
 77+ if ( trim( $user->getRealName() ) ) {
 78+ $name = $user->getRealName();
 79+ } else {
 80+ $name = $user->getName();
 81+ }
5582 if ( $type == 1 ) {
5683 $subject = wfMsgExt( 'friend_request_subject', 'parsemag',
57 - $user_from
 84+ $userFrom
5885 );
5986 $body = wfMsgExt( 'friend_request_body', 'parsemag',
60 - ( ( trim( $user->getRealName() ) ) ? $user->getRealName() : $user->getName() ),
61 - $user_from,
62 - $request_link->getFullURL(),
63 - $update_profile_link->getFullURL()
 87+ $name,
 88+ $userFrom,
 89+ $requestLink->getFullURL(),
 90+ $updateProfileLink->getFullURL()
6491 );
6592 } else {
6693 $subject = wfMsgExt( 'foe_request_subject', 'parsemag',
67 - $user_from
 94+ $userFrom
6895 );
6996 $body = wfMsgExt( 'foe_request_body', 'parsemag',
70 - ( ( trim( $user->getRealName() ) ) ? $user->getRealName() : $user->getName() ),
71 - $user_from,
72 - $request_link->getFullURL(),
73 - $update_profile_link->getFullURL()
 97+ $name,
 98+ $userFrom,
 99+ $requestLink->getFullURL(),
 100+ $updateProfileLink->getFullURL()
74101 );
75102 }
76103 $user->sendMail( $subject, $body );
77104 }
78105 }
79106
80 - public function sendRelationshipAcceptEmail( $user_id_to, $user_from, $type ) {
81 - $user = User::newFromId( $user_id_to );
 107+ /**
 108+ * Send an e-mail to the user whose user ID is $userIdTo about a new user
 109+ * relationship.
 110+ *
 111+ * @param $userIdTo Integer: user ID of the recipient of the e-mail
 112+ * @param $userFrom String: name of the user who removed the relationship
 113+ * @param $type Integer: 1 for friend, 2 (or anything else but 1) for foe
 114+ */
 115+ public function sendRelationshipAcceptEmail( $userIdTo, $userFrom, $type ) {
 116+ $user = User::newFromId( $userIdTo );
82117 $user->loadFromDatabase();
83118 if ( $user->getEmail() && $user->getIntOption( 'notifyfriendrequest', 1 ) ) {
84 - $user_link = Title::makeTitle( NS_USER, $user_from );
85 - $update_profile_link = SpecialPage::getTitleFor( 'UpdateProfile' );
 119+ $userLink = Title::makeTitle( NS_USER, $userFrom );
 120+ $updateProfileLink = SpecialPage::getTitleFor( 'UpdateProfile' );
 121+ if ( trim( $user->getRealName() ) {
 122+ $name = $user->getRealName();
 123+ } else {
 124+ $name = $user->getName();
 125+ }
86126 if ( $type == 1 ) {
87127 $subject = wfMsgExt( 'friend_accept_subject', 'parsemag',
88 - $user_from
 128+ $userFrom
89129 );
90130 $body = wfMsgExt( 'friend_accept_body', 'parsemag',
91 - ( ( trim( $user->getRealName() ) ) ? $user->getRealName() : $user->getName() ),
92 - $user_from,
93 - $user_link->getFullURL(),
94 - $update_profile_link->getFullURL()
 131+ $name,
 132+ $userFrom,
 133+ $userLink->getFullURL(),
 134+ $updateProfileLink->getFullURL()
95135 );
96136 } else {
97137 $subject = wfMsgExt( 'foe_accept_subject', 'parsemag',
98 - $user_from
 138+ $userFrom
99139 );
100140 $body = wfMsgExt( 'foe_accept_body', 'parsemag',
101 - ( ( trim( $user->getRealName() ) ) ? $user->getRealName() : $user->getName() ),
102 - $user_from,
103 - $user_link->getFullURL(),
104 - $update_profile_link->getFullURL()
 141+ $name,
 142+ $userFrom,
 143+ $userLink->getFullURL(),
 144+ $updateProfileLink->getFullURL()
105145 );
106146 }
107147 $user->sendMail( $subject, $body );
108148 }
109149 }
110150
111 - public function sendRelationshipRemoveEmail( $user_id_to, $user_from, $type ) {
112 - $user = User::newFromId( $user_id_to );
 151+ /**
 152+ * Send an e-mail to the user whose user ID is $userIdTo about a removed
 153+ * relationship.
 154+ *
 155+ * @param $userIdTo Integer: user ID of the recipient of the e-mail
 156+ * @param $userFrom String: name of the user who removed the relationship
 157+ * @param $type Integer: 1 for friend, 2 (or anything else but 1) for foe
 158+ */
 159+ public function sendRelationshipRemoveEmail( $userIdTo, $userFrom, $type ) {
 160+ $user = User::newFromId( $userIdTo );
113161 $user->loadFromDatabase();
114162 if ( $user->isEmailConfirmed() && $user->getIntOption( 'notifyfriendrequest', 1 ) ) {
115 - $user_link = Title::makeTitle( NS_USER, $user_from );
116 - $update_profile_link = SpecialPage::getTitleFor( 'UpdateProfile' );
 163+ $userLink = Title::makeTitle( NS_USER, $userFrom );
 164+ $updateProfileLink = SpecialPage::getTitleFor( 'UpdateProfile' );
 165+ if ( trim( $user->getRealName() ) {
 166+ $name = $user->getRealName();
 167+ } else {
 168+ $name = $user->getName();
 169+ }
117170 if ( $type == 1 ) {
118171 $subject = wfMsgExt( 'friend_removed_subject', 'parsemag',
119 - $user_from
 172+ $userFrom
120173 );
121174 $body = wfMsgExt( 'friend_removed_body', 'parsemag',
122 - ( ( trim( $user->getRealName() ) ) ? $user->getRealName() : $user->getName() ),
123 - $user_from,
124 - $user_link->getFullURL(),
125 - $update_profile_link->getFullURL()
 175+ $name,
 176+ $userFrom,
 177+ $userLink->getFullURL(),
 178+ $updateProfileLink->getFullURL()
126179 );
127180 } else {
128181 $subject = wfMsgExt( 'foe_removed_subject', 'parsemag',
129 - $user_from
 182+ $userFrom
130183 );
131184 $body = wfMsgExt( 'foe_removed_body', 'parsemag',
132 - ( ( trim( $user->getRealName() ) ) ? $user->getRealName() : $user->getName() ),
133 - $user_from,
134 - $user_link->getFullURL(),
135 - $update_profile_link->getFullURL()
 185+ $name,
 186+ $userFrom,
 187+ $userLink->getFullURL(),
 188+ $updateProfileLink->getFullURL()
136189 );
137190 }
138191 $user->sendMail( $subject, $body );
139192 }
140193 }
141194
142 - public function addRelationship( $relationship_request_id, $email = true ) {
 195+ /**
 196+ * Add a new relationship to the database.
 197+ *
 198+ * @param $relationshipRequestId Integer: relationship request ID number
 199+ * @param $email Boolean: send out email to the recipient of the request?
 200+ * @return Boolean: true if successful, otherwise false
 201+ */
 202+ public function addRelationship( $relationshipRequestId, $email = true ) {
143203 global $wgMemc;
144204
145205 $dbw = wfGetDB( DB_MASTER );
146206 $s = $dbw->selectRow(
147207 'user_relationship_request',
148208 array( 'ur_user_id_from', 'ur_user_name_from', 'ur_type' ),
149 - array( 'ur_id' => $relationship_request_id ),
 209+ array( 'ur_id' => $relationshipRequestId ),
150210 __METHOD__
151211 );
152212
@@ -202,6 +262,7 @@
203263 $this->sendRelationshipAcceptEmail( $ur_user_id_from, $this->user_name, $ur_type );
204264 }
205265
 266+ // Purge caches
206267 $wgMemc->delete( wfMemcKey( 'relationship', 'profile', "{$this->user_id}-{$ur_type}" ) );
207268 $wgMemc->delete( wfMemcKey( 'relationship', 'profile', "{$ur_user_id_from}-{$ur_type}" ) );
208269
@@ -211,12 +272,19 @@
212273 }
213274 }
214275
 276+ /**
 277+ * Remove a relationship between two users and clear caches afterwards.
 278+ *
 279+ * @param $user1 Integer: user ID of the first user
 280+ * @param $user2 Integer: user ID of the second user
 281+ */
215282 public function removeRelationshipByUserID( $user1, $user2 ) {
216283 global $wgUser, $wgMemc;
217284
218285 if ( $user1 != $wgUser->getID() && $user2 != $wgUser->getID() ) {
219286 return false; // only logged in user should be able to delete
220287 }
 288+
221289 // must delete record for each user involved in relationship
222290 $dbw = wfGetDB( DB_MASTER );
223291 $dbw->delete(
@@ -247,6 +315,11 @@
248316 $stats->clearCache();
249317 }
250318
 319+ /**
 320+ * Delete a user relationship request from the database.
 321+ *
 322+ * @param $id Integer: relationship request ID number
 323+ */
251324 public function deleteRequest( $id ) {
252325 $request = $this->getRequest( $id );
253326 $this->decNewRequestCount( $this->user_id, $request[0]['rel_type'] );
@@ -259,22 +332,33 @@
260333 );
261334 }
262335
263 - public function updateRelationshipRequestStatus( $relationship_request_id, $status ) {
 336+ /**
 337+ * @param $relationshipRequestId Integer: relationship request ID number
 338+ * @param $status
 339+ */
 340+ public function updateRelationshipRequestStatus( $relationshipRequestId, $status ) {
264341 $dbw = wfGetDB( DB_MASTER );
265342 $dbw->update(
266343 'user_relationship_request',
267344 /* SET */array( 'ur_status' => $status ),
268 - /* WHERE */array( 'ur_id' => $relationship_request_id ),
 345+ /* WHERE */array( 'ur_id' => $relationshipRequestId ),
269346 __METHOD__
270347 );
271348 }
272349
273 - public function verifyRelationshipRequest( $relationship_request_id ) {
 350+ /**
 351+ * Make sure that there is a pending user relationship request with the
 352+ * given ID.
 353+ *
 354+ * @param $relationshipRequestId Integer: relationship request ID number
 355+ * @return bool
 356+ */
 357+ public function verifyRelationshipRequest( $relationshipRequestId ) {
274358 $dbw = wfGetDB( DB_MASTER );
275359 $s = $dbw->selectRow(
276360 'user_relationship_request',
277361 array( 'ur_user_id_to' ),
278 - array( 'ur_id' => $relationship_request_id ),
 362+ array( 'ur_id' => $relationshipRequestId ),
279363 __METHOD__
280364 );
281365 if ( $s !== false ) {
@@ -285,6 +369,11 @@
286370 return false;
287371 }
288372
 373+ /**
 374+ * @param $user1 Integer:
 375+ * @param $user2 Integer:
 376+ * @return Mixed: integer or boolean false
 377+ */
289378 static function getUserRelationshipByID( $user1, $user2 ) {
290379 $dbw = wfGetDB( DB_MASTER );
291380 $s = $dbw->selectRow(
@@ -300,6 +389,11 @@
301390 }
302391 }
303392
 393+ /**
 394+ * @param $user1 Integer: user ID of the recipient of the request
 395+ * @param $user2 Integer: user ID of the sender of the request
 396+ * @return bool
 397+ */
304398 static function userHasRequestByID( $user1, $user2 ) {
305399 $dbw = wfGetDB( DB_MASTER );
306400 $s = $dbw->selectRow(
@@ -319,6 +413,13 @@
320414 }
321415 }
322416
 417+ /**
 418+ * Get an individual user relationship request via its ID.
 419+ *
 420+ * @param $id Integer: relationship request ID
 421+ * @return Array: array containing relationship request info, such as its
 422+ * ID, type, requester, etc.
 423+ */
323424 public function getRequest( $id ) {
324425 $dbr = wfGetDB( DB_MASTER );
325426 $res = $dbr->select(
@@ -330,24 +431,33 @@
331432 array( "ur_id = {$id}" ),
332433 __METHOD__
333434 );
 435+
334436 foreach ( $res as $row ) {
335437 if ( $row->ur_type == 1 ) {
336 - $type_name = 'Friend';
 438+ $typeName = 'Friend';
337439 } else {
338 - $type_name = 'Foe';
 440+ $typeName = 'Foe';
339441 }
340442 $request[] = array(
341443 'id' => $row->ur_id,
342444 'rel_type' => $row->ur_type,
343 - 'type' => $type_name,
 445+ 'type' => $typeName,
344446 'timestamp' => ( $row->ur_date ),
345447 'user_id_from' => $row->ur_user_id_from,
346448 'user_name_from' => $row->ur_user_name_from
347449 );
348450 }
 451+
349452 return $request;
350453 }
351454
 455+ /**
 456+ * Get the list of open relationship requests.
 457+ *
 458+ * @param $status Integer:
 459+ * @param $limit Integer: used as the LIMIT in the SQL query
 460+ * @return Array: array of open relationship requests
 461+ */
352462 public function getRequestList( $status, $limit = 0 ) {
353463 $dbr = wfGetDB( DB_MASTER );
354464
@@ -389,71 +499,120 @@
390500 'user_name_from' => $row->ur_user_name_from
391501 );
392502 }
 503+
393504 return $requests;
394505 }
395506
396 - private function incNewRequestCount( $user_id, $rel_type ) {
 507+ /**
 508+ * Increase the amount of open relationship requests for a user.
 509+ *
 510+ * @param $userId Integer: user ID for whom to get the requests
 511+ * @param $relType Integer: 1 for friends, 2 (or anything else but 1) for foes
 512+ */
 513+ private function incNewRequestCount( $userId, $relType ) {
397514 global $wgMemc;
398 - $key = wfMemcKey( 'user_relationship', 'open_request', $rel_type, $user_id );
 515+ $key = wfMemcKey( 'user_relationship', 'open_request', $relType, $userId );
399516 $wgMemc->incr( $key );
400517 }
401518
402 - private function decNewRequestCount( $user_id, $rel_type ) {
 519+ /**
 520+ * Decrease the amount of open relationship requests for a user.
 521+ *
 522+ * @param $userId Integer: user ID for whom to get the requests
 523+ * @param $relType Integer: 1 for friends, 2 (or anything else but 1) for foes
 524+ */
 525+ private function decNewRequestCount( $userId, $relType ) {
403526 global $wgMemc;
404 - $key = wfMemcKey( 'user_relationship', 'open_request', $rel_type, $user_id );
 527+ $key = wfMemcKey( 'user_relationship', 'open_request', $relType, $userId );
405528 $wgMemc->decr( $key );
406529 }
407530
408 - static function getOpenRequestCountDB( $user_id, $rel_type ) {
409 - wfDebug( "Got open request count (type={$rel_type}) for id $user_id from DB\n" );
 531+ /**
 532+ * Get the amount of open user relationship requests for a user from the
 533+ * database and cache it.
 534+ *
 535+ * @param $userId Integer: user ID for whom to get the requests
 536+ * @param $relType Integer: 1 for friends, 2 (or anything else but 1) for foes
 537+ * @return Integer
 538+ */
 539+ static function getOpenRequestCountDB( $userId, $relType ) {
 540+ global $wgMemc;
410541
411 - global $wgMemc;
412 - $key = wfMemcKey( 'user_relationship', 'open_request', $rel_type, $user_id );
 542+ wfDebug( "Got open request count (type={$relType}) for id $userId from DB\n" );
 543+
 544+ $key = wfMemcKey( 'user_relationship', 'open_request', $relType, $userId );
413545 $dbr = wfGetDB( DB_SLAVE );
414 - $request_count = 0;
 546+ $requestCount = 0;
 547+
415548 $s = $dbr->selectRow(
416549 'user_relationship_request',
417550 array( 'COUNT(*) AS count' ),
418551 array(
419 - 'ur_user_id_to' => $user_id,
 552+ 'ur_user_id_to' => $userId,
420553 'ur_status' => 0,
421 - 'ur_type' => $rel_type
 554+ 'ur_type' => $relType
422555 ),
423556 __METHOD__
424557 );
 558+
425559 if ( $s !== false ) {
426 - $request_count = $s->count;
 560+ $requestCount = $s->count;
427561 }
428562
429 - $wgMemc->set( $key, $request_count );
 563+ $wgMemc->set( $key, $requestCount );
430564
431 - return $request_count;
 565+ return $requestCount;
432566 }
433567
434 - static function getOpenRequestCountCache( $user_id, $rel_type ) {
 568+ /**
 569+ * Get the amount of open user relationship requests from cache.
 570+ *
 571+ * @param $userId Integer: user ID for whom to get the requests
 572+ * @param $relType Integer: 1 for friends, 2 (or anything else but 1) for foes
 573+ * @return Integer
 574+ */
 575+ static function getOpenRequestCountCache( $userId, $relType ) {
435576 global $wgMemc;
436 - $key = wfMemcKey( 'user_relationship', 'open_request', $rel_type, $user_id );
 577+ $key = wfMemcKey( 'user_relationship', 'open_request', $relType, $userId );
437578 $data = $wgMemc->get( $key );
438579 if ( $data != '' ) {
439 - wfDebug( "Got open request count of $data (type={$rel_type}) for id $user_id from cache\n" );
 580+ wfDebug( "Got open request count of $data (type={$relType}) for id $userId from cache\n" );
440581 return $data;
441582 }
442583 }
443584
444 - static function getOpenRequestCount( $user_id, $rel_type ) {
445 - $data = self::getOpenRequestCountCache( $user_id, $rel_type );
 585+ /**
 586+ * Get the amount of open user relationship requests; first tries cache,
 587+ * and if that fails, fetches the count from the database.
 588+ *
 589+ * @param $userId Integer: user ID for whom to get the requests
 590+ * @param $relType Integer: 1 for friends, 2 (or anything else but 1) for foes
 591+ * @return Integer
 592+ */
 593+ static function getOpenRequestCount( $userId, $relType ) {
 594+ $data = self::getOpenRequestCountCache( $userId, $relType );
446595
447596 if ( $data != '' ) {
448 - if ( $data == - 1 ) {
 597+ if ( $data == -1 ) {
449598 $data = 0;
450599 }
451600 $count = $data;
452601 } else {
453 - $count = self::getOpenRequestCountDB( $user_id, $rel_type );
 602+ $count = self::getOpenRequestCountDB( $userId, $relType );
454603 }
 604+
455605 return $count;
456606 }
457607
 608+ /**
 609+ * Get the relationship list for the current user.
 610+ *
 611+ * @param $type Integer: 1 for friends, 2 (or anything else but 1) for foes
 612+ * @param $limit Integer: used as the LIMIT in the SQL query
 613+ * @param $page Integer: if greater than 0, will be used to calculate the
 614+ * OFFSET for the SQL query
 615+ * @return Array: array of relationship information
 616+ */
458617 public function getRelationshipList( $type = 0, $limit = 0, $page = 0 ) {
459618 $dbr = wfGetDB( DB_SLAVE );
460619
@@ -496,6 +655,12 @@
497656 return $requests;
498657 }
499658
 659+ /**
 660+ * Get the relationship IDs for the current user.
 661+ *
 662+ * @param $type Integer: 1 for friends, 2 (or anything else but 1) for foes
 663+ * @return Array: array of relationship ID numbers
 664+ */
500665 public function getRelationshipIDs( $type ) {
501666 $dbr = wfGetDB( DB_SLAVE );
502667
@@ -514,28 +679,36 @@
515680 foreach ( $res as $row ) {
516681 $rel[] = $row->r_user_id_relation;
517682 }
 683+
518684 return $rel;
519685 }
520686
521 - static function getRelationshipCountByUsername( $user_name ) {
 687+ /**
 688+ * Get the amount of friends and foes a user has from the
 689+ * user_relationship_stats database table.
 690+ *
 691+ * @param $userName String: name of the user whose stats we're looking up
 692+ * @return Array: array containing the amount of friends and foes
 693+ */
 694+ static function getRelationshipCountByUsername( $userName ) {
522695 $dbr = wfGetDB( DB_SLAVE );
523 - $user_id = User::idFromName( $user_name );
 696+ $userId = User::idFromName( $userName );
524697 $res = $dbr->select(
525698 'user_relationship_stats',
526699 array( 'rs_friend_count', 'rs_foe_count' ),
527 - array( "rs_user_id = {$user_id}" ),
 700+ array( "rs_user_id = {$userId}" ),
528701 __METHOD__,
529702 array( 'LIMIT' => 1, 'OFFSET' => 0 )
530703 );
531704 $row = $dbr->fetchObject( $res );
532 - $friend_count = 0;
533 - $foe_count = 0;
 705+ $friendCount = 0;
 706+ $foeCount = 0;
534707 if ( $row ) {
535 - $friend_count = $row->rs_friend_count;
536 - $foe_count = $row->rs_foe_count;
 708+ $friendCount = $row->rs_friend_count;
 709+ $foeCount = $row->rs_foe_count;
537710 }
538 - $stats['friend_count'] = $friend_count;
539 - $stats['foe_count'] = $foe_count;
 711+ $stats['friend_count'] = $friendCount;
 712+ $stats['foe_count'] = $foeCount;
540713 return $stats;
541714 }
542715 }

Status & tagging log