Index: trunk/extensions/SemanticInternalObjects/SemanticInternalObjects.php |
— | — | @@ -22,6 +22,7 @@ |
23 | 23 | |
24 | 24 | $wgHooks['ParserFirstCallInit'][] = 'siofRegisterParserFunctions'; |
25 | 25 | $wgHooks['LanguageGetMagic'][] = 'siofLanguageGetMagic'; |
| 26 | +$wgHooks['ParserClearState'][] = 'SIOHandler::clearState'; |
26 | 27 | $wgHooks['smwDeleteSemanticData'][] = 'SIOHandler::updateData'; |
27 | 28 | $wgHooks['smwUpdatePropertySubjects'][] = 'SIOHandler::handleUpdatingOfInternalObjects'; |
28 | 29 | |
Index: trunk/extensions/SemanticInternalObjects/SemanticInternalObjects_body.php |
— | — | @@ -111,6 +111,13 @@ |
112 | 112 | static $internal_object_index = 1; |
113 | 113 | static $internal_objects = array(); |
114 | 114 | |
| 115 | + public static function clearState( &$parser ) { |
| 116 | + self::$cur_page_name = ''; |
| 117 | + self::$cur_page_namespace = 0; |
| 118 | + self::$internal_object_index = 1; |
| 119 | + return true; |
| 120 | + } |
| 121 | + |
115 | 122 | public static function doSetInternal( &$parser ) { |
116 | 123 | $main_page_name = $parser->getTitle()->getDBKey(); |
117 | 124 | $main_page_namespace = $parser->getTitle()->getNamespace(); |