*/
$wgUseAJAXCategories = false;
+/**
+ * Only enable AJAXCategories on configured namespaces. Default is all.
+ *
+ * Example:
+ * $wgAJAXCategoriesNamespaces = array( NS_MAIN, NS_PROJECT );
+ */
+$wgAJAXCategoriesNamespaces = array();
+
/**
* To disable file delete/restore temporarily
*/
global $wgUseAJAXCategories;
if ($wgUseAJAXCategories) {
- $this->addScriptClass( 'ajaxCategories' );
+ global $wgAJAXCategoriesNamespaces;
+
+ $title = $this->getTitle();
+
+ if( empty( $wgAJAXCategoriesNamespaces ) || in_array( $title->getNamespace(), $wgAJAXCategoriesNamespaces ) ) {
+ $this->addScriptClass( 'ajaxCategories' );
+ }
}
if( $wgUniversalEditButton ) {