advertising :: DoUninstall: Bitrix method

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

    
function DoUninstall()
    {
        global 
$APPLICATION$DB$errors$step;
        
$ADV_RIGHT $APPLICATION->GetGroupRight("advertising");
        if (
$ADV_RIGHT=="W")
        {
            
$step IntVal($step);
            
$errors false;

            if (
$step 2)
            {
                
$APPLICATION->IncludeAdminFile(
                    
GetMessage("AD_DELETE_TITLE"),
                    
$_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/advertising/install/uninst1.php"
                
);
            }
            elseif (
$step == 2)
            {
                
$errors false;

                
$this->UnInstallDB();
                
$this->UnInstallFiles();
                
$this->UnInstallEvents();

                
$APPLICATION->IncludeAdminFile(
                    
GetMessage("AD_DELETE_TITLE"),
                    
$_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/advertising/install/uninst2.php"
                
);
            }
        }
    }