diff --git a/module/company/control.php b/module/company/control.php index 25b9c877db..d233434258 100755 --- a/module/company/control.php +++ b/module/company/control.php @@ -176,7 +176,7 @@ class company extends control /* 根据日期补充动态数据。*/ /* Supplement action by date.*/ $dateGroups = $this->action->buildDateGroup($actions, $direction, $orderBy); - if(empty($recTotal) && $dateGroups) $recTotal = $this->action->getDynamicCount(); + if(empty($recTotal) && $dateGroups && $browseType != 'bysearch') $recTotal = $this->action->getDynamicCount($browseType); /* Assign.*/ $this->view->title = $this->lang->company->common . $this->lang->hyphen . $this->lang->company->dynamic; diff --git a/module/execution/control.php b/module/execution/control.php index 1a6fca99fb..94741ab8f1 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2623,7 +2623,7 @@ class execution extends control $date = empty($date) ? '' : date('Y-m-d', (int)$date); $actions = $this->loadModel('action')->getDynamicByExecution($executionID, $account, $period, $orderBy, 50, $date, $direction); $dateGroups = $this->action->buildDateGroup($actions, $direction); - if(empty($recTotal) && $dateGroups) $recTotal = $this->action->getDynamicCount(); + if(empty($recTotal) && $dateGroups) $recTotal = $this->action->getDynamicCount($period); $this->view->title = $execution->name . $this->lang->hyphen . $this->lang->execution->dynamic; $this->view->userIdPairs = $this->loadModel('user')->getTeamMemberPairs($executionID, 'execution', 'nodeleted|useid'); diff --git a/module/my/control.php b/module/my/control.php index f1fe520306..a3de5067b3 100755 --- a/module/my/control.php +++ b/module/my/control.php @@ -1477,7 +1477,7 @@ class my extends control $date = empty($date) ? '' : date('Y-m-d', (int)$date); $actions = $this->loadModel('action')->getDynamicByAccount($this->app->user->account, $type, $orderBy, 50, $date, $direction); $dateGroups = $this->action->buildDateGroup($actions, $direction); - if(empty($recTotal) && $dateGroups) $recTotal = $this->action->getDynamicCount(); + if(empty($recTotal) && $dateGroups) $recTotal = $this->action->getDynamicCount($type); /* Assign. */ $this->view->title = $this->lang->my->common . $this->lang->hyphen . $this->lang->my->dynamic; diff --git a/module/product/control.php b/module/product/control.php index c58843f1df..083e0d8ee9 100755 --- a/module/product/control.php +++ b/module/product/control.php @@ -518,7 +518,7 @@ class product extends control /* Get actions. */ list($actions, $dateGroups) = $this->productZen->getActionsForDynamic($account, $orderBy, $productID, $type, $date, $direction); - if(empty($recTotal) && $dateGroups) $recTotal = $this->action->getDynamicCount(); + if(empty($recTotal) && $dateGroups) $recTotal = $this->action->getDynamicCount($type == 'account' ? 'all' : $type); /* Assign. */ $this->view->title = $this->products[$productID] . $this->lang->hyphen . $this->lang->product->dynamic; diff --git a/module/project/control.php b/module/project/control.php index bd56214f66..4b7f9f1095 100755 --- a/module/project/control.php +++ b/module/project/control.php @@ -775,7 +775,7 @@ class project extends control $date = empty($date) ? '' : date('Y-m-d', $date); $actions = $this->loadModel('action')->getDynamicByProject($projectID, $account, $period, $orderBy, 50, $date, $direction); $dateGroups = $this->action->buildDateGroup($actions, $direction); - if(empty($recTotal) && $dateGroups) $recTotal = $this->action->getDynamicCount(); + if(empty($recTotal) && $dateGroups) $recTotal = $this->action->getDynamicCount($period); /* The header and position. */ $project = $this->project->getByID($projectID); diff --git a/module/user/control.php b/module/user/control.php index b30d8aa601..73a726120f 100755 --- a/module/user/control.php +++ b/module/user/control.php @@ -974,7 +974,7 @@ class user extends control $date = $date ? date('Y-m-d', $date) : ''; $actions = $this->loadModel('action')->getDynamicByAccount($user->account, $period, $orderBy, 50, $date, $direction); $dateGroups = $this->action->buildDateGroup($actions, $direction, $period); - if(empty($recTotal) && $dateGroups) $recTotal = count($dateGroups) < 2 ? count($dateGroups, 1) - count($dateGroups) : $this->action->getDynamicCount(); + if(empty($recTotal) && $dateGroups) $recTotal = $this->action->getDynamicCount($period); /* Assign. */ $this->view->title = $this->lang->user->common . $this->lang->hyphen . $this->lang->user->dynamic;