diff --git a/module/action/lang/en.php b/module/action/lang/en.php index d8f8cdd729..9767de0ddb 100755 --- a/module/action/lang/en.php +++ b/module/action/lang/en.php @@ -498,7 +498,7 @@ $lang->action->label->testtask = 'Request|testtask|view|caseID=%s'; $lang->action->label->testsuite = 'Test Suite|testsuite|view|suiteID=%s'; $lang->action->label->caselib = 'Case Library|caselib|view|libID=%s'; $lang->action->label->todo = 'Todo|todo|view|todoID=%s'; -$lang->action->label->doclib = 'Doc Library|doc|objectLibs|type=%s&objectID=%s&libID=%s&docID=&version=&appendLib=%s'; +$lang->action->label->doclib = 'Doc Library|doc|objectLibs|type=%s&objectID=%s&libID=%s'; $lang->action->label->doc = 'Doc|doc|view|docID=%s'; $lang->action->label->user = 'User|user|view|account=%s'; $lang->action->label->testreport = 'Report|testreport|view|report=%s'; diff --git a/module/action/model.php b/module/action/model.php index a36ee17a49..67710ecf15 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -1170,7 +1170,6 @@ class actionModel extends model $libObjectID = trim($libObjectID, ','); if(empty($libObjectID) and $type != 'custom') return false; - $vars = substr($vars,0,strpos($vars,'&docID')); $params = sprintf($vars, $type, $libObjectID, $libID); } elseif($action->objectType == 'api') @@ -1428,7 +1427,7 @@ class actionModel extends model * @access public * @return array */ - public function buildDateGroup($actions, $direction = 'next', $type = 'today') + public function buildDateGroup($actions, $direction = 'next', $type = 'today', $orderBy = 'date_desc') { $dateGroup = array(); foreach($actions as $action) @@ -1456,7 +1455,20 @@ class actionModel extends model } } - if($direction != 'next') $dateGroup = array_reverse($dateGroup); + if($this->app->rawModule != 'company' and $direction != 'next') + { + $dateGroup = array_reverse($dateGroup); + } + else if($this->app->rawModule == 'company' and (($direction == 'next' and $orderBy == 'date_asc') or ($direction == 'pre' and $orderBy == 'date_desc'))) + { + $dateGroup = array_reverse($dateGroup); + foreach($dateGroup as $key => $dateItem) + { + $dateGroup[$key] = array_reverse($dateItem); + } + + } + return $dateGroup; } diff --git a/module/company/control.php b/module/company/control.php index 9052d5c3ad..30ff8032b2 100644 --- a/module/company/control.php +++ b/module/company/control.php @@ -290,7 +290,7 @@ class company extends control $this->view->userID = $userID; $this->view->param = $param; $this->view->browseType = $browseType; - $this->view->dateGroups = $this->action->buildDateGroup($actions, $direction, $browseType); + $this->view->dateGroups = $this->action->buildDateGroup($actions, $direction, $browseType, $orderBy); $this->view->direction = $direction; $this->display(); } diff --git a/module/company/view/dynamic.html.php b/module/company/view/dynamic.html.php index 38ac06089e..65620af0ed 100644 --- a/module/company/view/dynamic.html.php +++ b/module/company/view/dynamic.html.php @@ -53,7 +53,6 @@