From 0022a545c809cec6b2b9b49edee2f4ada4a9ef01 Mon Sep 17 00:00:00 2001 From: Derick Alangi Date: Thu, 20 Jun 2019 22:49:04 +0100 Subject: [PATCH] GlobalFunctions: Remove deprecated wfCountDown() function from core The global function `wfCountDown()` was deprecated in 1.31 and a replacement made available (\Maintenance::countdown()) in 1.31 as well. Currently, the few usage in BSF have been cleaned up, hence can be removed. Usage ===== https://codesearch.wmflabs.org/search/?q=wfCountDown&i=nope&files=&repos= Depends-On: Iae61d36899036ecdc0341feb3f1bcaa6b38dbf44 Depends-On: Id202148c6a6ceaadcefcf7a4ab8360edd9fe3b0b Bug: T220656 Change-Id: Ic7460f1d35cb6f2eb8bf60694cdd4c55b2e001c0 --- RELEASE-NOTES-1.34 | 2 ++ includes/GlobalFunctions.php | 24 ------------------------ 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/RELEASE-NOTES-1.34 b/RELEASE-NOTES-1.34 index ae5a33a63b..67aa371b3e 100644 --- a/RELEASE-NOTES-1.34 +++ b/RELEASE-NOTES-1.34 @@ -222,6 +222,8 @@ because of Phabricator reports. * Parser::fetchFile(), deprecated in 1.32, has been removed. Use the method Parser::fetchFileAndTitle() instead. * The global function wfBCP47, deprecated in 1.31, has been removed. +* wfCountDown() function, deprecated in 1.31, has been removed. Use + \Maintenance::countDown() method instead. * … === Deprecations in 1.34 === diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 5e2efbfee9..c3829be981 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -2762,30 +2762,6 @@ function wfWaitForSlaves( return $lbFactory->waitForReplication( $opts ); } -/** - * Count down from $seconds to zero on the terminal, with a one-second pause - * between showing each number. For use in command-line scripts. - * - * @deprecated since 1.31, use Maintenance::countDown() - * - * @codeCoverageIgnore - * @param int $seconds - */ -function wfCountDown( $seconds ) { - wfDeprecated( __FUNCTION__, '1.31' ); - for ( $i = $seconds; $i >= 0; $i-- ) { - if ( $i != $seconds ) { - echo str_repeat( "\x08", strlen( $i + 1 ) ); - } - echo $i; - flush(); - if ( $i ) { - sleep( 1 ); - } - } - echo "\n"; -} - /** * Replace all invalid characters with '-'. * Additional characters can be defined in $wgIllegalFileChars (see T22489). -- 2.20.1