Index: trunk/extensions/MetricsReporting/fetchGoogleSpreadsheet.php |
— | — | @@ -17,16 +17,17 @@ |
18 | 18 | $url = $this->getArg( 0 ); |
19 | 19 | |
20 | 20 | // Headers |
21 | | - $http = MWHttpRequest::factory( 'https://www.google.com/accounts/ClientLogin', array( |
22 | | - 'method' => 'POST', |
23 | | - 'postData' => array( |
24 | | - 'accountType' => 'HOSTED_OR_GOOGLE', |
25 | | - 'service' => 'wise', // Spreadsheet service is "wise" |
26 | | - 'Email' => '', |
27 | | - 'Passwd' => '', |
28 | | - 'source' => Http::userAgent() . ' MetricsReporting/' . METRICS_REPORTING_VERSION, |
29 | | - ) |
30 | | - ) |
| 21 | + $http = MWHttpRequest::factory( 'https://www.google.com/accounts/ClientLogin', |
| 22 | + array( |
| 23 | + 'method' => 'POST', |
| 24 | + 'postData' => array( |
| 25 | + 'accountType' => 'HOSTED_OR_GOOGLE', |
| 26 | + 'service' => 'wise', // Spreadsheet service is "wise" |
| 27 | + 'Email' => '', |
| 28 | + 'Passwd' => '', |
| 29 | + 'source' => Http::userAgent() . ' MetricsReporting/' . METRICS_REPORTING_VERSION, |
| 30 | + ) |
| 31 | + ) |
31 | 32 | ); |
32 | 33 | |
33 | 34 | $res = $http->execute(); |
— | — | @@ -54,9 +55,9 @@ |
55 | 56 | //var_dump( $authToken ); |
56 | 57 | |
57 | 58 | $http = MWHttpRequest::factory( $url, array( |
58 | | - 'method' => 'GET', |
59 | | - ) |
60 | | - ); |
| 59 | + 'method' => 'GET', |
| 60 | + ) |
| 61 | + ); |
61 | 62 | $http->setCookieJar( $cookies ); |
62 | 63 | $http->setHeader( 'GData-Version', '3.0' ); |
63 | 64 | $http->setHeader( 'Authorization', "GoogleLogin auth=\"{$authToken}\"" ); |
— | — | @@ -84,4 +85,4 @@ |
85 | 86 | } |
86 | 87 | |
87 | 88 | $maintClass = "FetchGoogleSpreadsheet"; |
88 | | -require_once( DO_MAINTENANCE ); |
\ No newline at end of file |
| 89 | +require_once( DO_MAINTENANCE ); |