X-Git-Url: http://git.cyclocoop.org//%22%22._DIR_PLUGIN_FULLCALENDAR.%22prive/themes/spip/images/event_edit.png/%22?a=blobdiff_plain;f=includes%2Futils%2FUIDGenerator.php;h=4d5c3af82f62ba30dae9e5333000041f824aae2a;hb=39f0f919c5708f4c672a8eb7e0891f50bf16883e;hp=dd9f2d9f618a360d07d43db3ccbc4d0f6ad2682f;hpb=43a548a5c3436b5d07091b504bbf5eb80d1ed215;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/utils/UIDGenerator.php b/includes/utils/UIDGenerator.php index dd9f2d9f61..4d5c3af82f 100644 --- a/includes/utils/UIDGenerator.php +++ b/includes/utils/UIDGenerator.php @@ -53,7 +53,7 @@ class UIDGenerator { } // Try to get some ID that uniquely identifies this machine (RFC 4122)... if ( !preg_match( '/^[0-9a-f]{12}$/i', $nodeId ) ) { - MediaWiki\suppressWarnings(); + Wikimedia\suppressWarnings(); if ( wfIsWindows() ) { // https://technet.microsoft.com/en-us/library/bb490913.aspx $csv = trim( wfShellExec( 'getmac /NH /FO CSV' ) ); @@ -67,7 +67,7 @@ class UIDGenerator { wfShellExec( '/sbin/ifconfig -a' ), $m ); $nodeId = isset( $m[1] ) ? str_replace( ':', '', $m[1] ) : ''; } - MediaWiki\restoreWarnings(); + Wikimedia\restoreWarnings(); if ( !preg_match( '/^[0-9a-f]{12}$/i', $nodeId ) ) { $nodeId = MWCryptRand::generateHex( 12, true ); $nodeId[1] = dechex( hexdec( $nodeId[1] ) | 0x1 ); // set multicast bit @@ -364,10 +364,10 @@ class UIDGenerator { $counter = null; // post-increment persistent counter value - // Use APC/eAccelerator/xcache if requested, available, and not in CLI mode; + // Use APC/etc if requested, available, and not in CLI mode; // Counter values would not survive accross script instances in CLI mode. $cache = null; - if ( ( $flags & self::QUICK_VOLATILE ) && PHP_SAPI !== 'cli' ) { + if ( ( $flags & self::QUICK_VOLATILE ) && !wfIsCLI() ) { $cache = MediaWikiServices::getInstance()->getLocalServerObjectCache(); } if ( $cache ) { @@ -542,7 +542,7 @@ class UIDGenerator { /** * @param array $time Result of UIDGenerator::millitime() - * @param integer $delta Number of intervals to add on to the timestamp + * @param int $delta Number of intervals to add on to the timestamp * @return string 60 bits of "100ns intervals since 15 October 1582" (rolls over in 3400) * @throws RuntimeException */