r106614 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106613‎ | r106614 | r106615 >
Date:00:28, 19 December 2011
Author:reedy
Status:ok
Tags:
Comment:
Really don't think we need < 1.12 back compat
Modified paths:
  • /trunk/extensions/UserFunctions/UserFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UserFunctions/UserFunctions.php
@@ -61,18 +61,11 @@
6262 */
6363 function registerParser( &$parser ) {
6464
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 );
7770
7871 $parser->setFunctionHook( 'realname', array( &$this, 'realname' ) );
7972 $parser->setFunctionHook( 'username', array( &$this, 'username' ) );

Status & tagging log