summaryrefslogtreecommitdiff
path: root/includes/model/LogEntries_model.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2017-09-30 11:25:58 +0200
committerGitHub <noreply@github.com>2017-09-30 11:25:58 +0200
commit801c17aa6cef91be988a25a90442be8d2078a70d (patch)
tree7f03157616509fe583b1b0aea6e2d06c53bd9c89 /includes/model/LogEntries_model.php
parente1d44e60e35d126dbd05aefa5f897fad16fbfceb (diff)
parent945fcb079a219fa29e8f6ee1afc3f1c0c5c822cb (diff)
Merge pull request #347 from MyIgel/master
Implemented Container, closes #342
Diffstat (limited to 'includes/model/LogEntries_model.php')
-rw-r--r--includes/model/LogEntries_model.php12
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
',