* revert the code, don't need the stage condition.

This commit is contained in:
wangchunsheng
2011-12-29 06:10:31 +00:00
parent 28724368f7
commit d5219151bf
2 changed files with 2 additions and 4 deletions
+1 -1
View File
@@ -471,7 +471,7 @@ class project extends control
$position[] = $this->lang->project->story;
/* The pager. */
$stories = $this->story->getProjectStories($projectID, 'all', $orderBy);
$stories = $this->story->getProjectStories($projectID, $orderBy);
$storyTasks = $this->task->getStoryTaskCounts(array_keys($stories), $projectID);
$users = $this->user->getPairs('noletter');
+1 -3
View File
@@ -797,17 +797,15 @@ class storyModel extends model
* Get stories list of a project.
*
* @param int $projectID
* @param string $stage
* @param string $orderBy
* @access public
* @return array
*/
public function getProjectStories($projectID = 0, $stage = 'all', $orderBy = 'pri_asc,id_desc')
public function getProjectStories($projectID = 0, $orderBy = 'pri_asc,id_desc')
{
return $this->dao->select('t1.*, t2.*')->from(TABLE_PROJECTSTORY)->alias('t1')
->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id')
->where('t1.project')->eq((int)$projectID)
->beginIF($stage != 'all')->andWhere('stage')->in($stage)->fi()
->andWhere('t2.deleted')->eq(0)
->orderBy($orderBy)
->fetchAll('id');