Index: trunk/extensions/UserFunctions/UserFunctions.php |
— | — | @@ -61,18 +61,11 @@ |
62 | 62 | */ |
63 | 63 | function registerParser( &$parser ) { |
64 | 64 | |
65 | | - if ( defined( get_class( $parser ) . '::SFH_OBJECT_ARGS' ) ) { |
66 | | - // These functions accept DOM-style arguments |
67 | | - $parser->setFunctionHook( 'ifanon', array( &$this, 'ifanonObj' ), SFH_OBJECT_ARGS ); |
68 | | - $parser->setFunctionHook( 'ifblocked', array( &$this, 'ifblockedObj' ), SFH_OBJECT_ARGS ); |
69 | | - $parser->setFunctionHook( 'ifsysop', array( &$this, 'ifsysopObj' ), SFH_OBJECT_ARGS ); |
70 | | - $parser->setFunctionHook( 'ifingroup', array( &$this, 'ifingroupObj' ), SFH_OBJECT_ARGS ); |
71 | | - } else { |
72 | | - $parser->setFunctionHook( 'ifanon', array( &$this, 'ifanon' ) ); |
73 | | - $parser->setFunctionHook( 'ifblocked', array( &$this, 'ifblocked' ) ); |
74 | | - $parser->setFunctionHook( 'ifsysop', array( &$this, 'ifsysop' ) ); |
75 | | - $parser->setFunctionHook( 'ifingroup', array( &$this, 'ifingroup' ) ); |
76 | | - } |
| 65 | + // These functions accept DOM-style arguments |
| 66 | + $parser->setFunctionHook( 'ifanon', array( &$this, 'ifanonObj' ), SFH_OBJECT_ARGS ); |
| 67 | + $parser->setFunctionHook( 'ifblocked', array( &$this, 'ifblockedObj' ), SFH_OBJECT_ARGS ); |
| 68 | + $parser->setFunctionHook( 'ifsysop', array( &$this, 'ifsysopObj' ), SFH_OBJECT_ARGS ); |
| 69 | + $parser->setFunctionHook( 'ifingroup', array( &$this, 'ifingroupObj' ), SFH_OBJECT_ARGS ); |
77 | 70 | |
78 | 71 | $parser->setFunctionHook( 'realname', array( &$this, 'realname' ) ); |
79 | 72 | $parser->setFunctionHook( 'username', array( &$this, 'username' ) ); |