photogallery::DoInstall: Bitrix method

      
<?php 
//  photogallery :: DoInstall()
//  /dist/bitrix/modules/photogallery/install/index.php:85

    
function DoInstall()
    {
        if (!
check_bitrix_sessid())
            return 
false;
        global 
$APPLICATION;
        if (
IsModuleInstalled("iblock"))
        {
            
$step IntVal($_REQUEST["step"]);

            if (
$step 2)
                
$APPLICATION->IncludeAdminFile(GetMessage("PHOTO_INSTALL"), $_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/photogallery/install/step1.php");
            elseif(
$step == 2)
                
$APPLICATION->IncludeAdminFile(GetMessage("PHOTO_INSTALL"), $_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/photogallery/install/step2.php");
            elseif (
$step == 3)
            {
                
$this->InstallDB();
                
$this->InstallEvents();
                
$this->InstallFiles();
                
LocalRedirect("module_admin.php?lang=".LANGUAGE_ID);
            }
        }
        elseif (!
IsModuleInstalled("photogallery"))
        {
            
$this->InstallDB();
            
$this->InstallEvents();
            
$this->InstallFiles();
        }
    }