-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
leon@svn.wikimedia.org wrote:
* Is this a subpage?* @return bool* @access public*/- function isSubpage() {
global $wgNamespacesWithSubpages;return ( strpos( $this->getText(), '/' ) !== false && $wgNamespacesWithSubpages[ $this->mNamespace ] == true );- }
$wgNamespacesWithSubpages is sparse; that is, not all namespaces will necessarily be listed in it.
The check as written will produce an E_NOTICE-level warning when called on a page containing a slash whose namespace is not listed explicitly in $wgNamespacesWithSubpages.
- -- brion vibber (brion @ pobox.com)
wikitech-l@lists.wikimedia.org