mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-13 11:54:32 +02:00
Use enum for undo mode
This commit is contained in:
parent
218b0adb8f
commit
8a20584e27
14 changed files with 140 additions and 180 deletions
|
@ -127,9 +127,9 @@ class LogEntryExtraFormatter
|
|||
}
|
||||
|
||||
if (($context instanceof LogWithEventUndoInterface) && $context->isUndoEvent()) {
|
||||
if ('undo' === $context->getUndoMode()) {
|
||||
if (EventUndoMode::UNDO === $context->getUndoMode()) {
|
||||
$array['log.undo_mode.undo'] = '#' . $context->getUndoEventID();
|
||||
} elseif ('revert' === $context->getUndoMode()) {
|
||||
} elseif (EventUndoMode::REVERT === $context->getUndoMode()) {
|
||||
$array['log.undo_mode.revert'] = '#' . $context->getUndoEventID();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue