Update OOUI to v0.29.4
[lhc/web/wiklou.git] / includes / GlobalFunctions.php
index 49a2612..6e95871 100644 (file)
@@ -2656,6 +2656,7 @@ function wfWikiID() {
  * @param string $wiki
  *
  * @return array
+ * @deprecated 1.32
  */
 function wfSplitWikiID( $wiki ) {
        $bits = explode( '-', $wiki, 2 );
@@ -2847,15 +2848,19 @@ function wfGetNull() {
 function wfWaitForSlaves(
        $ifWritesSince = null, $wiki = false, $cluster = false, $timeout = null
 ) {
+       $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
+
        if ( $cluster === '*' ) {
                $cluster = false;
-               $wiki = false;
+               $domain = false;
        } elseif ( $wiki === false ) {
-               $wiki = wfWikiID();
+               $domain = $lbFactory->getLocalDomainID();
+       } else {
+               $domain = $wiki;
        }
 
        $opts = [
-               'wiki' => $wiki,
+               'domain' => $domain,
                'cluster' => $cluster,
                // B/C: first argument used to be "max seconds of lag"; ignore such values
                'ifWritesSince' => ( $ifWritesSince > 1e9 ) ? $ifWritesSince : null
@@ -2864,7 +2869,6 @@ function wfWaitForSlaves(
                $opts['timeout'] = $timeout;
        }
 
-       $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
        return $lbFactory->waitForReplication( $opts );
 }
 
@@ -3037,21 +3041,6 @@ function wfGetMessageCacheStorage() {
        return ObjectCache::getInstance( $wgMessageCacheType );
 }
 
-/**
- * Call hook functions defined in $wgHooks
- *
- * @param string $event Event name
- * @param array $args Parameters passed to hook functions
- * @param string|null $deprecatedVersion Optionally mark hook as deprecated with version number
- *
- * @return bool True if no handler aborted the hook
- * @deprecated since 1.25 - use Hooks::run
- */
-function wfRunHooks( $event, array $args = [], $deprecatedVersion = null ) {
-       wfDeprecated( __METHOD__, '1.25' );
-       return Hooks::run( $event, $args, $deprecatedVersion );
-}
-
 /**
  * Wrapper around php's unpack.
  *