Last modified: 2009-09-04 01:05:48 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T22490, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 20490 - SyntaxHighlight setup may initialize a different parser object
SyntaxHighlight setup may initialize a different parser object
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
SyntaxHighlight (GeSHi) (Other open bugs)
unspecified
All All
: Normal minor (vote)
: ---
Assigned To: X!
: easy, patch
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-09-03 18:36 UTC by Juliano F. Ravasi
Modified: 2009-09-04 01:05 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Proposed fix. (1.14 KB, patch)
2009-09-03 18:36 UTC, Juliano F. Ravasi
Details

Description Juliano F. Ravasi 2009-09-03 18:36:21 UTC
Created attachment 6525 [details]
Proposed fix.

The parser object whose hooks are being initialized is passed as the first argument to the ParserFirstCallInit hook, but SyntaxHighlight_GeSHi initializes $wgParser no matter if it is really the one that generated the hook call.

This patch fixes this, by initializing the parser object passed as argument to the hook. A separate function is provided for pre-1.12 Mediawiki compatibility (where the only parser object is really $wgParser).
Comment 1 Alex Z. 2009-09-03 18:43:08 UTC
(In reply to comment #0)
> A separate function is provided for pre-1.12 Mediawiki compatibility
> (where the only parser object is really $wgParser).
> 

I don't think we really need to keep the trunk versions of extensions working with 2+ year-old versions of MediaWiki.
Comment 2 Juliano F. Ravasi 2009-09-03 18:48:41 UTC
(In reply to comment #1)
> 
> I don't think we really need to keep the trunk versions of extensions working
> with 2+ year-old versions of MediaWiki.
> 

I agree. I did the patch like that just because the extension is already formatted like that and to avoid breakage.

In the case legacy support is dropped, only the parameter usage part of the patch should be applied.

Related: bug 20491.
Comment 3 Tim Starling 2009-09-04 01:05:48 UTC
Fixed in 55796.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links