From 71dee1960cc94dfc178a645b4a668e160343a2a8 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Fri, 5 Jan 2024 16:09:44 +0800 Subject: [PATCH] * Fix the bug of sort when link story in project. --- module/execution/ui/linkstory.html.php | 2 +- module/projectstory/control.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/module/execution/ui/linkstory.html.php b/module/execution/ui/linkstory.html.php index b82e706be5..49dc5c077f 100644 --- a/module/execution/ui/linkstory.html.php +++ b/module/execution/ui/linkstory.html.php @@ -49,7 +49,7 @@ if(!isInModal()) ); } -$objectType = $object->type == 'project' ? 'project' : 'execution'; +$objectType = $object->type == 'project' ? 'projectstory' : 'execution'; dtable ( set::groupDivider(true), diff --git a/module/projectstory/control.php b/module/projectstory/control.php index 33dcc69c57..dfae5bb340 100644 --- a/module/projectstory/control.php +++ b/module/projectstory/control.php @@ -120,14 +120,15 @@ class projectStory extends control * @param int $projectID * @param string $browseType * @param int $param + * @param string $orderBy * @param int $recPerPage * @param int $pageID * @access public * @return void */ - public function linkStory($projectID = 0, $browseType = '', $param = 0, $recPerPage = 50, $pageID = 1) + public function linkStory($projectID = 0, $browseType = '', $param = 0, $orderBy = 'id_desc', $recPerPage = 50, $pageID = 1) { - echo $this->fetch('execution', 'linkStory', "projectID={$projectID}&browseType={$browseType}¶m={$param}&orderBy=id_desc&recPerPage={$recPerPage}&pageID={$pageID}"); + echo $this->fetch('execution', 'linkStory', "projectID={$projectID}&browseType={$browseType}¶m={$param}&orderBy={$orderBy}&recPerPage={$recPerPage}&pageID={$pageID}"); } /**