-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
leon(a)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)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (Darwin)
Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.org
iD8DBQFFfwrKwRnhpk1wk44RAvy4AJoDKV/X7W7+9MNZL4y5yBQBwsonwQCg0cFU
aUR9rjORUlMvGSAtpweE1Vc=
=823l
-----END PGP SIGNATURE-----