Author: bugs
Description:
When viewing pages with action=render, style and image URLs are not properly expanded (i.e., transformed from "$wgStylePath/..." to "$wgServer$wgStylePath/...".
Some affected places:
- Article::viewRedirect()
- EnhancedChangesList::arrow()
- Linker::makeThumbLink2()
- TablePager::getStartBody()
- TablePager::getNavigationBar()
I suppressed from this list uses of $wgStylePath that shouldn't happen during action=render (i.e. skin displaying).
The easiest solution seems to be to rewrite $wgStylePath during startup, like this:
global $wgStylePath, $wgRequest; if ( $wgRequest->getVal( 'action' ) == 'render' ) { $wgStylePath = wfExpandUrl( $wgStylePath ); }
It seems to work fine, as far as I tested (I'm casting this from inside an extension). It is as ugly as the workaround currently (as of 1.14-svn) found in Title::getLocalUrl() for the same purpose, but it works.
Some better solution is demanded, sniffing into request vars is ugly at best.
Version: 1.14.x
Severity: normal