* SPDX-License-Identifier: AGPL-3.0-only ************************************/ class M { /** * Invoked when special actions are performed on the module. * @param String Module name * @param String Event Type (module.postinstall, module.disabled, module.enabled, module.preuninstall) */ function vtlib_handler($modulename, $event_type) { global $adb, $table_prefix; if($event_type == 'module.postinstall') { $adb->pquery("UPDATE {$table_prefix}_tab SET customized=0, presence = 1 WHERE name=?", array($modulename)); } else if($event_type == 'module.disabled') { // TODO Handle actions when this module is disabled. } else if($event_type == 'module.enabled') { // TODO Handle actions when this module is enabled. } else if($event_type == 'module.preuninstall') { // TODO Handle actions when this module is about to be deleted. } else if($event_type == 'module.preupdate') { // TODO Handle actions before this module is updated. } else if($event_type == 'module.postupdate') { } } }