Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/101469


Change subject: rtrim doesn't work
......................................................................

rtrim doesn't work

Fix by Skizzerz

Change-Id: I87340a0b76e49fd5409cfc965d13c4a19a4b156d
---
M GlobalPreferences.hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalPreferences 
refs/changes/69/101469/1

diff --git a/GlobalPreferences.hooks.php b/GlobalPreferences.hooks.php
index d35a43b..578dd49 100644
--- a/GlobalPreferences.hooks.php
+++ b/GlobalPreferences.hooks.php
@@ -107,7 +107,7 @@
                $prefs = array();
                foreach ( $formData as $name => $value ) {
                        if ( substr( $name, -strlen( 'global' ) ) === 'global' 
&& $value === true ) {
-                               $realName = rtrim( $name, '-global' );
+                               $realName = substr( $name, 0, -strlen( 
'-global' ) );
                                if ( isset( $formData[$realName] ) && 
!in_array( $realName, self::$badPrefs ) ) {
                                        $prefs[$realName] = 
$formData[$realName];
                                } else {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I87340a0b76e49fd5409cfc965d13c4a19a4b156d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GlobalPreferences
Gerrit-Branch: master
Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to