* Fix linkstory bug.

This commit is contained in:
zhujinyong
2021-03-23 14:21:53 +08:00
parent 3146fb6b3e
commit 543078c4ee
12 changed files with 63 additions and 68 deletions
+3 -2
View File
@@ -160,12 +160,13 @@ class projectModel extends model
* Get a project by id.
*
* @param int $projectID
* @param string $type project|sprint,stage
* @access public
* @return object
*/
public function getByID($projectID)
public function getByID($projectID, $type = 'project')
{
$project = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($projectID)->andWhere('`type`')->eq('project')->fetch();
$project = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($projectID)->andWhere('`type`')->in($type)->fetch();
if(!$project) return false;
if($project->end == '0000-00-00') $project->end = '';