* Remove unused function.
This commit is contained in:
@@ -2185,22 +2185,6 @@ class taskModel extends model
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get story comments.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getStoryComments($storyID)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_ACTION)
|
||||
->where('objectType')->eq('story')
|
||||
->andWhere('objectID')->eq($storyID)
|
||||
->andWhere('comment')->ne('')
|
||||
->fetchAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* Merge the default chart settings and the settings of current chart.
|
||||
*
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(__FILE__, 5) . '/test/lib/init.php';
|
||||
include dirname(__FILE__, 2) . '/task.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=taskModel->getStoryComments();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
根据storyID查找comment >> 这是一个系统日志测试备注2
|
||||
根据不存在的storyID查找comment >> 0
|
||||
|
||||
*/
|
||||
|
||||
$storyIDList = array(2, 1000001);
|
||||
|
||||
$task = new taskTest();
|
||||
r($task->getStoryCommentsTest($storyIDList[0])) && p('0:comment') && e('这是一个系统日志测试备注2'); //根据storyID查找comment
|
||||
r($task->getStoryCommentsTest($storyIDList[1])) && p('0:comment') && e('0'); //根据不存在的storyID查找comment
|
||||
@@ -764,27 +764,6 @@ class taskTest
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get story comments.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getStoryCommentsTest($storyID)
|
||||
{
|
||||
$object = $this->objectModel->getStoryComments($storyID);
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $object;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test compute parent task working hours.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user