Include rather than require for the admin/xcustom includes to avoid breaking notifications/logout on pages that don't have a post handler (e.g. app logs)
This commit is contained in:
@@ -31,12 +31,12 @@ if (str_contains($module, 'admin') && isset($session_is_admin) && $session_is_ad
|
|||||||
// To add a new admin POST request handler, add a file named after the admin page
|
// To add a new admin POST request handler, add a file named after the admin page
|
||||||
// e.g. changes made on the page http://itflow/admin_ticket_statues.php will load the page post/admin/admin_ticket_statues.php to handle the changes
|
// e.g. changes made on the page http://itflow/admin_ticket_statues.php will load the page post/admin/admin_ticket_statues.php to handle the changes
|
||||||
|
|
||||||
require_once "post/admin/$module.php";
|
include_once "post/admin/$module.php";
|
||||||
|
|
||||||
} elseif (str_contains($module, 'xcustom')) {
|
} elseif (str_contains($module, 'xcustom')) {
|
||||||
// Dynamically load any custom POST logic
|
// Dynamically load any custom POST logic
|
||||||
|
|
||||||
require_once "post/xcustom/$module.php";
|
include_once "post/xcustom/$module.php";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user