Skip to content

Commit

Permalink
[TASK] Remove useless information in save file message
Browse files Browse the repository at this point in the history
When saving a file in the filelist module, a flashmessage
is shown containing the filename, bytes written and md5
hash of the file contents. From a user perspective, the
`bytes` and `md5` information are useless and can
be removed.

Resolves: #99304
Releases: main
Change-Id: I1f6dfe32663a2f8d2925ea9a6ff14dd01477f3ee
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/76946
Reviewed-by: Oliver Bartsch <bo@cedev.de>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Oliver Bartsch <bo@cedev.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
  • Loading branch information
derhansen authored and lolli42 committed Dec 7, 2022
1 parent c6e5be1 commit 2831344
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -982,7 +982,7 @@ public function func_edit($cmds)
$fileObject->setContents($content);
clearstatcache();
$this->writeLog(SystemLogFileAction::EDIT, SystemLogErrorClassification::MESSAGE, 'File saved to "{identifier}", bytes: {size}', ['identifier' => $fileObject->getIdentifier(), 'size' => $fileObject->getSize()]);
$this->addMessageToFlashMessageQueue('FileUtility.FileSavedToBytesMd5', [$fileObject->getIdentifier(), $fileObject->getSize(), md5($content)], ContextualFeedbackSeverity::OK);
$this->addMessageToFlashMessageQueue('FileUtility.FileSavedTo', [$fileObject->getIdentifier()], ContextualFeedbackSeverity::OK);
return true;
} catch (InsufficientUserPermissionsException $e) {
$this->writeLog(SystemLogFileAction::EDIT, SystemLogErrorClassification::USER_ERROR, 'You are not allowed to edit files');
Expand Down
4 changes: 2 additions & 2 deletions typo3/sysext/core/Resources/Private/Language/fileMessages.xlf
Expand Up @@ -108,8 +108,8 @@
<trans-unit id="FileUtility.FileRenamedSameName" resname="FileUtility.FileRenamedSameName">
<source>File "%s" was not renamed. (Same name as before)</source>
</trans-unit>
<trans-unit id="FileUtility.FileSavedToBytesMd5" resname="FileUtility.FileSavedToBytesMd5">
<source>File saved to "%s", bytes: %s, MD5: %s.</source>
<trans-unit id="FileUtility.FileSavedTo" resname="FileUtility.FileSavedTo">
<source>File saved to "%s".</source>
</trans-unit>
<trans-unit id="FileUtility.FileWasNotCopiedTo" resname="FileUtility.FileWasNotCopiedTo">
<source>File "%s" WAS NOT copied to "%s"! There might be a problem with write permissions.</source>
Expand Down

0 comments on commit 2831344

Please sign in to comment.