%PDF- %PDF-
Server IP : 37.220.80.31 / Your IP : 3.149.247.132 Web Server : Apache/2.4.52 (Ubuntu) System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64 User : www-root ( 1010) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/modules/fileman/install/ |
Upload File : |
<?php use Bitrix\Main\Localization\Loc; Loc::loadMessages(__FILE__); Class fileman extends CModule { var $MODULE_ID = "fileman"; var $MODULE_VERSION; var $MODULE_VERSION_DATE; var $MODULE_NAME; var $MODULE_DESCRIPTION; var $MODULE_CSS; var $MODULE_GROUP_RIGHTS = "Y"; function __construct() { $arModuleVersion = array(); include(__DIR__.'/version.php'); if (is_array($arModuleVersion) && array_key_exists("VERSION", $arModuleVersion)) { $this->MODULE_VERSION = $arModuleVersion["VERSION"]; $this->MODULE_VERSION_DATE = $arModuleVersion["VERSION_DATE"]; } else { $this->MODULE_VERSION = FILEMAN_VERSION; $this->MODULE_VERSION_DATE = FILEMAN_VERSION_DATE; } $this->MODULE_NAME = Loc::getMessage("FILEMAN_MODULE_NAME"); $this->MODULE_DESCRIPTION = Loc::getMessage("FILEMAN_MODULE_DESCRIPTION"); } function InstallDB() { global $DB, $APPLICATION; if (!$DB->Query("SELECT 'x' FROM b_medialib_collection", true)) $errors = $DB->RunSQLBatch($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/fileman/install/db/mysql/install.sql"); if (!empty($errors)) { $APPLICATION->ThrowException(implode("", $errors)); return false; } RegisterModule("fileman"); RegisterModuleDependences("main", "OnGroupDelete", "fileman", "CFileman", "OnGroupDelete"); RegisterModuleDependences("main", "OnPanelCreate", "fileman", "CFileman", "OnPanelCreate"); RegisterModuleDependences("main", "OnModuleUpdate", "fileman", "CFileman", "OnModuleUpdate"); RegisterModuleDependences("main", "OnModuleInstalled", "fileman", "CFileman", "ClearComponentsListCache"); RegisterModuleDependences('iblock', 'OnIBlockPropertyBuildList', 'fileman', 'CIBlockPropertyMapGoogle', 'GetUserTypeDescription'); RegisterModuleDependences('iblock', 'OnIBlockPropertyBuildList', 'fileman', 'CIBlockPropertyMapYandex', 'GetUserTypeDescription'); RegisterModuleDependences('iblock', 'OnIBlockPropertyBuildList', 'fileman', 'CIBlockPropertyVideo', 'GetUserTypeDescription'); RegisterModuleDependences("main", "OnUserTypeBuildList", "fileman", "CUserTypeVideo", "GetUserTypeDescription"); RegisterModuleDependences("main", "OnEventLogGetAuditTypes", "fileman", "CEventFileman", "GetAuditTypes"); RegisterModuleDependences("main", "OnEventLogGetAuditHandlers", "fileman", "CEventFileman", "MakeFilemanObject"); RegisterModuleDependences("main", "OnUserTypeBuildList", "fileman", "\\Bitrix\\Fileman\\UserField\\Address", "getUserTypeDescription", 154); require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/fileman/install/tasks/install.php"); COption::SetOptionString('fileman', "use_editor_3", "Y"); // // Add hotkeys // $hkc = new CHotKeysCode; // $id = $hkc->Add(array( // CLASS_NAME => "admin_file_edit_apply", // CODE => "if(top.AjaxApply && typeof top.AjaxApply == 'function'){top.AjaxApply();}", // NAME => Loc::getMessage("FILEMAN_HOTKEY_TITLE"), // IS_CUSTOM => "0" // )); // CHotKeys::getInstance()->Add(array("KEYS_STRING"=>"Ctrl+83", "CODE_ID"=>$id, "USER_ID" => 0)); //S return true; } function UnInstallDB() { global $DB, $APPLICATION; //if(array_key_exists("savedata", $arParams) && $arParams["savedata"] != "Y") //{ $errors = $DB->RunSQLBatch($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/fileman/install/db/'mysql'/uninstall.sql"); if (!empty($errors)) { $APPLICATION->ThrowException(implode("", $errors)); return false; } //} UnRegisterModuleDependences("main", "OnGroupDelete", "fileman", "CFileman", "OnGroupDelete"); UnRegisterModuleDependences("main", "OnPanelCreate", "fileman", "CFileman", "OnPanelCreate"); UnRegisterModuleDependences("main", "OnModuleUpdate", "fileman", "CFileman", "OnModuleUpdate"); UnRegisterModuleDependences("main", "OnModuleInstalled", "fileman", "CFileman", "ClearComponentsListCache"); UnRegisterModule("fileman"); UnRegisterModuleDependences('iblock', 'OnIBlockPropertyBuildList', 'fileman', 'CIBlockPropertyMapGoogle', 'GetUserTypeDescription'); UnRegisterModuleDependences('iblock', 'OnIBlockPropertyBuildList', 'fileman', 'CIBlockPropertyMapYandex', 'GetUserTypeDescription'); UnRegisterModuleDependences('iblock', 'OnIBlockPropertyBuildList', 'fileman', 'CIBlockPropertyVideo', 'GetUserTypeDescription'); UnRegisterModuleDependences("main", "OnUserTypeBuildList", "fileman", "CUserTypeVideo", "GetUserTypeDescription"); UnRegisterModuleDependences("main", "OnEventLogGetAuditTypes", "fileman", "CEventFileman", "GetAuditTypes"); UnRegisterModuleDependences("main", "OnEventLogGetAuditHandlers", "fileman", "CEventFileman", "MakeFilemanObject"); UnRegisterModuleDependences("main", "OnUserTypeBuildList", "fileman", "\\Bitrix\\Fileman\\UserField\\Address", "getUserTypeDescription"); require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/fileman/install/tasks/uninstall.php"); return true; } function InstallEvents() { return true; } function UnInstallEvents() { return true; } function InstallFiles() { if($_ENV["COMPUTERNAME"]!='BX') { CopyDirFiles($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/fileman/install/admin", $_SERVER["DOCUMENT_ROOT"]."/bitrix/admin", true, true); CopyDirFiles($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/fileman/install/images", $_SERVER["DOCUMENT_ROOT"]."/bitrix/images", true, true); CopyDirFiles($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/fileman/install/images/1.gif", $_SERVER["DOCUMENT_ROOT"]."/bitrix/images/"); CopyDirFiles($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/fileman/install/themes", $_SERVER["DOCUMENT_ROOT"]."/bitrix/themes", true, true); CopyDirFiles($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/fileman/install/components", $_SERVER["DOCUMENT_ROOT"]."/bitrix/components", true, true); CopyDirFiles($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/fileman/install/js", $_SERVER["DOCUMENT_ROOT"]."/bitrix/js", true, true); CopyDirFiles($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/fileman/install/tools", $_SERVER["DOCUMENT_ROOT"]."/bitrix/tools", true, true); } if(\Bitrix\Main\Loader::includeModule('fileman')) { \CFileMan::decodePdfViewerLangFiles(); } return true; } function UnInstallFiles() { DeleteDirFiles($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/fileman/install/admin", $_SERVER["DOCUMENT_ROOT"]."/bitrix/admin"); DeleteDirFiles($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/fileman/install/themes/.default/", $_SERVER["DOCUMENT_ROOT"]."/bitrix/themes/.default");//css DeleteDirFilesEx("/bitrix/themes/.default/icons/fileman/");//icons DeleteDirFilesEx("/bitrix/images/fileman/");//images DeleteDirFilesEx("/bitrix/js/fileman"); // JS DeleteDirFiles($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/fileman/install/tools", $_SERVER["DOCUMENT_ROOT"]."/bitrix/tools"); // tools return true; } function DoInstall() { global $DOCUMENT_ROOT, $APPLICATION, $step; $FM_RIGHT = $APPLICATION->GetGroupRight("fileman"); if ($FM_RIGHT!="D") { $this->InstallDB(); $this->InstallFiles(); $APPLICATION->IncludeAdminFile(Loc::getMessage("FILEMAN_INSTALL_TITLE"), $_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/fileman/install/step1.php"); } } function DoUninstall() { global $DOCUMENT_ROOT, $APPLICATION, $step; $FM_RIGHT = $APPLICATION->GetGroupRight("fileman"); if ($FM_RIGHT!="D") { $this->UnInstallDB(); $this->UnInstallFiles(); $APPLICATION->IncludeAdminFile(Loc::getMessage("FILEMAN_UNINSTALL_TITLE"), $_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/fileman/install/unstep1.php"); } } function GetModuleRightList() { $arr = array( "reference_id" => array("D","F","R"), "reference" => array( "[D] ".Loc::getMessage("FILEMAN_DENIED"), "[F] ".Loc::getMessage("FILEMAN_ACCESSABLE_FOLDERS"), "[R] ".Loc::getMessage("FILEMAN_VIEW")) ); return $arr; } } ?>