Bartosz Dziewoński has uploaded a new change for review.
https://gerrit.wikimedia.org/r/87027
Change subject: Remove 'vector-noexperiments' preference
......................................................................
Remove 'vector-noexperiments' preference
It is no longed used by anything.
Remove switchExperimentPrefs.php maintenance script as well,
as it doesn't make sense without that preference.
Bug: 54852
Change-Id: I33dc0033cde3aba2dd40bc4915d756b6b4659429
---
M Vector.hooks.php
M Vector.i18n.php
D switchExperimentPrefs.php
3 files changed, 0 insertions(+), 74 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Vector
refs/changes/27/87027/1
diff --git a/Vector.hooks.php b/Vector.hooks.php
index d206431..6a924d1 100644
--- a/Vector.hooks.php
+++ b/Vector.hooks.php
@@ -11,15 +11,6 @@
/* Protected Static Members */
protected static $features = array(
- 'experiments' => array(
- 'preferences' => array(
- 'vector-noexperiments' => array(
- 'type' => 'toggle',
- 'label-message' =>
'vector-noexperiments-preference',
- 'section' =>
'rendering/advancedrendering',
- ),
- ),
- ),
);
/* Protected Static Methods */
diff --git a/Vector.i18n.php b/Vector.i18n.php
index 33f2374..650d3f6 100644
--- a/Vector.i18n.php
+++ b/Vector.i18n.php
@@ -17,7 +17,6 @@
'vector-collapsiblenav-preference' => 'Enable collapsing of items in
the sidebar in Vector skin',
'vector-simplesearch-search' => 'Search',
'vector-simplesearch-containing' => 'containing...',
- 'vector-noexperiments-preference' => 'Exclude me from feature
experiments',
);
/** Message documentation (Message documentation)
@@ -36,7 +35,6 @@
{{Identical|Search}}',
'vector-simplesearch-containing' => 'Label used in the special item of
the search suggestions list which gives the user an option to perform a full
text search for the term.',
- 'vector-noexperiments-preference' => 'An option in
[[Special:Preferences]]',
);
/** Achinese (Acèh)
diff --git a/switchExperimentPrefs.php b/switchExperimentPrefs.php
deleted file mode 100644
index 82ddd86..0000000
--- a/switchExperimentPrefs.php
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-
-$path = '../..';
-
-if ( getenv( 'MW_INSTALL_PATH' ) !== false ) {
- $path = getenv( 'MW_INSTALL_PATH' );
-}
-
-require_once( $path . '/maintenance/Maintenance.php' );
-
-class SwitchExperimentPrefs extends Maintenance {
- function __construct() {
- parent::__construct();
- $this->addOption( 'pref', 'Preference to set', true, true );
- $this->addOption( 'value', 'Value to set the preference to',
true, true );
- $this->mDescription = 'Set a preference for all users that have
the vector-noexperiments preference enabled.';
- }
-
- function execute() {
- $dbw = wfGetDB( DB_MASTER );
-
- $batchSize = 100;
- $total = 0;
- $lastUserID = 0;
- while ( true ) {
- $res = $dbw->select( 'user_properties', array(
'up_user' ),
- array( 'up_property' => 'vector-noexperiments',
"up_user > $lastUserID" ),
- __METHOD__,
- array( 'LIMIT' => $batchSize ) );
- if ( !$res->numRows() ) {
- $dbw->commit();
- break;
- }
- $total += $res->numRows();
-
- $ids = array();
- foreach ( $res as $row ) {
- $ids[] = $row->up_user;
- }
- $lastUserID = max( $ids );
-
-
- foreach ( $ids as $id ) {
- $user = User::newFromId( $id );
- if ( !$user->isLoggedIn() )
- continue;
- $user->setOption( $this->getOption( 'pref' ),
$this->getOption( 'value' ) );
- $user->saveSettings();
- }
-
- echo "$total\n";
-
- wfWaitForSlaves(); // Must be
wfWaitForSlaves_masterPos(); on 1.17wmf1
- }
- echo "Done\n";
-
- }
-}
-
-$maintClass = 'SwitchExperimentPrefs';
-require_once( RUN_MAINTENANCE_IF_MAIN );
-
-
--
To view, visit https://gerrit.wikimedia.org/r/87027
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I33dc0033cde3aba2dd40bc4915d756b6b4659429
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Vector
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits