fix typo and wrongedited timestamp. also add data-{id, type} to cloud directory listings

This commit is contained in:
Mario Vavti
2026-01-02 15:31:54 +01:00
parent 87f79381d9
commit e295765bef
3 changed files with 5 additions and 4 deletions

View File

@@ -930,12 +930,13 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) {
);
}
elseif($options === 'update') {
$r = q("update attach set filename = '%s', filetype = '%s', folder = '%s', edited = '%s', os_storage = %d, is_photo = %d, os_path = '%s',
$r = q("update attach set filename = '%s', filetype = '%s', filesize = %d, folder = '%s', edited = '%s', os_storage = %d, is_photo = %d, os_path = '%s',
display_path = '%s', allow_cid = '%s', allow_gid = '%s', deny_cid = '%s', deny_gid = '%s' where id = %d and uid = %d",
dbesc((array_key_exists('filename',$arr)) ? $arr['filename'] : $x[0]['filename']),
dbesc((array_key_exists('filetype',$arr)) ? $arr['filetype'] : $x[0]['filetype']),
dbesc((array_key_exists('filesize',$arr)) ? $arr['filesize'] : $x[0]['filesize']),
dbesc(($folder_hash) ? $folder_hash : $x[0]['folder']),
dbesc($created),
dbesc($edited),
dbesc((array_key_exists('os_storage',$arr)) ? $arr['os_storage'] : $x[0]['os_storage']),
dbesc((array_key_exists('is_photo',$arr)) ? $arr['is_photo'] : $x[0]['is_photo']),
dbesc((array_key_exists('os_path',$arr)) ? $arr['os_path'] : $x[0]['os_path']),

View File

@@ -3209,7 +3209,7 @@ function getIconFromType($type) {
'text/uri-list' => 'bi-box-arrow-up-right',
'application/msword' => 'bi-file-earmark-word',
'application/pdf' => 'bi-file-earmark-pdf',
'application/vnd.oasis.opendocument.text' => 'bifile--earmark-text',
'application/vnd.oasis.opendocument.text' => 'bi-file-earmark-text',
'application/epub+zip' => 'bi-file-earmark-text',
//Spreadsheet
'application/vnd.oasis.opendocument.spreadsheet' => 'bi-file-earmark-spreadsheet',

View File

@@ -147,7 +147,7 @@
{{/if}}
</td>
<td><i class="bi {{$item.icon_from_type}} generic-icons" title="{{$item.type}}"></i></td>
<td><a href="{{$item.rel_path}}" class="p-2" draggable="false">{{$item.name}}</a></td>
<td><a href="{{$item.rel_path}}" class="p-2 file_link" draggable="false" data-id="{{$item.attach_id}}" data-type="{{$item.type}}">{{$item.name}}</a></td>
<td>{{$item.terms}}</td>
<td class="cloud-index-tool p-2">
{{if $item.lockstate == 'lock'}}