Index: trunk/phase3/includes/Credits.php |
— | — | @@ -119,14 +119,18 @@ |
120 | 120 | $cnt--; |
121 | 121 | if ( $user->isLoggedIn() ) { |
122 | 122 | $link = self::link( $user ); |
123 | | - if ( !in_array( 'realname', $wgHiddenPrefs ) && $user->getRealName() ) |
| 123 | + if ( !in_array( 'realname', $wgHiddenPrefs ) && $user->getRealName() ) { |
124 | 124 | $real_names[] = $link; |
125 | | - else |
| 125 | + } else { |
126 | 126 | $user_names[] = $link; |
| 127 | + } |
127 | 128 | } else { |
128 | 129 | $anon_ips[] = self::link( $user ); |
129 | 130 | } |
130 | | - if ( $cnt == 0 ) break; |
| 131 | + |
| 132 | + if ( $cnt == 0 ) { |
| 133 | + break; |
| 134 | + } |
131 | 135 | } |
132 | 136 | |
133 | 137 | if ( count( $real_names ) ) { |
— | — | @@ -137,15 +141,21 @@ |
138 | 142 | |
139 | 143 | # "ThisSite user(s) A, B and C" |
140 | 144 | if ( count( $user_names ) ) { |
141 | | - $user = wfMsgExt( 'siteusers', array( 'parsemag' ), |
142 | | - $wgLang->listToText( $user_names ), count( $user_names ) ); |
| 145 | + $user = wfMsgExt( |
| 146 | + 'siteusers', |
| 147 | + 'parsemag', |
| 148 | + $wgLang->listToText( $user_names ), count( $user_names ) |
| 149 | + ); |
143 | 150 | } else { |
144 | 151 | $user = false; |
145 | 152 | } |
146 | 153 | |
147 | 154 | if ( count( $anon_ips ) ) { |
148 | | - $anon = wfMsgExt( 'anonusers', array( 'parsemag' ), |
149 | | - $wgLang->listToText( $anon_ips ), count( $anon_ips ) ); |
| 155 | + $anon = wfMsgExt( |
| 156 | + 'anonusers', |
| 157 | + 'parsemag', |
| 158 | + $wgLang->listToText( $anon_ips ), count( $anon_ips ) |
| 159 | + ); |
150 | 160 | } else { |
151 | 161 | $anon = false; |
152 | 162 | } |
— | — | @@ -174,10 +184,11 @@ |
175 | 185 | */ |
176 | 186 | protected static function link( User $user ) { |
177 | 187 | global $wgUser, $wgHiddenPrefs; |
178 | | - if ( !in_array( 'realname', $wgHiddenPrefs ) && !$user->isAnon() ) |
| 188 | + if ( !in_array( 'realname', $wgHiddenPrefs ) && !$user->isAnon() ) { |
179 | 189 | $real = $user->getRealName(); |
180 | | - else |
| 190 | + } else { |
181 | 191 | $real = false; |
| 192 | + } |
182 | 193 | |
183 | 194 | $skin = $wgUser->getSkin(); |
184 | 195 | $page = $user->isAnon() ? |
— | — | @@ -198,10 +209,11 @@ |
199 | 210 | return wfMsgExt( 'anonuser', array( 'parseinline', 'replaceafter' ), $link ); |
200 | 211 | } else { |
201 | 212 | global $wgHiddenPrefs; |
202 | | - if ( !in_array( 'realname', $wgHiddenPrefs ) && $user->getRealName() ) |
| 213 | + if ( !in_array( 'realname', $wgHiddenPrefs ) && $user->getRealName() ) { |
203 | 214 | return $link; |
204 | | - else |
205 | | - return wfMsgExt( 'siteuser', array( 'parseinline', 'replaceafter' ), $link ); |
| 215 | + } else { |
| 216 | + return wfMsgExt( 'siteuser', 'parsemag', $link, $user->getName() ); |
| 217 | + } |
206 | 218 | } |
207 | 219 | } |
208 | 220 | |