uawdijnntqw1x1x1
IP : 18.191.149.30
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
/
rostov.axolotls.ru
/
bitrix
/
modules
/
disk
/
lib
/
internals
/
simpleright.php
/
/
<?php namespace Bitrix\Disk\Internals; use Bitrix\Main\Application; use Bitrix\Main\Entity; /** * Class SimpleRightTable * * Fields: * <ul> * <li> ID int mandatory * <li> OBJECT_ID int mandatory * <li> ACCESS_CODE string(50) optional * </ul> * * @package Bitrix\Disk * @internal **/ final class SimpleRightTable extends DataManager { /** * Returns DB table name for entity * * @return string */ public static function getTableName() { return 'b_disk_simple_right'; } /** * Returns entity map definition */ public static function getMap() { return array( 'ID' => array( 'data_type' => 'integer', 'primary' => true, 'autocomplete' => true, ), 'OBJECT_ID' => array( 'data_type' => 'integer', 'required' => true, ), 'ACCESS_CODE' => array( 'data_type' => 'string', 'required' => true, 'validation' => array(__CLASS__, 'validateAccessCode'), ), ); } /** * Validates access code field. * @return array */ public static function validateAccessCode() { return array( new Entity\Validator\Length(1, 50), ); } /** * Adds rows to table. * @param array $items Items. * @internal */ public static function insertBatch(array $items) { parent::insertBatch($items); } /** * Deletes rows by filter. * @param array $filter Filter does not look like filter in getList. It depends by current implementation. * @internal */ public static function deleteBatch(array $filter) { parent::deleteBatch($filter); } /** * Fills descendants simple rights by simple rights of object. * @internal * @param int $objectId Id of object. */ public static function fillDescendants($objectId) { $tableName = static::getTableName(); $pathTableName = ObjectPathTable::getTableName(); $connection = Application::getConnection(); $objectId = (int)$objectId; $connection->queryExecute(" INSERT INTO {$tableName} (OBJECT_ID, ACCESS_CODE) SELECT path.OBJECT_ID, sright.ACCESS_CODE FROM {$pathTableName} path INNER JOIN {$tableName} sright ON sright.OBJECT_ID = path.PARENT_ID WHERE path.PARENT_ID = {$objectId} "); } public static function deleteSimpleFromSelfAndChildren($objectId, $objectType) { $objectId = (int)$objectId; $connection = Application::getInstance()->getConnection(); if($objectType == FileTable::TYPE_FILE) { $sql = "DELETE FROM b_disk_simple_right WHERE OBJECT_ID = {$objectId}"; } else { $pathTable = ObjectPathTable::getTableName(); $sql = " DELETE sr FROM b_disk_simple_right sr JOIN {$pathTable} path ON path.OBJECT_ID = sr.OBJECT_ID WHERE path.PARENT_ID = {$objectId} "; } $connection->queryExecute($sql); } }
/var/www/axolotl/data/www/rostov.axolotls.ru/bitrix/modules/disk/lib/internals/simpleright.php