diff --git a/create-alias-domain.php b/create-alias-domain.php
index 238eb781..3164c78e 100644
--- a/create-alias-domain.php
+++ b/create-alias-domain.php
@@ -124,7 +124,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
$tMessage = $PALANG['pCreate_alias_domain_error3'];
}
else {
- db_log ($SESSID_USERNAME, $fAliasDomain, 'create_alias_domain', "$fAliasDomain -> $fTargetDomain");
+ db_log ($fAliasDomain, 'create_alias_domain', "$fAliasDomain -> $fTargetDomain");
flash_info($PALANG['pCreate_alias_domain_success']);
# we would have to update the list of domains available for aliasing. Doing a redirect is easier.
diff --git a/create-alias.php b/create-alias.php
index f4d2c80d..afa2ce0b 100644
--- a/create-alias.php
+++ b/create-alias.php
@@ -181,7 +181,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
$tMessage = $PALANG['pCreate_alias_result_error'] . "
($fAddress -> $fGoto)
\n";
}
else {
- db_log ($SESSID_USERNAME, $fDomain, 'create_alias', "$fAddress -> $fGoto");
+ db_log ($fDomain, 'create_alias', "$fAddress -> $fGoto");
$tDomain = $fDomain;
$tMessage = $PALANG['pCreate_alias_result_success'] . "
($fAddress -> $fGoto)
\n";
diff --git a/create-mailbox.php b/create-mailbox.php
index 20618df6..67b16e8d 100644
--- a/create-mailbox.php
+++ b/create-mailbox.php
@@ -224,7 +224,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
else
{
db_query('COMMIT');
- db_log ($SESSID_USERNAME, $fDomain, 'create_mailbox', "$fUsername");
+ db_log ($fDomain, 'create_mailbox', "$fUsername");
$tDomain = $fDomain;
$tQuota = $CONF['maxquota'];
diff --git a/delete.php b/delete.php
index 0b736f6e..7d5bceb3 100644
--- a/delete.php
+++ b/delete.php
@@ -119,7 +119,7 @@ elseif ($fTable == "alias" or $fTable == "mailbox")
$result = db_query("SELECT * FROM $table_alias WHERE address = '$fDelete' AND domain = '$fDomain'");
if($result['rows'] == 1) {
$result = db_query ("DELETE FROM $table_alias WHERE address='$fDelete' AND domain='$fDomain'");
- db_log ($SESSID_USERNAME, $fDomain, 'delete_alias', $fDelete);
+ db_log ($fDomain, 'delete_alias', $fDelete);
}
/* is there a mailbox? if do delete it from orbit; it's the only way to be sure */
$result = db_query ("SELECT * FROM $table_mailbox WHERE username='$fDelete' AND domain='$fDomain'");
@@ -142,7 +142,7 @@ elseif ($fTable == "alias" or $fTable == "mailbox")
}
$tMessage.=')';
}
- db_log ($SESSID_USERNAME, $fDomain, 'delete_mailbox', $fDelete);
+ db_log ($fDomain, 'delete_mailbox', $fDelete);
}
$result = db_query("SELECT * FROM $table_vacation WHERE email = '$fDelete' AND domain = '$fDomain'");
if($result['rows'] == 1) {
diff --git a/edit-active.php b/edit-active.php
index 32d8a961..059dfdc7 100644
--- a/edit-active.php
+++ b/edit-active.php
@@ -65,7 +65,7 @@ if ($_SERVER['REQUEST_METHOD'] == "GET")
}
else
{
- db_log ($SESSID_USERNAME, $fDomain, 'edit_mailbox_state', $fUsername);
+ db_log ($fDomain, 'edit_mailbox_state', $fUsername);
}
}
if ($fAlias != '')
@@ -78,7 +78,7 @@ if ($_SERVER['REQUEST_METHOD'] == "GET")
}
else
{
- db_log ($SESSID_USERNAME, $fDomain, 'edit_alias_state', $fAlias);
+ db_log ($fDomain, 'edit_alias_state', $fAlias);
}
}
if ($fAliasDomain != '')
@@ -91,7 +91,7 @@ if ($_SERVER['REQUEST_METHOD'] == "GET")
}
else
{
- db_log ($SESSID_USERNAME, $fDomain, 'edit_alias_domain_state', $fDomain);
+ db_log ($fDomain, 'edit_alias_domain_state', $fDomain);
}
}
}
diff --git a/edit-alias.php b/edit-alias.php
index 74513410..74715ba1 100644
--- a/edit-alias.php
+++ b/edit-alias.php
@@ -161,7 +161,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
}
else
{
- db_log ($SESSID_USERNAME, $fDomain, 'edit_alias', "$fAddress -> $goto");
+ db_log ($fDomain, 'edit_alias', "$fAddress -> $goto");
header ("Location: list-virtual.php?domain=$fDomain");
exit;
diff --git a/edit-mailbox.php b/edit-mailbox.php
index 54d2817f..0539141c 100644
--- a/edit-mailbox.php
+++ b/edit-mailbox.php
@@ -160,7 +160,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
$tMessage = $PALANG['pEdit_mailbox_result_error'];
}
else {
- db_log ($SESSID_USERNAME, $fDomain, 'edit_mailbox', $fUsername);
+ db_log ($fDomain, 'edit_mailbox', $fUsername);
header ("Location: list-virtual.php?domain=$fDomain");
exit(0);
diff --git a/functions.inc.php b/functions.inc.php
index 95aab4f2..bde136b5 100644
--- a/functions.inc.php
+++ b/functions.inc.php
@@ -1809,7 +1809,7 @@ function db_rollback () {
/**
* db_log
* Action: Logs actions from admin
- * Call: db_log (string username, string domain, string action, string data)
+ * Call: db_log (string domain, string action, string data)
* Possible actions are:
* 'create_domain'
* 'create_alias'
@@ -1827,7 +1827,7 @@ function db_rollback () {
* 'edit_mailbox_state'
* 'edit_password'
*/
-function db_log ($username,$domain,$action,$data)
+function db_log ($domain,$action,$data)
{
global $CONF;
global $table_log;
@@ -2428,7 +2428,7 @@ function create_admin($fUsername, $fPassword, $fPassword2, $fDomains, $no_genera
# TODO: should we log creation, editing and deletion of admins?
# Note: needs special handling in viewlog, because domain is empty
- # db_log ($SESSID_USERNAME, '', 'create_admin', "$fUsername");
+ # db_log ('', 'create_admin', "$fUsername");
return array(
$error,
diff --git a/model/AliasHandler.php b/model/AliasHandler.php
index 2c57f864..297cfd4c 100644
--- a/model/AliasHandler.php
+++ b/model/AliasHandler.php
@@ -177,7 +177,7 @@ class AliasHandler {
if($result != 1) {
return false;
}
- db_log($this->username, $domain, 'edit_alias', "$E_username -> $goto");
+ db_log ($domain, 'edit_alias', "$E_username -> $goto");
return true;
}
@@ -226,7 +226,7 @@ class AliasHandler {
$result = db_delete('alias', 'address', $this->username);
if( $result == 1 ) {
list(/*NULL*/,$domain) = explode('@', $this->username);
- db_log ('CLI', $domain, 'delete_alias', $this->username); # TODO: replace hardcoded CLI
+ db_log ($domain, 'delete_alias', $this->username);
return true;
}
}
diff --git a/model/DomainHandler.php b/model/DomainHandler.php
index 88abbd52..3aff1b21 100644
--- a/model/DomainHandler.php
+++ b/model/DomainHandler.php
@@ -61,7 +61,7 @@ class DomainHandler {
if (!domain_postcreation($domain)) {
$tMessage = Lang::read('pAdminCreate_domain_error');
}
- db_log('CONSOLE', $domain, 'create_domain', "");
+ db_log ($domain, 'create_domain', "");
return true;
}
@@ -94,7 +94,7 @@ class DomainHandler {
$result = db_delete('domain', 'domain', $this->username);
if( $result == 1 ) {
list(/*NULL*/,$domain) = explode('@', $this->username);
- db_log ('CLI', $domain, 'delete_domain', $this->username); # TODO: replace hardcoded CLI # TODO delete_domain is not a valid db_log keyword yet because we don't yet log add/delete domain
+ db_log ($domain, 'delete_domain', $this->username); # TODO delete_domain is not a valid db_log keyword yet because we don't yet log add/delete domain
return true;
}
}
diff --git a/model/UserHandler.php b/model/UserHandler.php
index bebed206..07172035 100644
--- a/model/UserHandler.php
+++ b/model/UserHandler.php
@@ -39,7 +39,7 @@ class UserHandler {
$result = db_assoc($result['result']);
if (pacrypt($old_password, $result['password']) != $result['password']) {
- db_log ('CONSOLE', $domain, 'edit_password', "MATCH FAILURE: " . $this->username); # TODO: replace hardcoded CONSOLE - class is used by XMLRPC and users/
+ db_log ($domain, 'edit_password', "MATCH FAILURE: " . $this->username);
$this->errormsg[] = 'Passwords do not match'; # TODO: make translatable
return false;
}
@@ -52,12 +52,12 @@ class UserHandler {
$result = db_update('mailbox', 'username', $this->username, $set );
if ($result != 1) {
- db_log ('CONSOLE', $domain, 'edit_password', "FAILURE: " . $this->username); # TODO: replace hardcoded CONSOLE - class is used by XMLRPC and users/
+ db_log ($domain, 'edit_password', "FAILURE: " . $this->username);
$this->errormsg[] = Lang::read('pEdit_mailbox_result_error');
return false;
}
- db_log ('CONSOLE', $domain, 'edit_password', $this->username); # TODO: replace hardcoded CONSOLE - class is used by XMLRPC and users/
+ db_log ($domain, 'edit_password', $this->username);
return true;
}
@@ -190,7 +190,7 @@ class UserHandler {
return false;
} else {
db_commit();
- db_log ('CONSOLE', $domain, 'create_mailbox', $username); # TODO: remove hardcoded CONSOLE
+ db_log ($domain, 'create_mailbox', $username);
if ($mail == true)
@@ -259,7 +259,7 @@ class UserHandler {
$result = db_query("SELECT * FROM $table_alias WHERE address = '$E_username' AND domain = '$domain'");
if($result['rows'] == 1) {
$result = db_delete('alias', 'address', $username);
- db_log ('CONSOLE', $domain, 'delete_alias', $username); # TODO: remove hardcoded CONSOLE
+ db_log ($domain, 'delete_alias', $username);
} else {
$this->errormsg[] = "no alias $username"; # todo: better message, make translatable
$error = 1;
@@ -294,7 +294,7 @@ class UserHandler {
$error = 1;
# return false; # TODO: does this make sense? Or should we still cleanup vacation and vacation_notification?
}
- db_log ('CONSOLE', $domain, 'delete_mailbox', $username);
+ db_log ($domain, 'delete_mailbox', $username);
} else {
$this->errormsg[] = "no mailbox $username"; # TODO: better message, make translatable
$error = 1;