https://bugzilla.wikimedia.org/show_bug.cgi?id=11539
--- Comment #17 from Christian Neubauer <seventow...@gmail.com> 2012-01-19 14:11:55 UTC --- Created attachment 9869 --> https://bugzilla.wikimedia.org/attachment.cgi?id=9869 Make nodeContents public and add the $tag param to various hooks (In reply to comment #16) > What do the currently passed things give you? http://www.mediawiki.org/wiki/Manual:Hooks/ImportHandleRevisionXMLTag http://www.mediawiki.org/wiki/Manual:Hooks/AfterImportPage * $importer: The WikiImporter object * $pageInfo: An array of xml tag names => xml tag content for the <page> object * $revisionInfo: An array of xml tag names => xml tag contents for the <revision> object Theoretically in the ImportHandleRevisionXMLTag hook, you would process the XML input and add data to the $pageInfo or $revisionInfo array. Then later on in the AfterImportPage hook, you could process the data and save it to the database or whatever. The problem is, the actual data being parsed out of the XML is stored in the $tag object in the importer and that isn't passed to the hook so you can't actually see what tag is being encountered. Adding the $tag param to the hook would fix that. To get the contents of the XML tag, you need to call $importer->nodeContents() which is currently a private function. Making that function public would totally solve that. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l