tbh I don't even know
This commit is contained in:
parent
98d8e3c837
commit
cedde7b2cd
@ -87,6 +87,13 @@ class update_redmine {
|
|||||||
}
|
}
|
||||||
$this->fullUrl = $this->baseUrl . "/issues/$issue.json";
|
$this->fullUrl = $this->baseUrl . "/issues/$issue.json";
|
||||||
}
|
}
|
||||||
|
if ($this->action === 'get_issue') {
|
||||||
|
$this->prepareRetrieveIssue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private function prepareRetrieveIssue() {
|
||||||
|
$this->fullUrl = $this->baseUrl . "/issues/$issue.json";
|
||||||
}
|
}
|
||||||
|
|
||||||
public function sendAction() {
|
public function sendAction() {
|
||||||
@ -95,7 +102,9 @@ class update_redmine {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function sendToRedmine($method = 'GET', $json) {
|
public function sendToRedmine(string $method = 'GET', string $json) {
|
||||||
|
$context = NULL;
|
||||||
|
if ($method !== 'GET') {
|
||||||
// use key 'http' even if you send the request to https://...
|
// use key 'http' even if you send the request to https://...
|
||||||
$options = [
|
$options = [
|
||||||
'http' => [
|
'http' => [
|
||||||
@ -105,6 +114,7 @@ class update_redmine {
|
|||||||
],
|
],
|
||||||
];
|
];
|
||||||
$context = stream_context_create($options);
|
$context = stream_context_create($options);
|
||||||
|
}
|
||||||
$result = file_get_contents($this->fullUrl, FALSE, $context);
|
$result = file_get_contents($this->fullUrl, FALSE, $context);
|
||||||
if ($result === FALSE) {
|
if ($result === FALSE) {
|
||||||
print_r($result);
|
print_r($result);
|
||||||
|
Loading…
Reference in New Issue
Block a user