aboutsummaryrefslogtreecommitdiffstats
path: root/langs/report_tx_git.php
diff options
context:
space:
mode:
Diffstat (limited to 'langs/report_tx_git.php')
-rw-r--r--langs/report_tx_git.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/langs/report_tx_git.php b/langs/report_tx_git.php
index 29aee5eae..829f72f16 100644
--- a/langs/report_tx_git.php
+++ b/langs/report_tx_git.php
@@ -51,23 +51,28 @@ $resource_type = 'Webpages'; // Webpages, Documentation, Cauldron
function tx_call($tx_request, $project = 'project/mageia/')
{
global $errors;
- $tx_url_prefix = "http://www.transifex.com/api/2/";
+ $tx_url_prefix = "www.transifex.com/api/2/";
$tx_url = $tx_url_prefix . $project . $tx_request;
+ $user = "filip_mageia";
+ $pass = "report";
+/*
// create a new cURL resource
$curl_handle = curl_init();
// TX username and password
- curl_setopt($curl_handle, CURLOPT_USERPWD, "filip_mageia:report");
+ curl_setopt($curl_handle, CURLOPT_USERPWD, "$user:$pass");
// return, do not echo
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, TRUE);
// pass url
- curl_setopt($curl_handle, CURLOPT_URL, $tx_url);
+ curl_setopt($curl_handle, CURLOPT_URL, "http://$tx_url");
$tx_result = curl_exec($curl_handle);
curl_close($curl_handle);
+/**/
+ $tx_result = file_get_contents("http://$user:$pass@$tx_url");
$tx_result_array = json_decode($tx_result, TRUE);
$json_last_error = json_last_error();