[UI] Add mechanism for rendering note contents in different formats. Implement plaintext rendering. Use rendered field for note content, rather than the content itself

This commit is contained in:
2021-09-14 13:40:50 +01:00
committed by Diogo Peralta Cordeiro
parent f344ed376c
commit 8f0a3e4977
16 changed files with 793 additions and 116 deletions

View File

@@ -69,6 +69,12 @@ select sum(at.size) as total
where ua.gsactor_id = :actor_id and at.size is not null
END;
$max_file_size = Common::config('attachments', 'file_quota');
if ($max_file_size < $filesize) {
throw new ClientException(_m('No file may be larger than {quota} bytes and the file you sent was {size} bytes. ',
['quota' => $max_file_size, 'size' => $filesize]));
}
$max_user_quota = Common::config('attachments', 'user_quota');
if ($max_user_quota !== false) { // If not disabled
$cache_key_user_total = "FileQuota-total-user-{$user_id}";