Guillermo - disable-user-system [skip ci]
This commit is contained in:
parent
565c60c198
commit
c4b63aab43
|
@ -13,6 +13,10 @@ class CSVImportController extends Controller {
|
|||
public function handler() {
|
||||
$fileUploader = $this->uploadFile();
|
||||
|
||||
if(!$fileUploader instanceof FileUploader) {
|
||||
throw new Exception(ERRORS::INVALID_FILE);
|
||||
}
|
||||
|
||||
$file = fopen($fileUploader->getFullFilePath(),'r');
|
||||
$errors = [];
|
||||
|
||||
|
|
|
@ -47,10 +47,12 @@ class CommentController extends Controller {
|
|||
}
|
||||
|
||||
private function storeComment() {
|
||||
$fileUploader = $this->uploadFile();
|
||||
|
||||
$comment = Ticketevent::getEvent(Ticketevent::COMMENT);
|
||||
$comment->setProperties(array(
|
||||
'content' => $this->content,
|
||||
'file' => $this->uploadFile()->getFileName(),
|
||||
'file' => ($fileUploader instanceof FileUploader) ? $fileUploader->getFileName() : null,
|
||||
'date' => Date::getCurrentDate()
|
||||
));
|
||||
|
||||
|
|
|
@ -53,6 +53,8 @@ class CreateController extends Controller {
|
|||
$department = Department::getDataStore($this->departmentId);
|
||||
$author = Controller::getLoggedUser();
|
||||
|
||||
$fileUploader = $this->uploadFile();
|
||||
|
||||
$ticket = new Ticket();
|
||||
$ticket->setProperties(array(
|
||||
'title' => $this->title,
|
||||
|
@ -60,7 +62,7 @@ class CreateController extends Controller {
|
|||
'language' => $this->language,
|
||||
'author' => $author,
|
||||
'department' => $department,
|
||||
'file' => $this->uploadFile()->getFileName(),
|
||||
'file' => ($fileUploader instanceof FileUploader) ? $fileUploader->getFileName() : null,
|
||||
'date' => Date::getCurrentDate(),
|
||||
'unread' => false,
|
||||
'unreadStaff' => true,
|
||||
|
|
|
@ -59,3 +59,4 @@ require './system/add-api-key.rb'
|
|||
require './system/delete-api-key.rb'
|
||||
require './system/get-all-keys.rb'
|
||||
require './system/file-upload-download.rb'
|
||||
require './system/csv-import.rb'
|
||||
|
|
Loading…
Reference in New Issue