Index: trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php |
— | — | @@ -506,7 +506,7 @@ |
507 | 507 | } |
508 | 508 | $profile_data = $this->profile_data; |
509 | 509 | |
510 | | - // Variables and other crap |
| 510 | + // Variables and other crap |
511 | 511 | $page_title = $wgTitle->getText(); |
512 | 512 | $title_parts = explode( '/', $page_title ); |
513 | 513 | $user = $title_parts[0]; |
— | — | @@ -1494,24 +1494,26 @@ |
1495 | 1495 | |
1496 | 1496 | return $output; |
1497 | 1497 | } |
1498 | | - |
1499 | | - function getStatus($user_id){ |
1500 | | - global $wgUser; |
1501 | | - |
1502 | | - $us_class = new UserStatusClass($user_id); |
1503 | | - $user_status_array = $us_class->getStatus($user_id); |
1504 | | - if (empty($user_status_array)) |
1505 | | - $buf = '' ; |
1506 | | - else |
1507 | | - $buf=$user_status_array['us_status']; |
1508 | 1498 | |
1509 | | - // Only owners of the page can change statuses |
1510 | | - if ( $wgUser->getId() == $user_id || $user_id == 0 ) |
1511 | | - $us ="<script>toShowMode('$buf','$user_id');</script>"; |
1512 | | - else |
1513 | | - $us = $buf; |
| 1499 | + function getStatus( $userId ) { |
| 1500 | + global $wgUser; |
1514 | 1501 | |
1515 | | - return $us; |
1516 | | - } |
| 1502 | + $us_class = new UserStatusClass( $userId ); |
| 1503 | + $user_status_array = $us_class->getStatus( $userId ); |
| 1504 | + if ( empty( $user_status_array ) ) { |
| 1505 | + $buf = ''; |
| 1506 | + } else { |
| 1507 | + $buf = $user_status_array['us_status']; |
| 1508 | + } |
1517 | 1509 | |
| 1510 | + // Only owners of the page can change statuses |
| 1511 | + if ( $wgUser->getId() == $userId || $userId == 0 ) { |
| 1512 | + $us = "<script>toShowMode('$buf','$userId');</script>"; |
| 1513 | + } else { |
| 1514 | + $us = $buf; |
| 1515 | + } |
| 1516 | + |
| 1517 | + return $us; |
| 1518 | + } |
| 1519 | + |
1518 | 1520 | } |