'wgEnableUploads' => self::getOptionValue( 'wgEnableUploads', $opts, true ),
'wgLanguageCode' => $langCode,
'wgRawHtml' => self::getOptionValue( 'wgRawHtml', $opts, false ),
- 'wgNamespacesWithSubpages' => [ 0 => isset( $opts['subpage'] ) ],
+ 'wgNamespacesWithSubpages' => [
+ 0 => isset( $opts['subpage'] ),
+ 2 => isset( $opts['subpage'] ),
+ ],
'wgMaxTocLevel' => $maxtoclevel,
'wgAllowExternalImages' => self::getOptionValue( 'wgAllowExternalImages', $opts, true ),
'wgThumbLimits' => [ self::getOptionValue( 'thumbsize', $opts, 180 ) ],
Handle title parsing for subpages
!! options
title=[[/123123]]
+subpage
!! wikitext
123
+!! html/php
+<p>123
+</p>
!! html/parsoid
<p>123</p>
!! end
-## FIXME: Add a working php section here
+!! article
+User:Test/123
+!! text
+test 123
+!! endarticle
+
!! test
Link to a subpage from a namespace other than main
!! options
-title=[[User:test]]
+title=[[User:Test]]
+subpage
!! wikitext
[[/123]]
+!! html/php
+<p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
+</p>
!! html/parsoid
<p><a rel="mw:WikiLink" href="./User:Test/123" title="User:Test/123" data-parsoid='{"stx":"simple","a":{"href":"./User:Test/123"},"sa":{"href":"/123"}}'>/123</a></p>
!! end
!! test
Purely hash wikilink
!! options
-title=[[User:test/123]]
+title=[[User:Test/123]]
+subpage
!! wikitext
[[#a|b]]
!! html/php