• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/sharing.php
  • Класс: BitrixDiskSharing
  • Вызов: Sharing::changeTaskName
public function changeTaskName($newTaskName)
{
	if($this->taskName === $newTaskName)
	{
		return true;
	}

	$success = $this->update(array(
		'TASK_NAME' => $newTaskName,
	));
	if(!$success)
	{
		return false;
	}
	if($this->isToDepartmentParent())
	{
		SharingTable::updateBatch(array('TASK_NAME' => $newTaskName,), array('PARENT_ID' => $this->id));
		if($this->isLoadedChildren())
		{
			foreach($this->getChildren() as $child)
			{
				$child->setAttributes(array('TASK_NAME' => $newTaskName,));
			}
			unset($child);
		}
	}

	return true;
}