Documentation

DoUninstall

CModule::DoUninstall()

The method launches the module uninstallation procedure. Non-static method.

Parameters

No parameters.

See Also

Examples of use

<?
// if "Install" or "Uninstall" is clicked...
if(strlen($uninstall)>0 || strlen($install)>0)
{
    // check if the required file exists in the module directory
    if(@file_exists($DOCUMENT_ROOT."/bitrix/modules/".$module_id."/install/index.php"))
    {
        include_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/".$module_id."/install/index.php");
        $obModule = new $module_id;
        if($obModule->IsInstalled() && strlen($uninstall)>0) $obModule->DoUninstall();
        elseif(!$obModule->IsInstalled() && strlen($install)>0) $obModule->DoInstall();
    }
}
?>


© «Bitrix24», 2001-2024
Up