X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Ftitle%2FNaiveForeignTitleFactory.php;h=44cf90d8da29f244d10d6ba961d5f671c8513af6;hb=ea2f3d1c3adfa62b67f905d2795bc997b424a3f8;hp=6c8bcc04e8fa912ff3063dda93cf20198854c8d7;hpb=1e209d1e74cf2c0f5f78a3ca8014fc0af9d7f0a5;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/title/NaiveForeignTitleFactory.php b/includes/title/NaiveForeignTitleFactory.php index 6c8bcc04e8..44cf90d8da 100644 --- a/includes/title/NaiveForeignTitleFactory.php +++ b/includes/title/NaiveForeignTitleFactory.php @@ -16,7 +16,6 @@ * http://www.gnu.org/copyleft/gpl.html * * @file - * @license GPL 2+ */ /** @@ -45,16 +44,18 @@ class NaiveForeignTitleFactory implements ForeignTitleFactory { global $wgContLang; - // Can we assume that the part of the page title before the colon is a - // namespace name? - // - // XML export schema version 0.5 and earlier (MW 1.18 and earlier) does not - // contain a tag, so we need to be able to handle that case. - // - // If we know the namespace ID, we assume a non-zero namespace ID means - // the ':' sets off a valid namespace name. If we don't know the namespace - // ID, we fall back to using the local wiki's namespace names to resolve - // this -- better than nothing, and mimics the old crappy behavior + /** + * Can we assume that the part of the page title before the colon is a + * namespace name? + * + * XML export schema version 0.5 and earlier (MW 1.18 and earlier) does not + * contain a tag, so we need to be able to handle that case. + * + * If we know the namespace ID, we assume a non-zero namespace ID means + * the ':' sets off a valid namespace name. If we don't know the namespace + * ID, we fall back to using the local wiki's namespace names to resolve + * this -- better than nothing, and mimics the old crappy behavior + */ $isNamespacePartValid = is_null( $ns ) ? ( $wgContLang->getNsIndex( $pieces[0] ) !== false ) : $ns != 0;