dev2fun.multidomain/Site.php at master · darkfriend/dev2fun.multidomain

PHOTO EMBED

Mon Jan 10 2022 08:54:23 GMT+0000 (Coordinated Universal Time)

Saved by @ilyayakusheff

   public static function getCurrent()
    {
        if(self::$currentSite === null) {
            $arSite = \CSite::GetList(
                $by='sort',
                $order='desc',
                [
                    'ABS_DOC_ROOT' => $_SERVER['DOCUMENT_ROOT'],
                ]
            )->Fetch();
            if ($arSite) {
                self::$currentSite = $arSite['LID'];
            } else {
                self::$currentSite = '';
            }
        }

        return self::$currentSite;
content_copyCOPY

https://github.com/darkfriend/dev2fun.multidomain/blob/master/win1251/dev2fun.multidomain/classes/composer/vendor/autoload.php