Index: trunk/extensions/Username/Username.php |
— | — | @@ -0,0 +1,21 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | + |
| 5 | +$wgHooks['ParserFirstCallInit'][] = 'efUsernameParserInit'; |
| 6 | + |
| 7 | +function efUsernameParserInit( &$parser ) { |
| 8 | + $parser->setHook( 'username', 'efUsernameRender' ); |
| 9 | + return true; |
| 10 | +} |
| 11 | + |
| 12 | +function efUsernameRender( $input, $args, $parser, $frame ) { |
| 13 | + // Nothing exciting here, just escape the user-provided |
| 14 | + // input and throw it back out again |
| 15 | + //return htmlspecialchars( $input ); |
| 16 | + global $wgUser; |
| 17 | + if (!$wgUser->isLoggedIn()) |
| 18 | + { |
| 19 | + return ($input==null)?"너":$input; |
| 20 | + } |
| 21 | + else return $wgUser->getName(); |
| 22 | +} |
Property changes on: trunk/extensions/Username/Username.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 23 | + native |