Index: trunk/extensions/DumpHTML/dumpHTML.inc |
— | — | @@ -789,6 +789,8 @@ |
790 | 790 | $linkCache->clear(); |
791 | 791 | |
792 | 792 | $context = new RequestContext(); |
| 793 | + $context->setRequest( new DumpFauxRequest( $title->getLocalUrl(), |
| 794 | + array( 'title' => $title->getPrefixedDbKey() ) ) ); |
793 | 795 | $context->setTitle( $title ); |
794 | 796 | $context->setUser( $wgUser ); |
795 | 797 | |
— | — | @@ -1424,4 +1426,22 @@ |
1425 | 1427 | /** XML parser callback */ |
1426 | 1428 | function wfDumpEndTagHandler( $parser, $name ) {} |
1427 | 1429 | |
| 1430 | +/** |
| 1431 | + * Workaround for bug 30921; extends FauxRequest to return a fake current URL. |
| 1432 | + * Needed by SkinTemplate::buildContentNavigationUrls for Special: pages. |
| 1433 | + */ |
| 1434 | +class DumpFauxRequest extends FauxRequest { |
| 1435 | + public function __construct( $url, $data, $wasPosted = false, $session = null ) { |
| 1436 | + parent::__construct( $data, $wasPosted, $session ); |
| 1437 | + $this->url = $url; |
| 1438 | + } |
| 1439 | + |
| 1440 | + /** |
| 1441 | + * Returns a stub '#' link, suitable for in-page linking to self. |
| 1442 | + * @return string URL |
| 1443 | + */ |
| 1444 | + public function getRequestURL() { |
| 1445 | + return $this->url; |
| 1446 | + } |
| 1447 | +} |
1428 | 1448 | # vim: syn=php |