Index: trunk/extensions/OnlineStatus/OnlineStatus.body.php |
— | — | @@ -6,7 +6,7 @@ |
7 | 7 | * |
8 | 8 | * @param mixed $title string of Title object, if it's a title, if has to be in |
9 | 9 | * User: of User_talk: namespace. |
10 | | - * @return either bool or null |
| 10 | + * @return array ( string status, string username ) or null |
11 | 11 | */ |
12 | 12 | static function GetUserStatus( $title, $checkShowPref = false ){ |
13 | 13 | if( is_object( $title ) ){ |
— | — | @@ -34,7 +34,7 @@ |
35 | 35 | return null; |
36 | 36 | } |
37 | 37 | |
38 | | - return $user->getOption( 'online' ); |
| 38 | + return array( $user->getOption( 'online' ), $username); |
39 | 39 | } |
40 | 40 | |
41 | 41 | /** |
— | — | @@ -111,9 +111,9 @@ |
112 | 112 | return array( 'found' => false ); |
113 | 113 | |
114 | 114 | if( empty( $raw ) ){ |
115 | | - return wfMsgNoTrans( 'onlinestatus-toggle-' . $status ); |
| 115 | + return wfMsgNoTrans( 'onlinestatus-toggle-' . $status[0] ); |
116 | 116 | } else { |
117 | | - return $status; |
| 117 | + return $status[0]; |
118 | 118 | } |
119 | 119 | } |
120 | 120 | |
— | — | @@ -138,7 +138,7 @@ |
139 | 139 | return true; |
140 | 140 | } |
141 | 141 | |
142 | | - $ret = wfMsgNoTrans( 'onlinestatus-toggle-' . $status ); |
| 142 | + $ret = wfMsgNoTrans( 'onlinestatus-toggle-' . $status[0] ); |
143 | 143 | $varCache['onlinestatus'] = $ret; |
144 | 144 | } elseif( $index == 'onlinestatus_word_raw' ){ |
145 | 145 | $status = self::GetUserStatus( $parser->getTitle() ); |
— | — | @@ -147,7 +147,7 @@ |
148 | 148 | return true; |
149 | 149 | } |
150 | 150 | |
151 | | - $ret = $status; |
| 151 | + $ret = $status[0]; |
152 | 152 | $varCache['onlinestatus'] = $ret; |
153 | 153 | } |
154 | 154 | |
— | — | @@ -260,7 +260,7 @@ |
261 | 261 | |
262 | 262 | // For grep. Message keys used here: |
263 | 263 | // onlinestatus-subtitle-offline, onlinestatus-subtitle-onfline |
264 | | - $out->setSubtitle( wfMsgExt( 'onlinestatus-subtitle-' . $status, array( 'parse' ) ) ); |
| 264 | + $out->setSubtitle( wfMsgExt( 'onlinestatus-subtitle-' . $status[0], array( 'parse' ), $status[1] ) ); |
265 | 265 | |
266 | 266 | return true; |
267 | 267 | } |
Index: trunk/extensions/OnlineStatus/OnlineStatus.i18n.php |
— | — | @@ -37,6 +37,10 @@ |
38 | 38 | 'onlinestatus-desc' => '{{desc}}', |
39 | 39 | 'onlinestatus-tab' => '{{Identical|Status}}', |
40 | 40 | 'onlinestatus-toggles-desc' => '{{Identical|Status}}', |
| 41 | + 'onlinestatus-subtitle-offline' => 'Parameters: |
| 42 | +* $1 can be used for GENDER support.', |
| 43 | + 'onlinestatus-subtitle-online' => 'Parameters: |
| 44 | +* $1 can be used for GENDER support.', |
41 | 45 | ); |
42 | 46 | |
43 | 47 | /** Afrikaans (Afrikaans) |