/** * Gets the default namespaces for a wiki and content language. * @return String */ public static function getDefaultNamespaces($lang = null) { if (!isset(self::$namespaces)) { if (is_null($lang) || !$lang instanceof Language) { $lang = F::app()->wg->ContLang; } $namespaces = $lang->getNsText(NS_CATEGORY); if (strpos($namespaces, 'Category') === false) { $namespaces = 'Category|' . $namespaces; } self::$namespaces = $namespaces; } return self::$namespaces; }