* [task#122674,done,2h,0h] Filter out BRs and URs that have been closed after filtering those with open tags.
This commit is contained in:
@@ -663,7 +663,14 @@ class productModel extends model
|
||||
{
|
||||
$unclosedStatus = $this->lang->story->statusList;
|
||||
unset($unclosedStatus['closed']);
|
||||
return $this->story->getProductStories($productID, $branch, $modules, array_keys($unclosedStatus), $type, $sort, true, '', $pager);
|
||||
$stories = $this->story->getProductStories($productID, $branch, $modules, array_keys($unclosedStatus), $type, $sort, true, '', $pager);
|
||||
foreach($stories as $storyID => $story)
|
||||
{
|
||||
if($story->type != 'story' && $story->stage == 'closed') unset($stories[$storyID]);
|
||||
}
|
||||
$this->app->loadClass('pager', true);
|
||||
$pager = new pager(count($stories), $pager->recPerPage, $pager->pageID);
|
||||
return $stories ? current(array_chunk($stories, $pager->recPerPage, true)) : array();
|
||||
}
|
||||
|
||||
/* Set default function called, when browseType is (draftstory, activestory, changingstory, reviewingstory, closedstory, developingstory, launchedstory). */
|
||||
|
||||
@@ -35,6 +35,7 @@ cid=0
|
||||
include dirname(__FILE__, 5) . '/test/lib/init.php';
|
||||
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
|
||||
|
||||
zenData('product')->gen(5);
|
||||
zenData('story')->gen(100);
|
||||
|
||||
$productIDList = array(1, 2, 3, 4, 5, 1000001);
|
||||
|
||||
Reference in New Issue
Block a user