Skip to content

Commit

Permalink
cbSR(vtlib) format code and eliminate deprecated function call
Browse files Browse the repository at this point in the history
  • Loading branch information
joebordes committed Dec 18, 2021
1 parent 00d216a commit ae77352
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions include/utils/VtlibUtils.php
Expand Up @@ -158,13 +158,14 @@ function vtlib_toggleModuleAccess($module, $enable_disable, $noevents = false) {
$event_type = Vtiger_Module::EVENT_MODULE_DISABLED;
}

$adb->pquery('UPDATE vtiger_tab set presence = ? WHERE name = ?', array($enable_disable,$module));

$adb->pquery('UPDATE vtiger_businessactions set active = ? WHERE linkurl RLIKE "[^a-zA-Z0-9_.]'.$module.'[^a-zA-Z0-9_.]" OR linkurl RLIKE "[^a-zA-Z0-9_.]'.$module.'$" OR linkurl RLIKE "^'.$module.'[^a-zA-Z0-9_.]"',array($enable_disable_BA));
$adb->pquery('UPDATE vtiger_tab set presence=? WHERE name=?', array($enable_disable,$module));
$adb->pquery(
'UPDATE vtiger_businessactions set active=? WHERE linkurl RLIKE "[^a-zA-Z0-9_.]'.$module.'[^a-zA-Z0-9_.]" OR linkurl RLIKE "[^a-zA-Z0-9_.]'.$module.'$" OR linkurl RLIKE "^'.$module.'[^a-zA-Z0-9_.]"',
array($enable_disable_BA)
);

$__cache_module_activeinfo[$module] = $enable_disable;

create_parenttab_data_file();
vtlib_RecreateUserPrivilegeFiles();

if (!$noevents) {
Expand Down

0 comments on commit ae77352

Please sign in to comment.