diff options
author | Bot <bot@myigel.name> | 2017-01-02 03:57:23 +0100 |
---|---|---|
committer | Igor Scheller <igor.scheller@igorshp.de> | 2017-01-02 03:57:23 +0100 |
commit | 7313e15ce8236e19331fb6639a3a5b97c8f06ecd (patch) | |
tree | 399e5eaa403d6dd5993ca8fb6f2162319d2ed2e1 /includes/model/LogEntries_model.php | |
parent | b839e401062b294292fdcbd7e30b79bc149fab6f (diff) |
PSR-2 formatting
Diffstat (limited to 'includes/model/LogEntries_model.php')
-rw-r--r-- | includes/model/LogEntries_model.php | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/includes/model/LogEntries_model.php b/includes/model/LogEntries_model.php index 09bd03dc..2a3a1d6e 100644 --- a/includes/model/LogEntries_model.php +++ b/includes/model/LogEntries_model.php @@ -7,32 +7,34 @@ * @param $message Log * Message */ -function LogEntry_create($nick, $message) { - return sql_query("INSERT INTO `LogEntries` SET `timestamp`='" . sql_escape(time()) . "', `nick`='" . sql_escape($nick) . "', `message`='" . sql_escape($message) . "'"); +function LogEntry_create($nick, $message) +{ + return sql_query("INSERT INTO `LogEntries` SET `timestamp`='" . sql_escape(time()) . "', `nick`='" . sql_escape($nick) . "', `message`='" . sql_escape($message) . "'"); } /** * Returns log entries with maximum count of 10000. */ -function LogEntries() { - return sql_select("SELECT * FROM `LogEntries` ORDER BY `timestamp` DESC LIMIT 10000"); +function LogEntries() +{ + return sql_select("SELECT * FROM `LogEntries` ORDER BY `timestamp` DESC LIMIT 10000"); } /** * Returns log entries filtered by a keyword */ -function LogEntries_filter($keyword) { - if ($keyword == "") { - return LogEntries(); - } - return sql_select("SELECT * FROM `LogEntries` WHERE `nick` LIKE '%" . sql_escape($keyword) . "%' OR `message` LIKE '%" . sql_escape($keyword) . "%' ORDER BY `timestamp` DESC"); +function LogEntries_filter($keyword) +{ + if ($keyword == "") { + return LogEntries(); + } + return sql_select("SELECT * FROM `LogEntries` WHERE `nick` LIKE '%" . sql_escape($keyword) . "%' OR `message` LIKE '%" . sql_escape($keyword) . "%' ORDER BY `timestamp` DESC"); } /** * Delete all log entries. */ -function LogEntries_clear_all() { - return sql_query("TRUNCATE `LogEntries`"); +function LogEntries_clear_all() +{ + return sql_query("TRUNCATE `LogEntries`"); } - -?> |