https://bugzilla.wikimedia.org/show_bug.cgi?id=11539

--- Comment #18 from Sam Reed (reedy) <s...@reedyboy.net> 2012-01-19 15:44:25 
UTC ---
(In reply to comment #17)
> Created attachment 9869 [details]
> 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.

I think your patch is the wrong way round, as it shows you're making it private

Also, please use a unified diff against a file, see
https://www.mediawiki.org/wiki/Subversion#Making_a_diff

-- 
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

Reply via email to