diff --git a/sql/structure.sql b/sql/structure.sql index 99b4ce168dc82746d5684df1437e9ea6bb1a5a80..9642efd8ff55955dd42c1daef32589cd35854742 100755 --- a/sql/structure.sql +++ b/sql/structure.sql @@ -248,7 +248,7 @@ CREATE TABLE res_attachments res_id bigint NOT NULL DEFAULT nextval('res_attachment_res_id_seq'::regclass), title character varying(255) DEFAULT NULL::character varying, format character varying(50) NOT NULL, - typist character varying(128) NOT NULL, + typist INTEGER, creation_date timestamp without time zone NOT NULL, modification_date timestamp without time zone DEFAULT NOW(), modified_by INTEGER, diff --git a/src/app/attachment/controllers/AttachmentController.php b/src/app/attachment/controllers/AttachmentController.php index e13bd4fd278721cd1c420f92bc09ad16f8db8052..8316464d7d1e749f2bc02759dd7bab18018c8bed 100755 --- a/src/app/attachment/controllers/AttachmentController.php +++ b/src/app/attachment/controllers/AttachmentController.php @@ -293,8 +293,11 @@ class AttachmentController if ($attachment['modificationDate'] == $attachment['creationDate']) { $attachments[$key]['modificationDate'] = null; } - $typist = UserModel::getById(['id' => $attachment['typist'], 'select' => ['firstname', 'lastname']]); - $attachments[$key]['typistLabel'] = $typist['firstname']. ' ' .$typist['lastname']; + $attachments[$key]['typistLabel'] = ''; + if (!empty($attachment['typist'])) { + $typist = UserModel::getById(['id' => $attachment['typist'], 'select' => ['firstname', 'lastname']]); + $attachments[$key]['typistLabel'] = $typist['firstname']. ' ' .$typist['lastname']; + } $attachments[$key]['modifiedBy'] = UserModel::getLabelledUserById(['id' => $attachment['modifiedBy']]); if (!empty($attachmentsTypes[$attachment['type']]['label'])) { diff --git a/src/app/entity/models/ListInstanceModelAbstract.php b/src/app/entity/models/ListInstanceModelAbstract.php index 7693ea6ea6d52778b1f6673964b928a61bc63e8a..5941db189bb67f9aa4194aebb7f102880c706702 100755 --- a/src/app/entity/models/ListInstanceModelAbstract.php +++ b/src/app/entity/models/ListInstanceModelAbstract.php @@ -173,7 +173,8 @@ abstract class ListInstanceModelAbstract public static function getWithConfidentiality(array $args) { ValidatorModel::notEmpty($args, ['entityId', 'userId']); - ValidatorModel::stringType($args, ['entityId', 'userId']); + ValidatorModel::stringType($args, ['entityId']); + ValidatorModel::intVal($args, ['userId']); ValidatorModel::arrayType($args, ['select']); $aListInstances = DatabaseModel::select([ diff --git a/src/frontend/app/administration/template/templateFileEditorModal/template-file-editor-modal.component.html b/src/frontend/app/administration/template/templateFileEditorModal/template-file-editor-modal.component.html index 0d2a71e86641b037eb39b1ff63e8d6e980eb6706..11dd54c779b2b332116287e31b6eee69dc7fcb26 100644 --- a/src/frontend/app/administration/template/templateFileEditorModal/template-file-editor-modal.component.html +++ b/src/frontend/app/administration/template/templateFileEditorModal/template-file-editor-modal.component.html @@ -2,7 +2,7 @@ <mat-dialog-content style="padding: 0px;"> <onlyoffice-viewer #onlyofficeViewer style="height:100%;width:100%;" [hideCloseEditor]="true" [params]="editorOptions" [file]="file" [editMode]="true" (triggerAfterUpdatedDoc)="close()" - (triggerCloseEditor)="dialogRef.close('');" (triggerModifiedDocument)="isDocModified = true"></onlyoffice-viewer> + (triggerCloseEditor)="dialogRef.close('');"></onlyoffice-viewer> </mat-dialog-content> <span class="divider-modal"></span> <div mat-dialog-actions class="actions"> @@ -10,4 +10,4 @@ (click)="close()">{{lang.validate}}</button> <button mat-raised-button mat-button [disabled]="loading" [mat-dialog-close]="">{{lang.cancel}}</button> </div> -</div> \ No newline at end of file +</div>