mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
Record file changelog when admin resizes image manually
This commit is contained in:
parent
a806c0f0f7
commit
c60847d38a
1 changed files with 25 additions and 0 deletions
|
|
@ -423,6 +423,31 @@ class FileAdminController extends File
|
|||
{
|
||||
return $updated;
|
||||
}
|
||||
|
||||
if (isset($config->save_changelog) && $config->save_changelog === 'Y')
|
||||
{
|
||||
$changelog1 = executeQuery('file.insertFileChangelog', [
|
||||
'change_type' => 'D',
|
||||
'file_srl' => $file->file_srl,
|
||||
'file_size' => $file->file_size,
|
||||
'uploaded_filename' => $file->uploaded_filename,
|
||||
]);
|
||||
if (!$changelog1->toBool())
|
||||
{
|
||||
return $changelog1;
|
||||
}
|
||||
|
||||
$changelog2 = executeQuery('file.insertFileChangelog', [
|
||||
'change_type' => 'I',
|
||||
'file_srl' => $file->file_srl,
|
||||
'file_size' => $filesize,
|
||||
'uploaded_filename' => $relative_path,
|
||||
]);
|
||||
if (!$changelog2->toBool())
|
||||
{
|
||||
return $changelog2;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue