diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2017-09-19 19:33:24 +0200 |
---|---|---|
committer | Igor Scheller <igor.scheller@igorshp.de> | 2017-09-19 19:45:02 +0200 |
commit | e6ed8a30171b86b452cec21a283373fc14dd5330 (patch) | |
tree | ac50aa8118686421cce0e5970657095d3a2fde73 /includes/model | |
parent | b3b65743cdc534f7632c8e04e80d3489eec9677c (diff) |
Changed LogEntries table: Use log level instead of nick name
Diffstat (limited to 'includes/model')
-rw-r--r-- | includes/model/LogEntries_model.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/includes/model/LogEntries_model.php b/includes/model/LogEntries_model.php index 0e11bf8e..f0ee6673 100644 --- a/includes/model/LogEntries_model.php +++ b/includes/model/LogEntries_model.php @@ -5,16 +5,16 @@ use Engelsystem\Database\DB; /** * Creates a log entry. * - * @param string $nick Username - * @param string $message Log Message + * @param string $logLevel Log level + * @param string $message Log Message * @return bool */ -function LogEntry_create($nick, $message) +function LogEntry_create($logLevel, $message) { return DB::insert(' - INSERT INTO `LogEntries` (`timestamp`, `nick`, `message`) + INSERT INTO `LogEntries` (`timestamp`, `level`, `message`) VALUES(?, ?, ?) - ', [time(), $nick, $message]); + ', [time(), $logLevel, $message]); } /** @@ -43,7 +43,7 @@ function LogEntries_filter($keyword) return DB::select(' SELECT * FROM `LogEntries` - WHERE `nick` LIKE ? + WHERE `level` LIKE ? OR `message` LIKE ? ORDER BY `timestamp` DESC ', |