mirror of
https://github.com/itflow-org/itflow
synced 2026-11-19 10:57:24 +00:00
Module switches: Dispatch, Bookkeeping, Purchasing, Trips and Calendar can be switched off in Admin > Settings > Modules, Dispatch coming with ticketing and the other three with invoicing, each hidden from menus, dashboard, search, reports and the API and refused on its pages, windows and handlers while off; Purchasing starts off unless already in use, Bookkeeping off posts the default accounts in place of account pickers, database 3.9.4, new moduleOn, moduleOffText and bookkeepingAccount helpers, purchase order settings tile summary, 26.11.9 changelog entries
This commit is contained in:
@@ -15,11 +15,15 @@ if (isset($_POST['edit_module_settings'])) {
|
||||
|
||||
validateCSRFToken();
|
||||
|
||||
$before = settingsCurrent(['config_module_enable_itdoc', 'config_module_enable_ticketing', 'config_module_enable_accounting', 'config_client_portal_enable',
|
||||
'config_whitelabel_enabled', 'config_whitelabel_key']);
|
||||
$modules = ['config_module_enable_itdoc', 'config_module_enable_ticketing', 'config_module_enable_accounting', 'config_client_portal_enable'];
|
||||
if (isset($config_module_enable_calendar)) {
|
||||
// Database 3.9.4's five
|
||||
array_push($modules, 'config_module_enable_dispatch', 'config_module_enable_bookkeeping', 'config_module_enable_purchasing', 'config_module_enable_trips', 'config_module_enable_calendar');
|
||||
}
|
||||
$before = settingsCurrent(array_merge($modules, ['config_whitelabel_enabled', 'config_whitelabel_key']));
|
||||
|
||||
$after = [];
|
||||
foreach (['config_module_enable_itdoc', 'config_module_enable_ticketing', 'config_module_enable_accounting', 'config_client_portal_enable'] as $module) {
|
||||
foreach ($modules as $module) {
|
||||
$after[$module] = empty($_POST[$module]) ? 0 : 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user