Index: trunk/extensions/LiquidThreads/classes/View.php |
— | — | @@ -1197,16 +1197,19 @@ |
1198 | 1198 | function getSignature( $user ) { |
1199 | 1199 | if ( is_object($user) ) { |
1200 | 1200 | $uid = $user->getId(); |
| 1201 | + $name = $user->getName(); |
1201 | 1202 | } elseif ( is_integer($user) ) { |
1202 | 1203 | $uid = $user; |
1203 | | - $user = null; |
| 1204 | + $user = User::newFromId($uid); |
| 1205 | + $name = $user->getName(); |
1204 | 1206 | } else { |
1205 | 1207 | $user = User::newFromName( $user ); |
| 1208 | + $name = $user->getName(); |
1206 | 1209 | $uid = $user->getId(); |
1207 | 1210 | } |
1208 | 1211 | |
1209 | | - if ( isset( self::$userSignatureCache[$uid] ) ) { |
1210 | | - return self::$userSignatureCache[$uid]; |
| 1212 | + if ( isset( self::$userSignatureCache[$name] ) ) { |
| 1213 | + return self::$userSignatureCache[$name]; |
1211 | 1214 | } |
1212 | 1215 | |
1213 | 1216 | if (!$user) { |
— | — | @@ -1218,7 +1221,7 @@ |
1219 | 1222 | $sig = $wgParser->getUserSig( $user ); |
1220 | 1223 | $sig = $wgOut->parseInline( $sig ); |
1221 | 1224 | |
1222 | | - self::$userSignatureCache[$uid] = $sig; |
| 1225 | + self::$userSignatureCache[$name] = $sig; |
1223 | 1226 | |
1224 | 1227 | return $sig; |
1225 | 1228 | } |
Index: trunk/extensions/LiquidThreads/classes/Thread.php |
— | — | @@ -487,6 +487,7 @@ |
488 | 488 | |
489 | 489 | foreach( $userIds as $uid ) { |
490 | 490 | $user = User::newFromId($uid); // Should pull from UID cache. |
| 491 | + $name = $user->getName(); |
491 | 492 | |
492 | 493 | // Grab sig data |
493 | 494 | $nickname = null; |
— | — | @@ -503,7 +504,7 @@ |
504 | 505 | $sig = $wgOut->parseInline( $sig ); |
505 | 506 | |
506 | 507 | // Save into LqtView for later use. |
507 | | - LqtView::$userSignatureCache[$uid] = $sig; |
| 508 | + LqtView::$userSignatureCache[$name] = $sig; |
508 | 509 | } |
509 | 510 | } |
510 | 511 | |