uawdijnntqw1x1x1
IP : 18.117.252.232
Hostname : axolotl
Kernel : Linux axolotl 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05) 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
/
www
/
axolotl
/
data
/
www
/
perm.axolotls.ru
/
bitrix
/
modules
/
disk
/
lib
/
proxytype
/
group.php
/
/
<?php namespace Bitrix\Disk\ProxyType; use Bitrix\Disk\Driver; use Bitrix\Disk\Storage; use Bitrix\Disk\Ui\Avatar; use Bitrix\Main\Loader; use Bitrix\Main\Localization\Loc; Loc::loadMessages(__FILE__); class Group extends Disk { private $group; private $photoCache = array(); /** * Potential opportunity to attach object to external entity * @return bool */ public function canAttachToExternalEntity() { return true; } /** * Get url to view entity of storage (ex. user profile, group profile, etc) * By default: folder list * @return string */ public function getEntityUrl() { $groupPage = \COption::getOptionString("socialnetwork", "workgroups_page", false, SITE_ID); if(!$groupPage) { $groupPage = SITE_DIR . 'workgroups/'; } return $groupPage . 'group/' . $this->entityId . '/'; } /** * Get name of entity (ex. user last name + first name, group name, etc) * By default: get title * @return string */ public function getEntityTitle() { $group = $this->getGroup(); return isset($group['~NAME'])? $group['~NAME'] : parent::getEntityTitle(); } /** * Get image (avatar) of entity. * Can be shown with entityTitle in different lists. * @param int $width Image width. * @param int $height Image height. * @return string */ public function getEntityImageSrc($width, $height) { $group = $this->getGroup(); $photo = (int) $group['IMAGE_ID']; $key = $photo . " $width $height"; if (!isset($this->photoCache[$key])) { $this->photoCache[$key] = Avatar::getGroup($photo, $width, $height); } return $this->photoCache[$key]; } /** * Return name of storage. * @return string */ public function getTitle() { return Loc::getMessage('DISK_PROXY_TYPE_GROUP_TITLE'); } /** * Return work group params. * @return array|null */ private function getGroup() { if ($this->group !== null) { return $this->group; } if (!Loader::includeModule('socialnetwork')) { return null; } /** @noinspection PhpDynamicAsStaticMethodCallInspection */ $this->group = \CSocNetGroup::getByID($this->entityId); if (!is_array($this->group)) { $this->group = array(); } return $this->group; } /** * Checks read permissions by user for group. * Uses denormalized rights (b_disk_simple_right). * * Be careful^ this is internal method. * @param mixed $user User. * @param int $groupId Id of group. * @internal * @return bool */ public static function canRead($user, $groupId) { $entityType = static::className(); $groupStorage = Storage::buildFromArray(array( 'ENTITY_ID' => $groupId, 'ENTITY_TYPE' => $entityType, )); $proxyType = new static($groupId, $groupStorage); $parameters = array( 'filter' => array( 'ENTITY_ID' => (int)$groupId, 'ENTITY_TYPE' => $entityType, 'MODULE_ID' => Driver::INTERNAL_MODULE_ID, 'USE_INTERNAL_RIGHTS' => 1, ), ); $parameters = Driver::getInstance() ->getRightsManager() ->addRightsCheck( $proxyType->getSecurityContextByUser($user), $parameters, array( 'ROOT_OBJECT_ID', 'USE_INTERNAL_RIGHTS' ) ); return (bool)Storage::getList($parameters)->fetch(); } /** * Checks work group is extranet. * @return bool */ public function isExtranetGroup() { if ($group = $this->getGroup()) { if (!isset($this->group['IS_EXTRANET'])) { $this->group['IS_EXTRANET'] = false; if (\Bitrix\Main\Loader::includeModule("extranet")) { $groupId = (int)$group['ID']; $this->group['IS_EXTRANET'] = \CExtranet::IsExtranetSocNetGroup($groupId); } } } return (bool)$this->group['IS_EXTRANET']; } }
/var/www/axolotl/data/www/perm.axolotls.ru/bitrix/modules/disk/lib/proxytype/group.php