diff --git a/module/action/model.php b/module/action/model.php
index d6b51c41ef..ea2e44208c 100755
--- a/module/action/model.php
+++ b/module/action/model.php
@@ -1306,9 +1306,13 @@ class actionModel extends model
$shadowProducts = $this->dao->select('id')->from(TABLE_PRODUCT)->where('shadow')->eq(1)->fetchPairs();
$projectMultiples = $this->dao->select('id,type,multiple')->from(TABLE_PROJECT)->where('id')->in($projectIdList)->fetchAll('id');
+ $docList = $this->loadModel('doc')->getPrivDocs();
+ $docLibList = $this->doc->getLibs();
foreach($actions as $i => $action)
{
+ if($action->objectType == 'doc' and !isset($docList[$action->objectID])) unset($actions[$i]);
+ if($action->objectType == 'doclib' and !isset($docLibList[$action->objectID])) unset($actions[$i]);
if($action->objectType == 'product' AND isset($shadowProducts[$action->objectID]))
{
unset($actions[$i]);
diff --git a/module/execution/control.php b/module/execution/control.php
index 1fd33ae545..592af73289 100644
--- a/module/execution/control.php
+++ b/module/execution/control.php
@@ -3716,6 +3716,7 @@ class execution extends control
$period = $type == 'account' ? 'all' : $type;
$date = empty($date) ? '' : date('Y-m-d', $date);
$actions = $this->loadModel('action')->getDynamic($account, $period, $orderBy, $pager, 'all', 'all', $executionID, $date, $direction);
+ if(empty($recTotal)) $recTotal = count($actions);
/* The header and position. */
$execution = $this->execution->getByID($executionID);
@@ -3735,6 +3736,7 @@ class execution extends control
$this->view->param = $param;
$this->view->dateGroups = $this->action->buildDateGroup($actions, $direction, $type);
$this->view->direction = $direction;
+ $this->view->recTotal = $recTotal;
$this->display();
}
diff --git a/module/execution/view/dynamic.html.php b/module/execution/view/dynamic.html.php
index f6e4cec4cd..4de97a121d 100755
--- a/module/execution/view/dynamic.html.php
+++ b/module/execution/view/dynamic.html.php
@@ -20,7 +20,7 @@
if($period == $type)
{
$active = 'btn-active-text';
- $label .= " {$pager->recTotal}";
+ $label .= " {$recTotal}";
}
echo html::a(inlink('dynamic', "executionID=$executionID&type=$period"), $label, '', "class='btn btn-link $active' id='{$period}'")
?>
diff --git a/module/my/control.php b/module/my/control.php
index 83019c2d84..38344fd394 100755
--- a/module/my/control.php
+++ b/module/my/control.php
@@ -1614,7 +1614,7 @@ EOF;
$date = empty($date) ? '' : date('Y-m-d', $date);
$actions = $this->loadModel('action')->getDynamic($this->app->user->account, $type, $orderBy, $pager, 'all', 'all', 'all', $date, $direction);
- if(empty($recTotal)) $originTotal = $pager->recTotal;
+ if(empty($originTotal)) $originTotal = $pager->recTotal;
/* Assign. */
$this->view->type = $type;
diff --git a/module/product/control.php b/module/product/control.php
index 40a5d1449d..9a1ecb7e49 100755
--- a/module/product/control.php
+++ b/module/product/control.php
@@ -843,6 +843,7 @@ class product extends control
$period = $type == 'account' ? 'all' : $type;
$date = empty($date) ? '' : date('Y-m-d', $date);
$actions = $this->loadModel('action')->getDynamic($account, $period, $orderBy, $pager, $productID, 'all', 'all', $date, $direction);
+ if(empty($recTotal)) $recTotal = count($actions);
/* The header and position. */
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->product->dynamic;
@@ -862,6 +863,7 @@ class product extends control
$this->view->pager = $pager;
$this->view->dateGroups = $this->action->buildDateGroup($actions, $direction, $type);
$this->view->direction = $direction;
+ $this->view->recTotal = $recTotal;
$this->display();
}
diff --git a/module/product/view/dynamic.html.php b/module/product/view/dynamic.html.php
index e223ed6cb3..e4c6ec2f71 100755
--- a/module/product/view/dynamic.html.php
+++ b/module/product/view/dynamic.html.php
@@ -20,7 +20,7 @@
if($period == $type)
{
$active = 'btn-active-text';
- $label .= " {$pager->recTotal}";
+ $label .= " {$recTotal}";
}
echo html::a(inlink('dynamic', "productID=$productID&type=$period"), $label, '', "class='btn btn-link $active' id='{$period}'")
?>
diff --git a/module/project/control.php b/module/project/control.php
index 18e538cef6..dcdc06e7a5 100755
--- a/module/project/control.php
+++ b/module/project/control.php
@@ -1040,6 +1040,7 @@ class project extends control
$period = $type == 'account' ? 'all' : $type;
$date = empty($date) ? '' : date('Y-m-d', $date);
$actions = $this->loadModel('action')->getDynamic($account, $period, $orderBy, $pager, 'all', $projectID, 'all', $date, $direction);
+ if(empty($recTotal)) $recTotal = count($actions);
/* The header and position. */
$project = $this->project->getByID($projectID);
@@ -1059,6 +1060,7 @@ class project extends control
$this->view->param = $param;
$this->view->dateGroups = $this->action->buildDateGroup($actions, $direction, $type);
$this->view->direction = $direction;
+ $this->view->recTotal = $recTotal;
$this->display();
}
diff --git a/module/project/view/dynamic.html.php b/module/project/view/dynamic.html.php
index cd200d8375..27c7245032 100755
--- a/module/project/view/dynamic.html.php
+++ b/module/project/view/dynamic.html.php
@@ -20,7 +20,7 @@
if($period == $type)
{
$active = 'btn-active-text';
- $label .= " {$pager->recTotal}";
+ $label .= " {$recTotal}";
}
echo html::a(inlink('dynamic', "projectID=$projectID&type=$period"), $label, '', "class='btn btn-link $active' id='{$period}'")
?>