diff --git a/module/action/model.php b/module/action/model.php index 62d0264966..f665e432e9 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -1424,7 +1424,7 @@ class actionModel extends model * @param array $actions * @param string $direction * @param string $type all|today|yesterday|thisweek|lastweek|thismonth|lastmonth - * @param string $orderBy + * @param string $orderBy date_desc|date_asc * @access public * @return array */ @@ -1456,17 +1456,15 @@ class actionModel extends model } } + /* Modify date to the corrret order. */ 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'))) + elseif($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); - } + 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 30ff8032b2..1ce38f6366 100644 --- a/module/company/control.php +++ b/module/company/control.php @@ -167,7 +167,7 @@ class company extends control * @param int $productID * @param int $projectID * @param int $executionID - * @param string $orderBy + * @param string $orderBy date_deac|date_asc * @access public * @return void */