mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-18 00:49:31 +00:00
Use a enum for level in LogEntries
This commit is contained in:
parent
4a644d8712
commit
2da7463edf
18 changed files with 322 additions and 149 deletions
|
|
@ -40,12 +40,12 @@ class ElementDeletedLogEntry extends AbstractLogEntry implements TimeTravelInter
|
|||
public function __construct(AbstractDBElement $deleted_element)
|
||||
{
|
||||
parent::__construct();
|
||||
$this->level = self::LEVEL_INFO;
|
||||
$this->level = LogLevel::INFO;
|
||||
$this->setTargetElement($deleted_element);
|
||||
|
||||
//Deletion of a user is maybe more interesting...
|
||||
if ($deleted_element instanceof User || $deleted_element instanceof Group) {
|
||||
$this->level = self::LEVEL_NOTICE;
|
||||
$this->level = LogLevel::NOTICE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue