<commit_before><?php

class sprint_editor extends CModule
{
    var $MODULE_ID = "sprint.editor";
    var $MODULE_NAME;
    var $MODULE_VERSION;
    var $MODULE_VERSION_DATE;
    var $MODULE_DESCRIPTION;
    var $PARTNER_NAME;
    var $PARTNER_URI;
    var $MODULE_GROUP_RIGHTS = "Y";

    function sprint_editor()
    {
        $arModuleVersion = [];

        include(__DIR__ . "/version.php");

        $this->MODULE_VERSION = $arModuleVersion["VERSION"];
        $this->MODULE_VERSION_DATE = $arModuleVersion["VERSION_DATE"];

        include(__DIR__ . '/../locale/ru.php');

        $this->MODULE_NAME = GetMessage("SPRINT_EDITOR_MODULE_NAME");
        $this->MODULE_DESCRIPTION = GetMessage("SPRINT_EDITOR_MODULE_DESCRIPTION");
        $this->PARTNER_NAME = GetMessage("SPRINT_EDITOR_PARTNER_NAME");
        $this->PARTNER_URI = GetMessage("SPRINT_EDITOR_PARTNER_URI");
    }

    function DoInstall()
    {
        RegisterModule($this->MODULE_ID);
        RegisterModuleDependences('iblock', 'OnIBlockPropertyBuildList', 'sprint.editor', '\\Sprint\\Editor\\IblockPropertyEditor', 'GetUserTypeDescription');
        RegisterModuleDependences('main', 'OnUserTypeBuildList', 'sprint.editor', '\\Sprint\\Editor\\UserTypeEditor', 'GetUserTypeDescription');

        $this->afterInstallCopyAdmin();
        $this->afterInstallCopyPublic();
    }

    function afterInstallCopyAdmin()
    {
        CopyDirFiles(__DIR__ . "/admin", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/admin", true, true);
    }

    function afterInstallCopyPublic()
    {
        CopyDirFiles(__DIR__ . "/components", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/components", true, true);
    }

    function DoUninstall()
    {
        global $DB;

        DeleteDirFiles(__DIR__ . "/admin", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/admin");
        DeleteDirFiles(__DIR__ . "/components", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/components");

        $DB->Query('DELETE FROM b_module_to_module WHERE TO_MODULE_ID="sprint.editor"');
        UnRegisterModuleDependences('iblock', 'OnIBlockPropertyBuildList', 'sprint.editor');<commit_msg>Исправление совместимости установщика с php 8<commit_after><?php

class sprint_editor extends CModule
{
    public $MODULE_ID = "sprint.editor";
    public $MODULE_NAME;
    public $MODULE_VERSION;
    public $MODULE_VERSION_DATE;
    public $MODULE_DESCRIPTION;
    public $PARTNER_NAME;
    public $PARTNER_URI;
    public $MODULE_GROUP_RIGHTS = "Y";

    public function __construct()
    {
        $arModuleVersion = [];

        include(__DIR__ . "/version.php");

        $this->MODULE_VERSION = $arModuleVersion["VERSION"];
        $this->MODULE_VERSION_DATE = $arModuleVersion["VERSION_DATE"];

        include(__DIR__ . '/../locale/ru.php');

        $this->MODULE_NAME = GetMessage("SPRINT_EDITOR_MODULE_NAME");
        $this->MODULE_DESCRIPTION = GetMessage("SPRINT_EDITOR_MODULE_DESCRIPTION");
        $this->PARTNER_NAME = GetMessage("SPRINT_EDITOR_PARTNER_NAME");
        $this->PARTNER_URI = GetMessage("SPRINT_EDITOR_PARTNER_URI");
    }

    public function DoInstall()
    {
        RegisterModule($this->MODULE_ID);
        RegisterModuleDependences('iblock', 'OnIBlockPropertyBuildList', 'sprint.editor', '\\Sprint\\Editor\\IblockPropertyEditor', 'GetUserTypeDescription');
        RegisterModuleDependences('main', 'OnUserTypeBuildList', 'sprint.editor', '\\Sprint\\Editor\\UserTypeEditor', 'GetUserTypeDescription');

        $this->afterInstallCopyAdmin();
        $this->afterInstallCopyPublic();
    }

    public function afterInstallCopyAdmin()
    {
        CopyDirFiles(__DIR__ . "/admin", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/admin", true, true);
    }

    public function afterInstallCopyPublic()
    {
        CopyDirFiles(__DIR__ . "/components", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/components", true, true);
    }

    public function DoUninstall()
    {
        global $DB;

        DeleteDirFiles(__DIR__ . "/admin", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/admin");
        DeleteDirFiles(__DIR__ . "/components", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/components");

        $DB->Query('DELETE FROM b_module_to_module WHERE TO_MODULE_ID="sprint.editor"');
        UnRegisterModuleDependences('iblock', 'OnIBlockPropertyBuildList', 'sprint.editor');
{'fraction_non_alphanumeric': 0.13894736842105262, 'fraction_numerical': 0.00023391812865497077, 'mean_word_length': 3.7144432194046306, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '760404', 'n_tokens_mistral': 1296, 'n_tokens_neox': 1261, 'n_words': 195}