@@ 655-658 (lines=4) @@ | ||
652 | curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE); |
|
653 | curl_setopt($ch, CURLOPT_USERAGENT, |
|
654 | 'Silverstripe-update-module-module'); |
|
655 | if (isset($gitApiUserName) && isset($gitApiUserPassword)) { |
|
656 | curl_setopt($ch, CURLOPT_USERPWD, $gitApiUserName . ':' . $gitApiUserPassword); |
|
657 | curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); |
|
658 | } |
|
659 | if ($method == 'POST' ) { |
|
660 | curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonData); |
|
661 | } |
|
@@ 717-720 (lines=4) @@ | ||
714 | 'sunnysideupdevs'); |
|
715 | ||
716 | ||
717 | if (isset($gitApiUserName) && isset($gitApiUserPassword)) { |
|
718 | curl_setopt($ch, CURLOPT_USERPWD, $gitApiUserName . ':' . $gitApiUserPassword); |
|
719 | curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); |
|
720 | } |
|
721 | ||
722 | ||
723 | $curlResult = curl_exec($ch); |