Update kanban control.php
This commit is contained in:
+22
-21
@@ -933,27 +933,6 @@ class kanban extends control
|
||||
return print(json_encode($kanbanGroup));
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a card.
|
||||
*
|
||||
* @param string $objectType story|task|bug
|
||||
* @param int $objectID
|
||||
* @param int $regionID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function deleteObjectCard($objectType, $objectID, $regionID)
|
||||
{
|
||||
$table = 'TABLE_' . strtoupper($objectType);
|
||||
$this->loadModel($objectType)->delete(constant($table), $objectID);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
$kanbanID = $this->dao->select('kanban')->from(TABLE_KANBANREGION)->where('id')->eq($regionID)->fetch('kanban');
|
||||
|
||||
$kanbanGroup = $this->kanban->getRDKanban($kanbanID);
|
||||
return print(json_encode($kanbanGroup));
|
||||
}
|
||||
|
||||
/**
|
||||
* View a card.
|
||||
*
|
||||
@@ -1401,6 +1380,28 @@ class kanban extends control
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a card.
|
||||
*
|
||||
* @param string $objectType story|task|bug
|
||||
* @param int $objectID
|
||||
* @param int $regionID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function deleteObjectCard($objectType, $objectID, $regionID)
|
||||
{
|
||||
if(!($objectType == 'task' or $objectType == 'story' or $objectType == 'bug')) return false;
|
||||
$table = 'TABLE_' . strtoupper($objectType);
|
||||
$this->loadModel($objectType)->delete(constant($table), $objectID);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
$kanbanID = $this->kanban->getKanbanIDByregion($regionID);
|
||||
|
||||
$kanbanGroup = $this->kanban->getRDKanban($kanbanID);
|
||||
return print(json_encode($kanbanGroup));
|
||||
}
|
||||
|
||||
/**
|
||||
* Set WIP.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user