uawdijnntqw1x1x1
IP : 216.73.216.207
Hostname : xhost1.intravision.ru
Kernel : Linux xhost1.intravision.ru 3.16.0-7-amd64 #1 SMP Debian 3.16.59-1 (2018-10-03) x86_64
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,
OS : Linux
PATH:
/
var
/
.
/
files
/
need-2-delete
/
mini-borishof.ru1
/
.
/
.
/
bitrix
/
modules
/
scale
/
lib
/
.
/
.
/
sitesdata.php
/
/
<?php namespace Bitrix\Scale; /** * Class SitesData * @package Bitrix\Scale * */ class SitesData { /** * @param $siteName * @return array site's param * @throws \Bitrix\Main\ArgumentNullException */ public static function getSite($siteName, $dbName = false) { if(strlen($siteName) <= 0) throw new \Bitrix\Main\ArgumentNullException("siteName"); $result = array(); $sites = self::getList($dbName); if(isset($sites[$siteName])) $result = $sites[$siteName]; return $result; } /** * @return string */ public static function getKernelSite() { foreach(self::getList() as $siteId => $siteParams) if($siteParams['SiteInstall'] == 'kernel') return $siteId; return ''; } /** * @return string */ public static function getKernelRoot() { foreach(self::getList() as $siteId => $siteParams) if($siteParams['SiteInstall'] == 'kernel') return $siteParams['DocumentRoot']; return ''; } /** * @param string $dbName * @return array List of all sites & their params */ public static function getList($dbName = false) { if(!$dbName) { $connection = \Bitrix\Main\Application::getConnection(); $dbName = $connection->getDatabase(); } static $result = array(); if(!isset($result[$dbName])) { $resSite = array(); $shellAdapter = new ShellAdapter(); $execRes = $shellAdapter->syncExec("sudo -u root /opt/webdir/bin/bx-sites -o json -a list -d ".$dbName); $sitesData = $shellAdapter->getLastOutput(); if($execRes) { $arData = json_decode($sitesData, true); if(isset($arData["params"])) $resSite = $arData["params"]; $rsSite = \Bitrix\Main\SiteTable::getList(); while ($site = $rsSite->fetch()) { foreach($resSite as $siteId => $siteInfo) { $docRoot = strlen($site["DOC_ROOT"]) > 0 ? $site["DOC_ROOT"] : \Bitrix\Main\Application::getDocumentRoot(); if($siteInfo["DocumentRoot"] == $docRoot) { $resSite[$siteId]["NAME"] = $site["NAME"]." (".$site["LID"].") "; } else { $resSite[$siteId]["NAME"] = $siteId; } } } } $result[$dbName] = $resSite; } return $result[$dbName]; } }
/var/./files/need-2-delete/mini-borishof.ru1/././bitrix/modules/scale/lib/././sitesdata.php