Skip to content
Snippets Groups Projects
Verified Commit b5018954 authored by Damien's avatar Damien
Browse files

FEAT #13678 TIME 0:20 Fix from CR

parent 5ff3929b
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
......@@ -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'])) {
......
......@@ -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([
......
......@@ -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>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment