Guillermo - disable-user-system [skip ci]

This commit is contained in:
AntonyAntonio 2017-01-16 18:04:26 -03:00
parent 565c60c198
commit c4b63aab43
4 changed files with 11 additions and 2 deletions

View File

@ -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 = [];

View File

@ -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()
));

View File

@ -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,

View File

@ -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'