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

Change subject: Log session IDs when adding info & failing to find it
......................................................................

Log session IDs when adding info & failing to find it

Change-Id: I63ee2d269a8f7197c9bbf2fd1c99bb2edd383435
---
M gateway_common/GatewayPage.php
M gateway_common/WmfFramework.drupal.php
M gateway_common/WmfFramework.mediawiki.php
M gateway_common/gateway.adapter.php
4 files changed, 11 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/04/353904/1

diff --git a/gateway_common/GatewayPage.php b/gateway_common/GatewayPage.php
index 33c0bd6..94247fb 100644
--- a/gateway_common/GatewayPage.php
+++ b/gateway_common/GatewayPage.php
@@ -404,7 +404,7 @@
                                wfHttpError( 403, 'Forbidden', wfMessage( 
'donate_interface-error-http-403' )->text() );
                                throw new RuntimeException(
                                        'Resultswitcher: Request forbidden. No 
active donation in the session. ' .
-                                       "Adapter Order ID: $oid"
+                                       "Adapter Order ID: $oid. Cookies: " . 
print_r( $_COOKIE, true )
                                );
                        }
                        // If it's possible for a donation to go through 
without our
diff --git a/gateway_common/WmfFramework.drupal.php 
b/gateway_common/WmfFramework.drupal.php
index 23581df..4ddd5f8 100644
--- a/gateway_common/WmfFramework.drupal.php
+++ b/gateway_common/WmfFramework.drupal.php
@@ -76,6 +76,10 @@
                throw new BadMethodCallException( 'Unimplemented' );
        }
 
+       static function getSessionId() {
+               throw new BadMethodCallException( 'Unimplemented' );
+       }
+
        static function validateIP( $ip ) {
                return true;
        }
diff --git a/gateway_common/WmfFramework.mediawiki.php 
b/gateway_common/WmfFramework.mediawiki.php
index 37ecf9b..94ac1e4 100644
--- a/gateway_common/WmfFramework.mediawiki.php
+++ b/gateway_common/WmfFramework.mediawiki.php
@@ -61,6 +61,10 @@
                RequestContext::getMain()->getRequest()->setSessionData( $key, 
$value );
        }
 
+       static function getSessionId() {
+               return SessionManager::getGlobalSession()->getId();
+       }
+
        static function validateIP( $ip ) {
                return IP::isValid( $ip );
        }
diff --git a/gateway_common/gateway.adapter.php 
b/gateway_common/gateway.adapter.php
index 3bd0b21..f3d6f7d 100644
--- a/gateway_common/gateway.adapter.php
+++ b/gateway_common/gateway.adapter.php
@@ -2876,8 +2876,9 @@
                if ( $this->isBatchProcessor() ) {
                        return;
                }
-               $this->logger->info( __FUNCTION__ . ': Refreshing all donor 
data' );
                $this->session_ensure();
+               $sessionId = WmfFramework::getSessionId();
+               $this->logger->info( __FUNCTION__ . ": Refreshing all donor 
data in session '$sessionId''" );
                $sessionFields = DonationData::getSessionFields();
 
                $data = array();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I63ee2d269a8f7197c9bbf2fd1c99bb2edd383435
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg <[email protected]>

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

Reply via email to