r51663 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51662‎ | r51663 | r51664 >
Date:21:50, 9 June 2009
Author:demon
Status:ok
Tags:
Comment:
* Nuke Version.php, not needed for a 1-line variable declaration
* Use Http::userAgent() so we're consistent with the core UA, even though it probably won't change.
Modified paths:
  • /trunk/extensions/Collection/Collection.body.php (modified) (history)
  • /trunk/extensions/Collection/Collection.php (modified) (history)
  • /trunk/extensions/Collection/Version.php (deleted) (history)

Diff [purge]

Index: trunk/extensions/Collection/Version.php
@@ -1,24 +0,0 @@
2 -<?php
3 -
4 -/*
5 - * Collection Extension for MediaWiki
6 - *
7 - * Copyright (C) 2008, PediaPress GmbH
8 - *
9 - * This program is free software; you can redistribute it and/or modify
10 - * it under the terms of the GNU General Public License as published by
11 - * the Free Software Foundation; either version 2 of the License, or
12 - * (at your option) any later version.
13 - *
14 - * This program is distributed in the hope that it will be useful,
15 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 - * GNU General Public License for more details.
18 - *
19 - * You should have received a copy of the GNU General Public License along
20 - * with this program; if not, write to the Free Software Foundation, Inc.,
21 - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 - * http://www.gnu.org/copyleft/gpl.html
23 - */
24 -
25 -$wgCollectionVersion = "1.2";
Index: trunk/extensions/Collection/Collection.php
@@ -32,7 +32,8 @@
3333
3434 $dir = dirname(__FILE__) . '/';
3535
36 -require_once( $dir . 'Version.php' );
 36+# Extension version
 37+$wgCollectionVersion = "1.2";
3738
3839 # ==============================================================================
3940
Index: trunk/extensions/Collection/Collection.body.php
@@ -973,7 +973,7 @@
974974 curl_setopt($c, CURLOPT_PROXY, $wgHTTPProxy);
975975 $userAgent = wfGetAgent();
976976 if ( !$userAgent ) $userAgent = "Unknown user agent";
977 - curl_setopt( $c, CURLOPT_USERAGENT, $userAgent . " (via MediaWiki/$wgVersion, Collection/$wgCollectionVersion)" );
 977+ curl_setopt( $c, CURLOPT_USERAGENT, $userAgent . " (via " . Http::userAgent() . ", Collection/$wgCollectionVersion)" );
978978 curl_setopt( $c, CURLOPT_POST, true );
979979 curl_setopt( $c, CURLOPT_POSTFIELDS, $postFields );
980980 curl_setopt( $c, CURLOPT_HTTPHEADER, array( 'Expect:' ) );

Status & tagging log