mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
Add custom event handler to be triggered by some actions affecting tickets/quotes/invoices/contacts
This commit is contained in:
@@ -1304,6 +1304,7 @@ function enforceUserPermission($module, $check_access_level = 1) {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Probably remove this
|
||||
function enforceAdminPermission() {
|
||||
global $session_is_admin;
|
||||
if (!isset($session_is_admin) || !$session_is_admin) {
|
||||
@@ -1311,3 +1312,10 @@ function enforceAdminPermission() {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function customAction($trigger, $entity) {
|
||||
chdir(dirname(__FILE__));
|
||||
if (file_exists(__DIR__ . "/xcustom/xcustom_action_handler.php")) {
|
||||
include_once __DIR__ . "/xcustom/xcustom_action_handler.php";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user