Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/327379 )

Change subject: Fix CI errors
......................................................................

Fix CI errors

Change-Id: I97f1cc4c81388e5031dc45c99fb8dda74c38b0d0
---
M SimpleSecurity_body.php
1 file changed, 11 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SimpleSecurity 
refs/changes/79/327379/1

diff --git a/SimpleSecurity_body.php b/SimpleSecurity_body.php
index c7fccd8..1088509 100644
--- a/SimpleSecurity_body.php
+++ b/SimpleSecurity_body.php
@@ -179,19 +179,24 @@
         * - clears and populates the info array
         */
        public function onUserGetRights( $user, &$rights ) {
-               global $wgGroupPermissions, $wgOut, $wgRequest, 
$wgPageRestrictions;
+               global $wgOut, $wgRequest;
 
                # Hack to prevent specialpage operations on unreadable pages
                if ( !is_object( $wgOut ) ) return true;
                $title = $wgOut->getTitle();
+               if ( !is_object( $title ) ) return true;
                $ns = $title->getNamespace();
                if ( $ns == NS_SPECIAL ) {
                        list( $name, $par ) = explode( '/', $title->getDBkey() 
. '/', 2 );
-                       if ( $par ) $title = Title::newFromText( $par );
-                       elseif ( $wgRequest->getVal( 'target' ) )   $title = 
Title::newFromText( $wgRequest->getVal( 'target' ) );
-                       elseif ( $wgRequest->getVal( 'oldtitle' ) ) $title = 
Title::newFromText( $wgRequest->getVal( 'oldtitle' ) );
+                       if ( $par ) {
+                               $title = Title::newFromText( $par );
+                       } elseif ( $wgRequest->getVal( 'target' ) ) {
+                               $title = Title::newFromText( 
$wgRequest->getVal( 'target' ) );
+                       } elseif ( $wgRequest->getVal( 'oldtitle' ) ) {
+                               $title = Title::newFromText( 
$wgRequest->getVal( 'oldtitle' ) );
+                       }
                }
-               if ( !is_object( $title ) ) return true;   # If still no usable 
title bail
+               if ( !is_object( $title ) ) return true; # If still no usable 
title bail
 
                $groups = $user->getEffectiveGroups();
 
@@ -429,7 +434,7 @@
  */
 class LoadBalancerSimpleSecurity extends LoadBalancer {
 
-       function reallyOpenConnection( $server, $dbNameOverride = false ) {
+       function reallyOpenConnection( array $server, $dbNameOverride = false ) 
{
                if( !is_array( $server ) ) {
                        throw new MWException( 'You must update your 
load-balancing configuration. See DefaultSettings.php entry for $wgDBservers.' 
);
                }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I97f1cc4c81388e5031dc45c99fb8dda74c38b0d0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SimpleSecurity
Gerrit-Branch: master
Gerrit-Owner: Reedy <[email protected]>

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

Reply via email to