403Webshell
Server IP : 185.252.147.100  /  Your IP : 216.73.216.196
Web Server : nginx/1.27.3
System : Linux mitrofanov.ru 6.1.0-37-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.140-1 (2025-05-22) x86_64
User : mitr ( 1000)
PHP Version : 8.2.29
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /www/html/kanboard/app/Model/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/html/kanboard/app/Model/SubtaskTaskConversionModel.php
<?php

namespace Kanboard\Model;

use Kanboard\Core\Base;

/**
 * Class SubtaskTaskConversionModel
 *
 * @package Kanboard\Model
 * @author  Frederic Guillot
 */
class SubtaskTaskConversionModel extends Base
{
    /**
     * Convert a subtask to a task
     *
     * @access public
     * @param  integer $project_id
     * @param  integer $subtask_id
     * @return integer
     */
    public function convertToTask($project_id, $subtask_id)
    {
        $subtask = $this->subtaskModel->getById($subtask_id);
        $parent_task = $this->taskFinderModel->getById($subtask['task_id']);

        $task_id = $this->taskCreationModel->create(array(
            'project_id' => $project_id,
            'title' => $subtask['title'],
            'time_estimated' => $subtask['time_estimated'],
            'time_spent' => $subtask['time_spent'],
            'owner_id' => $subtask['user_id'],
            'swimlane_id' => $parent_task['swimlane_id'],
            'priority' => $parent_task['priority'],
            'column_id' => $parent_task['column_id'],
            'category_id' => $parent_task['category_id'],
            'color_id' => $parent_task['color_id']
        ));

        if ($task_id !== false) {
            $link = $this->linkModel->getByLabel('is a child of');
            if ($link) {
                $this->taskLinkModel->create($task_id, $subtask['task_id'], $link['id']);
            }

            $this->tagDuplicationModel->duplicateTaskTags($parent_task['id'], $task_id);
            $this->subtaskModel->remove($subtask_id);
        }

        return $task_id;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit