small change to cms_mapi_audit()

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
snorki

small change to cms_mapi_audit()

Post 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
100rk

Another solution for audit

Post by 100rk »

You can use built-in function 'audit($itemid, $itemname, $action)' from file 'lib/page.functions.php'
100rk

Post scriptum

Post by 100rk »

...because this file is included all the time... :D
Post Reply

Return to “Developers Discussion”