r101337 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101336‎ | r101337 | r101338 >
Date:04:46, 31 October 2011
Author:aaron
Status:ok
Tags:
Comment:
Reverted CU back to using wfGetAgent() to get around the wrath of the API's use of FauxRequest
Modified paths:
  • /branches/wmf/1.18wmf1/extensions/CheckUser/CheckUser.hooks.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/extensions/CheckUser/CheckUser.hooks.php
@@ -17,7 +17,7 @@
1818 // Our squid XFFs can flood this up sometimes
1919 $isSquidOnly = self::XFFChainIsSquid( $xff );
2020 // Get agent
21 - $agent = $wgRequest->getHeader( 'User-Agent' );
 21+ $agent = wfGetAgent();
2222 // Store the log action text for log events
2323 // $rc_comment should just be the log_comment
2424 // BC: check if log_type and log_action exists
@@ -80,7 +80,7 @@
8181 // Our squid XFFs can flood this up sometimes
8282 $isSquidOnly = self::XFFChainIsSquid( $xff );
8383 // Get agent
84 - $agent = $wgRequest->getHeader( 'User-Agent' );
 84+ $agent = wfGetAgent();
8585 $dbw = wfGetDB( DB_MASTER );
8686 $cuc_id = $dbw->nextSequenceValue( 'cu_changes_cu_id_seq' );
8787 $rcRow = array(
@@ -127,7 +127,7 @@
128128 // Our squid XFFs can flood this up sometimes
129129 $isSquidOnly = self::XFFChainIsSquid( $xff );
130130 // Get agent
131 - $agent = $wgRequest->getHeader( 'User-Agent' );
 131+ $agent = wfGetAgent();
132132 $dbw = wfGetDB( DB_MASTER );
133133 $cuc_id = $dbw->nextSequenceValue( 'cu_changes_cu_id_seq' );
134134 $rcRow = array(
@@ -182,7 +182,7 @@
183183 // Our squid XFFs can flood this up sometimes
184184 $isSquidOnly = self::XFFChainIsSquid( $xff );
185185 // Get agent
186 - $agent = $wgRequest->getHeader( 'User-Agent' );
 186+ $agent = wfGetAgent();
187187 $dbw = wfGetDB( DB_MASTER );
188188 $cuc_id = $dbw->nextSequenceValue( 'cu_changes_cu_id_seq' );
189189 $rcRow = array(

Status & tagging log