diff options
author | Malf Furious <m@lfurio.us> | 2018-10-26 22:00:18 -0400 |
---|---|---|
committer | Malf Furious <m@lfurio.us> | 2018-10-26 22:00:18 -0400 |
commit | b9783160efe6ab1d6084113fa5c0fa982404be53 (patch) | |
tree | 6d7bb828c87e77eca946ce0c958c290e0dac1a2d | |
parent | d73d8ccf9b009a522080f7fec08bf9f23962e1c9 (diff) | |
parent | 3e0aa02f2051300fbe255c578ed2717a71b65954 (diff) | |
download | scrott-b9783160efe6ab1d6084113fa5c0fa982404be53.tar.gz scrott-b9783160efe6ab1d6084113fa5c0fa982404be53.zip |
Merge branch 'feature/logging' into dev
Signed-off-by: Malf Furious <m@lfurio.us>
-rw-r--r-- | app/model/datamods.php | 1 | ||||
-rw-r--r-- | app/model/issue.php | 1 | ||||
-rw-r--r-- | app/model/login.php | 5 | ||||
-rw-r--r-- | app/model/settings.php | 2 |
4 files changed, 9 insertions, 0 deletions
diff --git a/app/model/datamods.php b/app/model/datamods.php index e2051f3..0b7f3da 100644 --- a/app/model/datamods.php +++ b/app/model/datamods.php @@ -112,6 +112,7 @@ if (isAction("dm-issue-add")) $mesg = mesg::initNewDiscussion($form->name, $form->mesg, $user, $pad); $issue = issue::initNew($mesg, $user, $stages[0]); + $log = mesg::initNewLog("%s opened issue", $user, $issue); location(); // bug mitigation } diff --git a/app/model/issue.php b/app/model/issue.php index 2120256..4300bbb 100644 --- a/app/model/issue.php +++ b/app/model/issue.php @@ -51,6 +51,7 @@ if (isAction("iss-mesg-add")) { $issue->close($user); logError(NOTICE, "Issue #" . $issue->numb . " closed"); + $log = mesg::initNewLog("% closed issue", $user, $issue); } } diff --git a/app/model/login.php b/app/model/login.php index 6358e12..3393281 100644 --- a/app/model/login.php +++ b/app/model/login.php @@ -32,6 +32,10 @@ if (isAction("login")) $user->validatePasswd($form->passwd))) { logError(ERROR, "Username or password is incorrect"); + + if ($user) + $log = mesg::initNewAdminLog("Failed login for username '%s'", $user); + goto prep; } @@ -72,6 +76,7 @@ if (isAction("signup")) } user::setCurrent($user); + $log = mesg::initNewAdminLog("%s account registered", $user); location("/"); } diff --git a/app/model/settings.php b/app/model/settings.php index a3afa0f..3293122 100644 --- a/app/model/settings.php +++ b/app/model/settings.php @@ -137,6 +137,8 @@ if (isAction("settings-admin")) if ($form->smtpPasswd != "") settings::smtpPasswd($form->smtpPasswd); + + $log = mesg::initNewAdminLog("%s changed global settings", $cu); } ?> |