From ef8e7945cc2dfff7293e52dd6467773382a4c93a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Wed, 3 Feb 2021 20:43:09 +0100 Subject: [PATCH] Stop showing the "Editing tabs" popup some time after SET switch If someone has edited before the switch (2016-ish), never edited since then, and try to edit again now, it's probably no longer helpful to show them a popup dialog about a change that happened 5 years ago. The immediate motivation for this, though, is T273189. We discovered a bug with the preferences that, among other issues, caused this dialog to not be shown in some cases where it should have been, and fixing the bug now would cause it to be shown the on the next edit attempt. If someone has edited before the switch (2016-ish), *and* edited since then, and try to edit again now, it's definitely not helpful at all to show them a popup dialog about a change that happened 5 years ago. Bug: T273189 Change-Id: I4b5a3d8dbdf1c853eb39fcfc85a9fe87a4db0f21 --- extension.json | 3 +++ includes/VisualEditorHooks.php | 1 + 2 files changed, 4 insertions(+) diff --git a/extension.json b/extension.json index b92cc2a58f..14bc80c141 100644 --- a/extension.json +++ b/extension.json @@ -136,6 +136,9 @@ "VisualEditorSingleEditTabSwitchTime": { "value": 20160101000000 }, + "VisualEditorSingleEditTabSwitchTimeEnd": { + "value": 20210101000000 + }, "VisualEditorSkinToolbarScrollOffset": { "value": [] }, diff --git a/includes/VisualEditorHooks.php b/includes/VisualEditorHooks.php index 345d217870..a932f6391c 100644 --- a/includes/VisualEditorHooks.php +++ b/includes/VisualEditorHooks.php @@ -446,6 +446,7 @@ class VisualEditorHooks { if ( $config->get( 'VisualEditorUseSingleEditTab' ) && + wfTimestampNow() < $config->get( 'VisualEditorSingleEditTabSwitchTimeEnd' ) && $user->isRegistered() && !$user->getOption( 'visualeditor-autodisable' ) && !$user->getOption( 'visualeditor-betatempdisable' ) &&