r44171 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44170‎ | r44171 | r44172 >
Date:10:54, 3 December 2008
Author:jojo
Status:ok
Tags:
Comment:
transfer $wgCollectionVersion in useragent string
Modified paths:
  • /trunk/extensions/Collection/Collection.body.php (modified) (history)
  • /trunk/extensions/Collection/Version.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Collection/Version.php
@@ -21,6 +21,6 @@
2222 * http://www.gnu.org/copyleft/gpl.html
2323 */
2424
25 -$wgCollectionVersion = "1.0pre";
 25+$wgCollectionVersion = "1.1";
2626
2727 ?>
Index: trunk/extensions/Collection/Collection.body.php
@@ -1235,14 +1235,15 @@
12361236 $timeout=true, $toFile=null ) {
12371237 global $wgHTTPTimeout, $wgHTTPProxy, $wgVersion, $wgTitle, $wgRequest;
12381238 global $wgCollectionMWServeCert;
 1239+ global $wgCollectionVersion;
12391240
12401241 $c = curl_init( $url );
12411242 curl_setopt($c, CURLOPT_PROXY, $wgHTTPProxy);
12421243 $userAgent = $wgRequest->getHeader('User-agent');
12431244 if ( $userAgent ) {
1244 - curl_setopt( $c, CURLOPT_USERAGENT, $userAgent . " (via MediaWiki/$wgVersion)" );
 1245+ curl_setopt( $c, CURLOPT_USERAGENT, $userAgent . " (via MediaWiki/$wgVersion, Collection/$wgCollectionVersion)" );
12451246 } else {
1246 - curl_setopt( $c, CURLOPT_USERAGENT, "Unknown user agent (via MediaWiki/$wgVersion)" );
 1247+ curl_setopt( $c, CURLOPT_USERAGENT, "Unknown user agent (via MediaWiki/$wgVersion, Collection/$wgCollectionVersion)" );
12471248 }
12481249 curl_setopt( $c, CURLOPT_POST, true );
12491250 curl_setopt( $c, CURLOPT_POSTFIELDS, $postFields );

Status & tagging log