Merge "Better logging for botpasswords"
[lhc/web/wiklou.git] / includes / GlobalFunctions.php
index 3dfe12e..7e8df7e 100644 (file)
@@ -712,6 +712,8 @@ function wfAssembleUrl( $urlParts ) {
  *
  * @todo Need to integrate this into wfExpandUrl (see T34168)
  *
+ * @since 1.19
+ *
  * @param string $urlPath URL path, potentially containing dot-segments
  * @return string URL path with all dot-segments removed
  */
@@ -1511,9 +1513,10 @@ function wfHostname() {
  * If $wgShowHostnames is true, the script will also set 'wgHostname' to the
  * hostname of the server handling the request.
  *
+ * @param string $nonce Value from OutputPage::getCSPNonce
  * @return string
  */
-function wfReportTime() {
+function wfReportTime( $nonce = null ) {
        global $wgShowHostnames;
 
        $elapsed = ( microtime( true ) - $_SERVER['REQUEST_TIME_FLOAT'] );
@@ -1523,7 +1526,7 @@ function wfReportTime() {
        if ( $wgShowHostnames ) {
                $reportVars['wgHostname'] = wfHostname();
        }
-       return Skin::makeVariablesScript( $reportVars );
+       return Skin::makeVariablesScript( $reportVars, $nonce );
 }
 
 /**
@@ -2269,18 +2272,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.
@@ -2362,18 +2353,6 @@ 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
@@ -2583,6 +2562,7 @@ function wfDiff( $before, $after, $params = '-u' ) {
  * @throws MWException
  */
 function wfUsePHP( $req_ver ) {
+       wfDeprecated( __FUNCTION__, '1.30' );
        $php_ver = PHP_VERSION;
 
        if ( version_compare( $php_ver, (string)$req_ver, '<' ) ) {
@@ -3059,6 +3039,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 ) );