Index: trunk/extensions/UserFunctions/UserFunctions_body.php |
— | — | @@ -28,6 +28,8 @@ |
29 | 29 | */ |
30 | 30 | function ifanonObj( &$parser, $frame, $args ) { |
31 | 31 | $myuser = $this->getUserObj($parser); |
| 32 | + $parser->disableCache(); |
| 33 | + |
32 | 34 | if($myuser->isAnon()){ |
33 | 35 | return isset( $args[0] ) ? trim( $frame->expand( $args[0] ) ) : ''; |
34 | 36 | } else { |
— | — | @@ -43,6 +45,8 @@ |
44 | 46 | */ |
45 | 47 | function ifblockedObj( &$parser, $frame, $args ) { |
46 | 48 | $myuser = $this->getUserObj($parser); |
| 49 | + $parser->disableCache(); |
| 50 | + |
47 | 51 | if($myuser->isBlocked()){ |
48 | 52 | return isset( $args[0] ) ? trim( $frame->expand( $args[0] ) ) : ''; |
49 | 53 | } else { |
— | — | @@ -58,6 +62,8 @@ |
59 | 63 | */ |
60 | 64 | function ifsysopObj( &$parser, $frame, $args ) { |
61 | 65 | $myuser = $this->getUserObj($parser); |
| 66 | + $parser->disableCache(); |
| 67 | + |
62 | 68 | if($myuser->isAllowed('protect')){ |
63 | 69 | return isset( $args[0] ) ? trim( $frame->expand( $args[0] ) ) : ''; |
64 | 70 | } else { |
— | — | @@ -73,6 +79,8 @@ |
74 | 80 | */ |
75 | 81 | function ifingroupObj( &$parser, $frame, $args ) { |
76 | 82 | $myuser = $this->getUserObj($parser); |
| 83 | + $parser->disableCache(); |
| 84 | + |
77 | 85 | $grp = isset( $args[0] ) ? trim( $frame->expand( $args[0] ) ) : ''; |
78 | 86 | |
79 | 87 | if($grp!=='' && in_array($grp,$myuser->getEffectiveGroups())){ |
Index: trunk/extensions/UserFunctions/UserFunctions.php |
— | — | @@ -1,7 +1,7 @@ |
2 | 2 | <?php |
3 | 3 | /** |
4 | 4 | * UserFunctions extension - Provides a set of dynamic parser functions that trigger on the current user. |
5 | | - * @version 2.0 - 2011/12/13 (Based on ParserFunctions) |
| 5 | + * @version 2.1.1 - 2011/12/23 (Based on ParserFunctions) |
6 | 6 | * |
7 | 7 | * @link http://www.mediawiki.org/wiki/Extension:UserFunctions Documentation |
8 | 8 | * |
— | — | @@ -35,7 +35,7 @@ |
36 | 36 | $wgExtensionCredits['parserhook'][] = array( |
37 | 37 | 'path' => __FILE__, |
38 | 38 | 'name' => 'UserFunctions', |
39 | | - 'version' => '2.1', |
| 39 | + 'version' => '2.1.1', |
40 | 40 | 'url' => 'https://www.mediawiki.org/wiki/Extension:UserFunctions', |
41 | 41 | 'author' => array( 'Algorithm ', 'Toniher', 'Kghbln', 'Wikinaut', '...' ), |
42 | 42 | 'descriptionmsg' => 'userfunctions-desc', |