Drop the check for existences of LocalSettings.php in MediaWikiIntegrationTestCase
[lhc/web/wiklou.git] / includes / GlobalFunctions.php
index 759732f..05c4655 100644 (file)
@@ -30,7 +30,6 @@ use MediaWiki\MediaWikiServices;
 use MediaWiki\ProcOpenError;
 use MediaWiki\Session\SessionManager;
 use MediaWiki\Shell\Shell;
-use Wikimedia\ScopedCallback;
 use Wikimedia\WrappedString;
 use Wikimedia\AtEase\AtEase;
 
@@ -1882,10 +1881,9 @@ function wfTimestampOrNull( $outputtype = TS_UNIX, $ts = null ) {
 /**
  * Convenience function; returns MediaWiki timestamp for the present time.
  *
- * @return string
+ * @return string TS_MW timestamp
  */
 function wfTimestampNow() {
-       # return NOW
        return MWTimestamp::now( TS_MW );
 }
 
@@ -2431,28 +2429,6 @@ function wfRelativePath( $path, $from ) {
        return implode( DIRECTORY_SEPARATOR, $pieces );
 }
 
-/**
- * Reset the session id
- *
- * @deprecated since 1.27, use MediaWiki\Session\SessionManager instead
- * @since 1.22
- */
-function wfResetSessionID() {
-       wfDeprecated( __FUNCTION__, '1.27' );
-       $session = SessionManager::getGlobalSession();
-       $delay = $session->delaySave();
-
-       $session->resetId();
-
-       // Make sure a session is started, since that's what the old
-       // wfResetSessionID() did.
-       if ( session_id() !== $session->getId() ) {
-               wfSetupSession( $session->getId() );
-       }
-
-       ScopedCallback::consume( $delay );
-}
-
 /**
  * Initialise php session
  *
@@ -2601,19 +2577,6 @@ function wfGetLB( $wiki = false ) {
        }
 }
 
-/**
- * Get the load balancer factory object
- *
- * @deprecated since 1.27, use MediaWikiServices::getInstance()->getDBLoadBalancerFactory() instead.
- * TODO: Remove in MediaWiki 1.35
- *
- * @return \Wikimedia\Rdbms\LBFactory
- */
-function wfGetLBFactory() {
-       wfDeprecated( __METHOD__, '1.27' );
-       return MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
-}
-
 /**
  * Find a file.
  * @deprecated since 1.34, use MediaWikiServices
@@ -2762,30 +2725,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).
@@ -2885,21 +2824,6 @@ function wfShorthandToInteger( $string = '', $default = -1 ) {
        return $val;
 }
 
-/**
- * Get the normalised IETF language tag
- * See unit test for examples.
- * See mediawiki.language.bcp47 for the JavaScript implementation.
- *
- * @deprecated since 1.31, use LanguageCode::bcp47() directly.
- *
- * @param string $code The language code.
- * @return string The language code which complying with BCP 47 standards.
- */
-function wfBCP47( $code ) {
-       wfDeprecated( __METHOD__, '1.31' );
-       return LanguageCode::bcp47( $code );
-}
-
 /**
  * Get a specific cache object.
  *