403Webshell
Server IP : 185.252.147.100  /  Your IP : 216.73.216.43
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/Api/Procedure/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/html/kanboard/app/Api/Procedure/LinkProcedure.php
<?php

namespace Kanboard\Api\Procedure;

/**
 * Link API controller
 *
 * @package  Kanboard\Api\Procedure
 * @author   Frederic Guillot
 */
class LinkProcedure extends BaseProcedure
{
    /**
     * Get a link by id
     *
     * @access public
     * @param  integer   $link_id   Link id
     * @return array
     */
    public function getLinkById($link_id)
    {
        return $this->linkModel->getById($link_id);
    }

    /**
     * Get a link by name
     *
     * @access public
     * @param  string $label
     * @return array
     */
    public function getLinkByLabel($label)
    {
        return $this->linkModel->getByLabel($label);
    }

    /**
     * Get the opposite link id
     *
     * @access public
     * @param  integer   $link_id   Link id
     * @return integer
     */
    public function getOppositeLinkId($link_id)
    {
        return $this->linkModel->getOppositeLinkId($link_id);
    }

    /**
     * Get all links
     *
     * @access public
     * @return array
     */
    public function getAllLinks()
    {
        return $this->linkModel->getAll();
    }

    /**
     * Create a new link label
     *
     * @access public
     * @param  string   $label
     * @param  string   $opposite_label
     * @return boolean|integer
     */
    public function createLink($label, $opposite_label = '')
    {
        $values = array(
            'label' => $label,
            'opposite_label' => $opposite_label,
        );

        list($valid, ) = $this->linkValidator->validateCreation($values);
        return $valid ? $this->linkModel->create($label, $opposite_label) : false;
    }

    /**
     * Update a link
     *
     * @access public
     * @param  integer  $link_id
     * @param  integer  $opposite_link_id
     * @param  string   $label
     * @return boolean
     */
    public function updateLink($link_id, $opposite_link_id, $label)
    {
        $values = array(
            'id' => $link_id,
            'opposite_id' => $opposite_link_id,
            'label' => $label,
        );

        list($valid, ) = $this->linkValidator->validateModification($values);
        return $valid && $this->linkModel->update($values);
    }

    /**
     * Remove a link a the relation to its opposite
     *
     * @access public
     * @param  integer  $link_id
     * @return boolean
     */
    public function removeLink($link_id)
    {
        return $this->linkModel->remove($link_id);
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit