mirror of
https://github.com/VTECRM/vtenext.git
synced 2026-02-26 16:18:47 +00:00
33 lines
1.1 KiB
PHP
33 lines
1.1 KiB
PHP
<?php
|
|
/*************************************
|
|
* SPDX-FileCopyrightText: 2009-2020 Vtenext S.r.l. <info@vtenext.com>
|
|
* 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') {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} |