Loading config/autoload/version.global.php +2 −2 Original line number Diff line number Diff line Loading @@ -2,9 +2,9 @@ return [ 'unicaen-app' => [ 'app_infos' => [ 'version' => '1.0.8', 'version' => '1.0.9', 'date' => '06/02/2019', ], ], 'comment' => 'Fichier généré le 06/02/2019 à 08:59:23 avec /home/gauthierb/workspace/sygal/bump-version', 'comment' => 'Fichier généré le 06/02/2019 à 15:06:26 avec /home/metivier/MyWeb/sygal/bump-version', ]; module/Application/src/Application/Notification/ResultatTheseModifieNotification.php +2 −17 Original line number Diff line number Diff line Loading @@ -16,7 +16,8 @@ class ResultatTheseModifieNotification extends Notification */ public function prepare() { $this->setTo($this->emailBdd); // NB: les destinataires sont ajoutés en amont. $this->setSubject("Résultats de thèses modifiés"); $this->setTemplateVariables([ Loading @@ -43,20 +44,4 @@ class ResultatTheseModifieNotification extends Notification return $this; } /** * @var string */ private $emailBdd; /** * @param string $emailBdd * @return self */ public function setEmailBdd($emailBdd) { $this->emailBdd = $emailBdd; return $this; } } No newline at end of file module/Application/src/Application/Service/Notification/NotificationFactory.php +5 −2 Original line number Diff line number Diff line Loading @@ -87,11 +87,14 @@ class NotificationFactory extends \Notification\Service\NotificationFactory */ public function createNotificationForBdDUpdateResultat(array $data) { $emailBdd = $this->fetchEmailBdd(current($data)['these']); $these = current($data)['these']; $emailBdd = $this->fetchEmailBdd($these); $emailBu = $this->fetchEmailBu($these); $notif = new ResultatTheseModifieNotification(); $notif->setData($data); $notif->setEmailBdd($emailBdd); $notif->setTo([$emailBdd, $emailBu]); //$this->trigger($notif); return $notif; Loading module/Application/src/Application/Service/Notification/NotifierService.php +5 −2 Original line number Diff line number Diff line Loading @@ -71,11 +71,14 @@ class NotifierService extends \Notification\Service\NotifierService */ public function triggerBdDUpdateResultat(array $data) { $emailBdd = $this->fetchEmailBdd(current($data)['these']); $these = current($data)['these']; $emailBdd = $this->fetchEmailBdd($these); $emailBu = $this->fetchEmailBu($these); $notif = new ResultatTheseModifieNotification(); $notif->setData($data); $notif->setEmailBdd($emailBdd); $notif->setTo([$emailBdd, $emailBu]); $this->trigger($notif); Loading module/Information/src/Information/Controller/FichierController.php +7 −3 Original line number Diff line number Diff line Loading @@ -32,13 +32,16 @@ class FichierController extends AbstractActionController $request = $this->getRequest(); if ($request->isPost()) { $file = $request->getFiles()->toArray(); if ($file['chemin'] !== null) { if ($file['chemin'] !== null && $file['chemin']['tmp_name'] !== "") { $pathDir = $this->fileService->computeDirectoryPathForInformation(); $this->fileService->createWritableDirectory($pathDir); $newFilename = $this->getInformationFichierService()->generateUniqueFilename(); $uploadPath = $file['chemin']['tmp_name']; $truePath = implode("/", [$pathDir, $file['chemin']['name']]); var_dump($uploadPath . " -> ".$truePath); $truePath = implode("/", [$pathDir, $newFilename]); $ok = rename($uploadPath, $truePath); if (! $ok) { throw new RuntimeException("Impossible de renommer le fichier sur le disque."); Loading @@ -47,6 +50,7 @@ class FichierController extends AbstractActionController $user = $this->userContextService->getIdentityDb(); $fichier = new InformationFichier(); $fichier->setNom($file['chemin']['name']); $fichier->setFilename($newFilename); $fichier->setCreateur($user); $fichier->setDateCreation(new \DateTime()); $this->getInformationFichierService()->create($fichier); Loading Loading
config/autoload/version.global.php +2 −2 Original line number Diff line number Diff line Loading @@ -2,9 +2,9 @@ return [ 'unicaen-app' => [ 'app_infos' => [ 'version' => '1.0.8', 'version' => '1.0.9', 'date' => '06/02/2019', ], ], 'comment' => 'Fichier généré le 06/02/2019 à 08:59:23 avec /home/gauthierb/workspace/sygal/bump-version', 'comment' => 'Fichier généré le 06/02/2019 à 15:06:26 avec /home/metivier/MyWeb/sygal/bump-version', ];
module/Application/src/Application/Notification/ResultatTheseModifieNotification.php +2 −17 Original line number Diff line number Diff line Loading @@ -16,7 +16,8 @@ class ResultatTheseModifieNotification extends Notification */ public function prepare() { $this->setTo($this->emailBdd); // NB: les destinataires sont ajoutés en amont. $this->setSubject("Résultats de thèses modifiés"); $this->setTemplateVariables([ Loading @@ -43,20 +44,4 @@ class ResultatTheseModifieNotification extends Notification return $this; } /** * @var string */ private $emailBdd; /** * @param string $emailBdd * @return self */ public function setEmailBdd($emailBdd) { $this->emailBdd = $emailBdd; return $this; } } No newline at end of file
module/Application/src/Application/Service/Notification/NotificationFactory.php +5 −2 Original line number Diff line number Diff line Loading @@ -87,11 +87,14 @@ class NotificationFactory extends \Notification\Service\NotificationFactory */ public function createNotificationForBdDUpdateResultat(array $data) { $emailBdd = $this->fetchEmailBdd(current($data)['these']); $these = current($data)['these']; $emailBdd = $this->fetchEmailBdd($these); $emailBu = $this->fetchEmailBu($these); $notif = new ResultatTheseModifieNotification(); $notif->setData($data); $notif->setEmailBdd($emailBdd); $notif->setTo([$emailBdd, $emailBu]); //$this->trigger($notif); return $notif; Loading
module/Application/src/Application/Service/Notification/NotifierService.php +5 −2 Original line number Diff line number Diff line Loading @@ -71,11 +71,14 @@ class NotifierService extends \Notification\Service\NotifierService */ public function triggerBdDUpdateResultat(array $data) { $emailBdd = $this->fetchEmailBdd(current($data)['these']); $these = current($data)['these']; $emailBdd = $this->fetchEmailBdd($these); $emailBu = $this->fetchEmailBu($these); $notif = new ResultatTheseModifieNotification(); $notif->setData($data); $notif->setEmailBdd($emailBdd); $notif->setTo([$emailBdd, $emailBu]); $this->trigger($notif); Loading
module/Information/src/Information/Controller/FichierController.php +7 −3 Original line number Diff line number Diff line Loading @@ -32,13 +32,16 @@ class FichierController extends AbstractActionController $request = $this->getRequest(); if ($request->isPost()) { $file = $request->getFiles()->toArray(); if ($file['chemin'] !== null) { if ($file['chemin'] !== null && $file['chemin']['tmp_name'] !== "") { $pathDir = $this->fileService->computeDirectoryPathForInformation(); $this->fileService->createWritableDirectory($pathDir); $newFilename = $this->getInformationFichierService()->generateUniqueFilename(); $uploadPath = $file['chemin']['tmp_name']; $truePath = implode("/", [$pathDir, $file['chemin']['name']]); var_dump($uploadPath . " -> ".$truePath); $truePath = implode("/", [$pathDir, $newFilename]); $ok = rename($uploadPath, $truePath); if (! $ok) { throw new RuntimeException("Impossible de renommer le fichier sur le disque."); Loading @@ -47,6 +50,7 @@ class FichierController extends AbstractActionController $user = $this->userContextService->getIdentityDb(); $fichier = new InformationFichier(); $fichier->setNom($file['chemin']['name']); $fichier->setFilename($newFilename); $fichier->setCreateur($user); $fichier->setDateCreation(new \DateTime()); $this->getInformationFichierService()->create($fichier); Loading