bitrixcloud::DoUninstall: Bitrix method

      
<?php 
//  bitrixcloud :: DoUninstall()
//  /dist/bitrix/modules/bitrixcloud/install/index.php:153

    
function DoUninstall()
    {
        global 
$USER$APPLICATION$step;
        if (
$USER->IsAdmin())
        {
            
$step IntVal($step);
            if (
$step 2)
            {
                
$APPLICATION->IncludeAdminFile(GetMessage("BCL_UNINSTALL_TITLE"), $_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/bitrixcloud/install/unstep1.php");
            }
            elseif (
$step == 2)
            {
                
$this->UnInstallDB(array(
                    
"save_tables" => $_REQUEST["save_tables"],
                ));
                
//message types and templates
                
if ($_REQUEST["save_templates"] != "Y")
                {
                    
$this->UnInstallEvents();
                }
                
$this->UnInstallFiles();
                
$GLOBALS["errors"] = $this->errors;
                
$APPLICATION->IncludeAdminFile(GetMessage("BCL_UNINSTALL_TITLE"), $_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/bitrixcloud/install/unstep2.php");
            }
        }
    }