r90831 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90830‎ | r90831 | r90832 >
Date:14:22, 26 June 2011
Author:ashley
Status:deferred
Tags:
Comment:
SocialProfile: follow-up to r90560: forgot to stylize this
Modified paths:
  • /trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php
@@ -506,7 +506,7 @@
507507 }
508508 $profile_data = $this->profile_data;
509509
510 - // Variables and other crap
 510+ // Variables and other crap
511511 $page_title = $wgTitle->getText();
512512 $title_parts = explode( '/', $page_title );
513513 $user = $title_parts[0];
@@ -1494,24 +1494,26 @@
14951495
14961496 return $output;
14971497 }
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'];
15081498
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;
15141501
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+ }
15171509
 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+
15181520 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r90560SocialProfile: stylize UserStatus, add/tweak docs, add one to-do itemashley23:56, 21 June 2011

Status & tagging log