From a63b795020dc3d325b475ddf4b49d07a11ba7eeb Mon Sep 17 00:00:00 2001 From: Damien <damien.burel@maarch.org> Date: Fri, 25 Jan 2019 14:32:15 +0100 Subject: [PATCH] FEAT #9082 fix fpdi --- apps/maarch_entreprise/xml/applicationVersion.xml | 4 ++-- modules/tags/class/TagControler_Abstract.php | 3 ++- src/app/attachment/controllers/AttachmentController.php | 4 ++-- src/app/note/controllers/NoteController.php | 4 ++-- src/app/resource/controllers/ResController.php | 6 ++---- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/apps/maarch_entreprise/xml/applicationVersion.xml b/apps/maarch_entreprise/xml/applicationVersion.xml index f3b313d52fd..e46649ad951 100755 --- a/apps/maarch_entreprise/xml/applicationVersion.xml +++ b/apps/maarch_entreprise/xml/applicationVersion.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <root> - <majorVersion>18.10</majorVersion> - <minorVersion>18.10.1</minorVersion> + <majorVersion>19.04</majorVersion> + <minorVersion>19.04.1</minorVersion> </root> diff --git a/modules/tags/class/TagControler_Abstract.php b/modules/tags/class/TagControler_Abstract.php index ae32a800a74..3345fcc1e54 100755 --- a/modules/tags/class/TagControler_Abstract.php +++ b/modules/tags/class/TagControler_Abstract.php @@ -81,7 +81,8 @@ abstract class tag_controler_Abstract extends ObjectControler if($core->test_service('private_tag', 'tags',false) == 1){ $entitiesRestriction = array(); - $userEntities = users_controler::getEntities($_SESSION['user']['UserId']); + $uc = new users_controler(); + $userEntities = $uc->getEntities($_SESSION['user']['UserId']); foreach ($userEntities as $entity) { $entity_id = $entity['ENTITY_ID']; diff --git a/src/app/attachment/controllers/AttachmentController.php b/src/app/attachment/controllers/AttachmentController.php index 25c07cdccb9..84078c648aa 100755 --- a/src/app/attachment/controllers/AttachmentController.php +++ b/src/app/attachment/controllers/AttachmentController.php @@ -23,7 +23,7 @@ use Docserver\models\DocserverTypeModel; use History\controllers\HistoryController; use Resource\controllers\ResController; use Respect\Validation\Validator; -use setasign\Fpdi\TcpdfFpdi; +use setasign\Fpdi\Tcpdf\Fpdi; use Slim\Http\Request; use Slim\Http\Response; use SrcCore\models\CoreConfigModel; @@ -258,7 +258,7 @@ class AttachmentController } try { - $pdf = new TcpdfFpdi('P', 'pt'); + $pdf = new Fpdi('P', 'pt'); $nbPages = $pdf->setSourceFile($pathToDocument); $pdf->setPrintHeader(false); for ($i = 1; $i <= $nbPages; $i++) { diff --git a/src/app/note/controllers/NoteController.php b/src/app/note/controllers/NoteController.php index 5a9b3a8062d..660215a3988 100755 --- a/src/app/note/controllers/NoteController.php +++ b/src/app/note/controllers/NoteController.php @@ -19,7 +19,7 @@ use Note\models\NoteModel; use Note\models\NoteEntityModel; use Entity\models\EntityModel; use Respect\Validation\Validator; -use setasign\Fpdi\TcpdfFpdi; +use setasign\Fpdi\Tcpdf\Fpdi; use Slim\Http\Request; use Slim\Http\Response; use History\controllers\HistoryController; @@ -100,7 +100,7 @@ class NoteController ValidatorModel::notEmpty($aArgs, ['ids']); ValidatorModel::arrayType($aArgs, ['ids']); - $pdf = new TcpdfFpdi('P', 'pt'); + $pdf = new Fpdi('P', 'pt'); $pdf->setPrintHeader(false); $pdf->AddPage(); diff --git a/src/app/resource/controllers/ResController.php b/src/app/resource/controllers/ResController.php index c46ff04911b..30ac5bb4cb7 100755 --- a/src/app/resource/controllers/ResController.php +++ b/src/app/resource/controllers/ResController.php @@ -16,7 +16,6 @@ namespace Resource\controllers; use Attachment\models\AttachmentModel; use Basket\models\BasketModel; -use Basket\models\GroupBasketModel; use Basket\models\RedirectBasketModel; use Convert\controllers\ConvertPdfController; use Convert\controllers\ConvertThumbnailController; @@ -26,13 +25,12 @@ use Docserver\models\DocserverTypeModel; use Docserver\models\ResDocserverModel; use Entity\models\ListInstanceModel; use Group\controllers\GroupController; -use Group\models\GroupModel; use Group\models\ServiceModel; use History\controllers\HistoryController; use Note\models\NoteModel; use Resource\models\ResModel; use Respect\Validation\Validator; -use setasign\Fpdi\TcpdfFpdi; +use setasign\Fpdi\Tcpdf\Fpdi; use Slim\Http\Request; use Slim\Http\Response; use SrcCore\controllers\PreparedClauseController; @@ -335,7 +333,7 @@ class ResController } try { - $pdf = new TcpdfFpdi('P', 'pt'); + $pdf = new Fpdi('P', 'pt'); $nbPages = $pdf->setSourceFile($pathToDocument); $pdf->setPrintHeader(false); for ($i = 1; $i <= $nbPages; $i++) { -- GitLab