Modify function to be accessible in lower versions of php.

pull/16/head
Alex Puiu 2022-02-10 16:24:29 +02:00
rodzic 5b025184a0
commit 99b26c4bab
3 zmienionych plików z 10 dodań i 5 usunięć

Wyświetl plik

@ -62,7 +62,7 @@ if ($emails)
$board = null;
if(strstr($overview->to[0]->mailbox, '+')) {
$board = substr($overview->to[0]->mailbox, strpos($overview->to[0]->mailbox, '+') + 1);
if(str_contains($board, '+')) $board = str_replace('+', ' ', $board);
if(strstr($board, '+')) $board = str_replace('+', ' ', $board);
}
$data = new stdClass();

Wyświetl plik

@ -54,13 +54,18 @@ class DeckClass {
}
$boardId = $board->id;
$boardName = $board->title;
break;
}
}
if($boardId) {
$stacks = $this->apiCall("GET", NC_SERVER . "/index.php/apps/deck/api/v1.0/boards/$boardId/stacks");
foreach($stacks as $stack)
(strtolower($stack->title) == strtolower($stackFromMail)) ? $stackId = $stack->id : $stackId = $stacks[0]->id;
foreach($stacks as $key => $stack)
if(strtolower($stack->title) == strtolower($stackFromMail)) {
$stackId = $stack->id;
break;
}
if($key == array_key_last($stacks) && !isset($stackId)) $stackId = $stacks[0]->id;
} else {
return false;
}

Wyświetl plik

@ -33,9 +33,9 @@ class MailClass {
public function reply($sender, $response = null) {
$server = NC_SERVER;
if(str_contains($server, "https://")) {
if(strstr($server, "https://")) {
$server = str_replace('https://', '', $server);
} else if(str_contains($server, "http://")) {
} else if(strstr($server, "http://")) {
$server = str_replace('http://', '', $server);
}