kopia lustrzana https://github.com/newroco/mail2deck
fixes
rodzic
2ed824c91e
commit
99ee5403e0
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
error_reporting(E_ERROR | E_PARSE);
|
error_reporting(E_ERROR | E_PARSE);
|
||||||
require __DIR__ . '/vendor/autoload.php';
|
require_once(__DIR__ . '/vendor/autoload.php');
|
||||||
require_once("config.php");
|
require_once(__DIR__ . '/config.php');
|
||||||
|
|
||||||
use Mail2Deck\MailClass;
|
use Mail2Deck\MailClass;
|
||||||
use Mail2Deck\DeckClass;
|
use Mail2Deck\DeckClass;
|
||||||
|
|
|
@ -2,9 +2,6 @@
|
||||||
|
|
||||||
namespace Mail2Deck;
|
namespace Mail2Deck;
|
||||||
|
|
||||||
use stdClass;
|
|
||||||
use CURLFile;
|
|
||||||
|
|
||||||
class DeckClass {
|
class DeckClass {
|
||||||
private $responseCode;
|
private $responseCode;
|
||||||
|
|
||||||
|
@ -80,7 +77,7 @@ class DeckClass {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$boardStack = new stdClass();
|
$boardStack = new \stdClass();
|
||||||
$boardStack->board = $boardId;
|
$boardStack->board = $boardId;
|
||||||
$boardStack->stack = $stackId;
|
$boardStack->stack = $stackId;
|
||||||
$boardStack->newTitle = $params;
|
$boardStack->newTitle = $params;
|
||||||
|
@ -118,7 +115,7 @@ class DeckClass {
|
||||||
for ($i = 0; $i < count($attachments); $i++) {
|
for ($i = 0; $i < count($attachments); $i++) {
|
||||||
$file = $fullPath . $attachments[$i];
|
$file = $fullPath . $attachments[$i];
|
||||||
$data = array(
|
$data = array(
|
||||||
'file' => new CURLFile($file)
|
'file' => new \CURLFile($file)
|
||||||
);
|
);
|
||||||
$this->apiCall("POST", NC_SERVER . "/index.php/apps/deck/api/v1.0/boards/{$card->board}/stacks/{$card->stack}/cards/{$card->id}/attachments?type=file", $data, true);
|
$this->apiCall("POST", NC_SERVER . "/index.php/apps/deck/api/v1.0/boards/{$card->board}/stacks/{$card->stack}/cards/{$card->id}/attachments?type=file", $data, true);
|
||||||
unlink($file);
|
unlink($file);
|
||||||
|
|
Ładowanie…
Reference in New Issue