jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/337815 )

Change subject: Replace deprecated suppress warnings
......................................................................


Replace deprecated suppress warnings

Change-Id: I0d5b90481ae2bc8caf4bfac269ac628bbbc47171
---
M MessageGroups.php
M api/ApiQueryMessageGroups.php
M ffs/IniFFS.php
M ffs/MediaWikiComplexMessages.php
M scripts/translator-stats.php
M utils/ExternalMessageSourceStateComparator.php
M utils/StatsTable.php
7 files changed, 18 insertions(+), 18 deletions(-)

Approvals:
  jenkins-bot: Verified
  Nikerabbit: Looks good to me, approved



diff --git a/MessageGroups.php b/MessageGroups.php
index cb22d90..05b172f 100644
--- a/MessageGroups.php
+++ b/MessageGroups.php
@@ -646,9 +646,9 @@
 
                // Work around php bug: https://bugs.php.net/bug.php?id=50688
                // Triggered by ApiQueryMessageGroups for example
-               wfSuppressWarnings();
+               MediaWiki\suppressWarnings();
                usort( $tree, array( __CLASS__, 'groupLabelSort' ) );
-               wfRestoreWarnings();
+               MediaWiki\restoreWarnings();
 
                /* Now we have two things left in $tree array:
                 * - solitaries: top-level non-aggregate message groups
diff --git a/api/ApiQueryMessageGroups.php b/api/ApiQueryMessageGroups.php
index d5967b2..af7118a 100644
--- a/api/ApiQueryMessageGroups.php
+++ b/api/ApiQueryMessageGroups.php
@@ -49,9 +49,9 @@
 
                        // Not sorted by default, so do it now
                        // Work around php bug: 
https://bugs.php.net/bug.php?id=50688
-                       wfSuppressWarnings();
+                       MediaWiki\suppressWarnings();
                        usort( $groups, array( 'MessageGroups', 
'groupLabelSort' ) );
-                       wfRestoreWarnings();
+                       MediaWiki\restoreWarnings();
                } elseif ( $params['root'] !== '' ) {
                        // format=tree from now on, as it is the only other 
valid option
                        $group = MessageGroups::getGroup( $params['root'] );
diff --git a/ffs/IniFFS.php b/ffs/IniFFS.php
index efbb8fe..40999e5 100644
--- a/ffs/IniFFS.php
+++ b/ffs/IniFFS.php
@@ -23,10 +23,10 @@
                 */
                $group = MessageGroupBase::factory( $conf );
 
-               wfSuppressWarnings();
+               MediaWiki\suppressWarnings();
                $ffs = new IniFFS( $group );
                $parsed = $ffs->readFromVariable( $data );
-               wfRestoreWarnings();
+               MediaWiki\restoreWarnings();
 
                return (bool)count( $parsed['MESSAGES'] );
        }
diff --git a/ffs/MediaWikiComplexMessages.php b/ffs/MediaWikiComplexMessages.php
index c3095bc..eb04008 100644
--- a/ffs/MediaWikiComplexMessages.php
+++ b/ffs/MediaWikiComplexMessages.php
@@ -192,9 +192,9 @@
 
        protected function val( $group, $type, $key ) {
                $array = $this->getGroups();
-               wfSuppressWarnings();
+               MediaWiki\suppressWarnings();
                $subarray = $array[$group]['data'][$type][$key];
-               wfRestoreWarnings();
+               MediaWiki\restoreWarnings();
                if ( $this->elementsInArray ) {
                        if ( !$subarray || !count( $subarray ) ) {
                                return array();
@@ -229,9 +229,9 @@
                }
 
                if ( $group['code'] ) {
-                       wfSuppressWarnings();
+                       MediaWiki\suppressWarnings();
                        $data = (array) ${$group['var']} [$code];
-                       wfRestoreWarnings();
+                       MediaWiki\restoreWarnings();
                } else {
                        $data = ${$group['var']};
                }
@@ -643,9 +643,9 @@
                        $values = $this->val( $group, self::LANG_CURRENT, $key 
);
 
                        foreach ( $values as $_ ) {
-                               wfSuppressWarnings();
+                               MediaWiki\suppressWarnings();
                                $title = SpecialPage::getTitleFor( $_ );
-                               wfRestoreWarnings();
+                               MediaWiki\restoreWarnings();
                                $link = Xml::element( 'a', array( 'href' => 
"#mw-sp-magic-$key" ), $key );
                                if ( $title === null ) {
                                        if ( $_ !== '' ) {
diff --git a/scripts/translator-stats.php b/scripts/translator-stats.php
index 8c5f863..af6032e 100644
--- a/scripts/translator-stats.php
+++ b/scripts/translator-stats.php
@@ -94,9 +94,9 @@
                                        $method = 'sandbox';
                                        break;
                                } elseif ( $log->log_action === 'rights' ) {
-                                       wfSuppressWarnings();
+                                       MediaWiki\suppressWarnings();
                                        $data = unserialize( $log->log_params );
-                                       wfRestoreWarnings();
+                                       MediaWiki\restoreWarnings();
                                        if ( $data === false ) {
                                                $lines = explode( "\n", 
$log->log_params );
                                                if ( strpos( $lines[1], 
'translator' ) !== false ) {
diff --git a/utils/ExternalMessageSourceStateComparator.php 
b/utils/ExternalMessageSourceStateComparator.php
index 9efe6a0..dc67ad4 100644
--- a/utils/ExternalMessageSourceStateComparator.php
+++ b/utils/ExternalMessageSourceStateComparator.php
@@ -104,9 +104,9 @@
        ) {
                /* This throws a warning if message definitions are not yet
                 * cached and will read the file for definitions. */
-               wfSuppressWarnings();
+               MediaWiki\suppressWarnings();
                $wiki = $group->initCollection( $code );
-               wfRestoreWarnings();
+               MediaWiki\restoreWarnings();
                $wiki->filter( 'hastranslation', false );
                $wiki->loadTranslations();
                $wikiKeys = $wiki->getMessageKeys();
diff --git a/utils/StatsTable.php b/utils/StatsTable.php
index 621a21d..4683249 100644
--- a/utils/StatsTable.php
+++ b/utils/StatsTable.php
@@ -72,9 +72,9 @@
        }
 
        public function getBackgroundColor( $subset, $total, $fuzzy = false ) {
-               wfSuppressWarnings();
+               MediaWiki\suppressWarnings();
                $v = round( 255 * $subset / $total );
-               wfRestoreWarnings();
+               MediaWiki\restoreWarnings();
 
                if ( $fuzzy ) {
                        // Weigh fuzzy with factor 20.

-- 
To view, visit https://gerrit.wikimedia.org/r/337815
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I0d5b90481ae2bc8caf4bfac269ac628bbbc47171
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: WMDE-Fisch <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to