Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/177608

Change subject: Fixes for CollapsibleVector
......................................................................

Fixes for CollapsibleVector

* Includes fixes for prefernce.

* Bumps version to 0.1.4

Change-Id: I9387a31b5478a83c7db1b111ae9e8c3cc184fa88
---
M CollapsibleVector.hooks.php
M CollapsibleVector.php
2 files changed, 33 insertions(+), 9 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollapsibleVector 
refs/changes/08/177608/1

diff --git a/CollapsibleVector.hooks.php b/CollapsibleVector.hooks.php
index 796b381..7cfad33 100644
--- a/CollapsibleVector.hooks.php
+++ b/CollapsibleVector.hooks.php
@@ -35,9 +35,19 @@
                ),
        );
        
-       /* Protected Static Methods */
-       
-       protected static function isEnabled( $name ) {
+
+       /* Static Methods */
+
+       /**
+        * Checks if a certain option is enabled
+        *
+        * This method is public to allow other extensions that use 
CollapsibleVector to use the
+        * same configuration as CollapsibleVector itself
+        *
+        * @param $name string Name of the feature, should be a key of $features
+        * @return bool
+        */
+       public static function isEnabled( $name ) {
                global $wgVectorFeatures, $wgUser;
                
                // Features with global set to true are always enabled
@@ -146,4 +156,4 @@
                $vars['wgVectorEnabledModules'] = $enabledModules;
                return true;
        }
-}
+}
\ No newline at end of file
diff --git a/CollapsibleVector.php b/CollapsibleVector.php
index b3675d3..07aa280 100644
--- a/CollapsibleVector.php
+++ b/CollapsibleVector.php
@@ -6,7 +6,7 @@
  * @ingroup Extensions
  * 
  * @license GPL v2 or later
- * @version 0.1.2
+ * @version 0.1.4
  *
  * Requires MediaWiki 1.24+
  */
@@ -21,16 +21,31 @@
 
 // Each module may be configured individually to be globally on/off or user 
preference based
 $GLOBALS['wgVectorFeatures'] = array(
-       'collapsiblenav' => array( 'global' => true, 'user' => true ),
+       'collapsiblenav' => array( 'global' => false, 'user' => true ),
 );
+
+/* 
+ * Setting default option.
+ *
+ * Do not remove this.
+ *
+ * Bug T76314
+ */
+$wgDefaultUserOptions['vector-collapsiblenav'] = 1;
+
+/* 
+ * Setting default option.
+ * Do not remove this.
+ */
+$wgDefaultUserOptions['vector-noexperiments'] = 0;
 
 /* Setup */
 
 $GLOBALS['wgExtensionCredits']['other'][] = array(
        'path' => __FILE__,
        'name' => 'CollapsibleVector',
-       'author' => array( 'paladox' ),
-       'version' => '0.1.2',
+       'author' => array( 'Paladox' ),
+       'version' => '0.1.4',
        'url' => 'https://www.mediawiki.org/wiki/Extension:CollapsibleVector',
        'descriptionmsg' => 'collapsiblevector-desc',
 );
@@ -47,7 +62,6 @@
        'group' => 'ext.vector',
 );
 $GLOBALS['wgResourceModules'] += array(
-       // TODO this module should be merged with ext.vector.collapsibleTabs
        'ext.vector.collapsibleNav' => $vectorResourceTemplate + array(
                'scripts' => 'ext.vector.collapsibleNav.js',
                'styles' => 'ext.vector.collapsibleNav.less',

-- 
To view, visit https://gerrit.wikimedia.org/r/177608
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9387a31b5478a83c7db1b111ae9e8c3cc184fa88
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollapsibleVector
Gerrit-Branch: master
Gerrit-Owner: Paladox <thomasmulhall...@yahoo.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to