*
* @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
*/
* 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'] );
if ( $wgShowHostnames ) {
$reportVars['wgHostname'] = wfHostname();
}
- return Skin::makeVariablesScript( $reportVars );
+ return Skin::makeVariablesScript( $reportVars, $nonce );
}
/**
* @throws MWException
*/
function wfUsePHP( $req_ver ) {
+ wfDeprecated( __FUNCTION__, '1.30' );
$php_ver = PHP_VERSION;
if ( version_compare( $php_ver, (string)$req_ver, '<' ) ) {
* @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 ) );