Page 1 of 1

small change to cms_mapi_audit()

Posted: Wed Dec 15, 2004 3:51 am
by snorki
my module was not writing to the adminlog properly, in lib/module.functions.php I changed the cms_mapi_audit() function from:

Code: Select all

function cms_mapi_audit($cms, $itemid, $itemname, $action) {

	$userid = get_userid();
	$username = $_SESSION["cms_admin_username"];
	audit($userid, $username, $itemid, $itemname, $action);

}
to

Code: Select all

function cms_mapi_audit($cms, $itemid, $itemname, $action) {
	audit($itemid, $itemname, $action);
}
and now things work for me as I expected.

hop it helps,

snorki

Another solution for audit

Posted: Sun Jan 23, 2005 1:38 pm
by 100rk
You can use built-in function 'audit($itemid, $itemname, $action)' from file 'lib/page.functions.php'

Post scriptum

Posted: Sun Jan 23, 2005 2:03 pm
by 100rk
...because this file is included all the time... :D