Hard-deprecate wfCountDown()
[lhc/web/wiklou.git] / includes / GlobalFunctions.php
index 513f593..be6109c 100644 (file)
@@ -2269,18 +2269,6 @@ function wfEscapeShellArg( /*...*/ ) {
        return call_user_func_array( Shell::class . '::escape', $args );
 }
 
-/**
- * Check if wfShellExec() is effectively disabled via php.ini config
- *
- * @return bool|string False or 'disabled'
- * @since 1.22
- * @deprecated since 1.30 use MediaWiki\Shell::isDisabled()
- */
-function wfShellExecDisabled() {
-       wfDeprecated( __FUNCTION__, '1.30' );
-       return Shell::isDisabled() ? 'disabled' : false;
-}
-
 /**
  * Execute a shell command, with time and memory limits mirrored from the PHP
  * configuration if supported.
@@ -2327,6 +2315,8 @@ function wfShellExec( $cmd, &$retval = null, $environ = [],
                        ->limits( $limits )
                        ->includeStderr( $includeStderr )
                        ->profileMethod( $profileMethod )
+                       // For b/c
+                       ->restrict( Shell::RESTRICT_NONE )
                        ->execute();
        } catch ( ProcOpenError $ex ) {
                $retval = -1;
@@ -2360,23 +2350,13 @@ function wfShellExecWithStderr( $cmd, &$retval = null, $environ = [], $limits =
                [ 'duplicateStderr' => true, 'profileMethod' => wfGetCaller() ] );
 }
 
-/**
- * Formerly set the locale for locale-sensitive operations
- *
- * This is now done in Setup.php.
- *
- * @deprecated since 1.30, no longer needed
- * @see $wgShellLocale
- */
-function wfInitShellLocale() {
-       wfDeprecated( __FUNCTION__, '1.30' );
-}
-
 /**
  * Generate a shell-escaped command line string to run a MediaWiki cli script.
  * Note that $parameters should be a flat array and an option with an argument
  * should consist of two consecutive items in the array (do not use "--option value").
  *
+ * @deprecated since 1.31, use Shell::makeScriptCommand()
+ *
  * @param string $script MediaWiki cli script path
  * @param array $parameters Arguments and options to the script
  * @param array $options Associative array of options:
@@ -3055,6 +3035,7 @@ function wfWaitForSlaves(
  * @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 ) );