[Bug 23307] Kill $wgTitle with fire
https://bugzilla.wikimedia.org/show_bug.cgi?id=23307 --- Comment #6 from Bryan Tong Minh bryan.tongm...@gmail.com 2010-11-06 14:23:51 UTC --- I was looking into this, and it appears that the main culprit is wfMsgExt( $msg, 'parsemag' ), which calls MessageCache::transform and in turn Parser::transformMsg. The way to fix this is to pass a $title object along the entire wfMsg chain. I used the following code to find out what is calling $wgTitle: class wgTitleStub extends StubObject { function __construct( $title ) { $this-title = $title; parent::__construct( 'wgTitle' ); } function _newObject() { return $this-title; } function _unstub( $name = '_unstub', $level = 2 ) { parent::_unstub( $name, $level ); $bt = array(); foreach ( wfDebugBacktrace() as $line ) { if ( isset( $line['class'] ) ) { $bt[] = {$line['class']}::{$line['function']}; } else { $bt[] = $line['function']; } } wfDebug('Full $wgTitle unstub backtrace: ' . implode( ', ', $bt ) . \n ); } } Then in Wiki::performRequestForTitle() remove the pass by reference from the function arguments and set $GLOBALS['wgTitle'] = new wgTitleStub( $title ); -- 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
[Bug 23307] Kill $wgTitle with fire
https://bugzilla.wikimedia.org/show_bug.cgi?id=23307 Bryan Tong Minh bryan.tongm...@gmail.com changed: What|Removed |Added Depends on||25393 -- 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
[Bug 23307] Kill $wgTitle with fire
https://bugzilla.wikimedia.org/show_bug.cgi?id=23307 Tim Starling tstarl...@wikimedia.org changed: What|Removed |Added CC||tstarl...@wikimedia.org Severity|major |normal -- 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
[Bug 23307] Kill $wgTitle with fire
https://bugzilla.wikimedia.org/show_bug.cgi?id=23307 Roan Kattouw roan.katt...@gmail.com changed: What|Removed |Added CC||roan.katt...@gmail.com --- Comment #3 from Roan Kattouw roan.katt...@gmail.com 2010-04-26 08:59:17 UTC --- ParserBeforeStrip is passed a $parser parameter, so you can grab the title with $parser-getTitle() . Similarly, you can use $ep-getArticle()-getTitle() in AlternateEdit. -- 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
[Bug 23307] Kill $wgTitle with fire
https://bugzilla.wikimedia.org/show_bug.cgi?id=23307 Chad H. innocentkil...@gmail.com changed: What|Removed |Added Blocks||700 -- 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
[Bug 23307] Kill $wgTitle with fire
https://bugzilla.wikimedia.org/show_bug.cgi?id=23307 --- Comment #4 from Reedy s...@reedyboy.net 2010-04-26 19:49:55 UTC --- Looks like from the API's pov, we can just nuke all the usages when they've been removed elsewhere etc. We're just keeping some crappy compatibility by assigning wgTitle to the one we're currently abusing -- 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
[Bug 23307] Kill $wgTitle with fire
https://bugzilla.wikimedia.org/show_bug.cgi?id=23307 tisane2...@gmail.com changed: What|Removed |Added CC||tisane2...@gmail.com --- Comment #2 from tisane2...@gmail.com 2010-04-26 02:35:20 UTC --- Before getting rid of $wgTitle, hooks such as AlternateEdit and ParserBeforeStrip should be modified to provide a $title parameter. The manual page on $wgTitle clearly warns about the problems with that global, but sometimes there's no alternative to using it, the way hooks are currently set up. -- 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
[Bug 23307] Kill $wgTitle with fire
https://bugzilla.wikimedia.org/show_bug.cgi?id=23307 Reedy s...@reedyboy.net changed: What|Removed |Added CC||s...@reedyboy.net --- Comment #1 from Reedy s...@reedyboy.net 2010-04-24 22:15:39 UTC --- Mmmm 172 usages in phase3 including comments? :( -- 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