Merge "Replace several uses of wfWikiId() with WikiMap methods"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sat, 30 Mar 2019 00:08:28 +0000 (00:08 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sat, 30 Mar 2019 00:08:28 +0000 (00:08 +0000)
1  2 
includes/api/ApiMain.php

diff --combined includes/api/ApiMain.php
@@@ -218,7 -218,7 +218,7 @@@ class ApiMain extends ApiBase 
                                                'cookies' => $sessionCookies,
                                                'ip' => $request->getIP(),
                                                'userAgent' => $this->getUserAgent(),
-                                               'wiki' => wfWikiID(),
+                                               'wiki' => WikiMap::getCurrentWikiDbDomain()->getId(),
                                        ]
                                );
                        }
                $request = $this->getRequest();
  
                // JSONP mode
 -              if ( $request->getVal( 'callback' ) !== null ) {
 +              if ( $request->getCheck( 'callback' ) ) {
                        $this->lacksSameOriginSecurity = true;
                        return true;
                }
                        'ts' => time(),
                        'ip' => $request->getIP(),
                        'userAgent' => $this->getUserAgent(),
-                       'wiki' => wfWikiID(),
+                       'wiki' => WikiMap::getCurrentWikiDbDomain()->getId(),
                        'timeSpentBackend' => (int)round( $time * 1000 ),
                        'hadError' => $e !== null,
                        'errorCodes' => [],
                                'method' => $request->getMethod(),
                                'client_ip' => $request->getIP()
                        ],
-                       'database' => wfWikiID(),
+                       'database' => WikiMap::getCurrentWikiDbDomain()->getId(),
                        'backend_time_ms' => (int)round( $time * 1000 ),
                ];