aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Controllers/HistoryController.php
diff options
context:
space:
mode:
Diffstat (limited to 'h-source/Application/Controllers/HistoryController.php')
-rw-r--r--h-source/Application/Controllers/HistoryController.php22
1 files changed, 20 insertions, 2 deletions
diff --git a/h-source/Application/Controllers/HistoryController.php b/h-source/Application/Controllers/HistoryController.php
index a92f906..3b6e1d2 100644
--- a/h-source/Application/Controllers/HistoryController.php
+++ b/h-source/Application/Controllers/HistoryController.php
@@ -275,6 +275,7 @@ class HistoryController extends BaseController
'field_name' => '-deleted',
'actions' => array('devicehide','deviceshow'),
'group' => 'admin',
+ 'types_to_show' => 'device_app,device',
),
@@ -467,8 +468,15 @@ class HistoryController extends BaseController
if (in_array($clean['group'],$this->s['registered']->status['groups']))
{
$clean['type'] = $this->types[$type]['clean_type'];
+ $clean['typeInWhereClause'] = "'".$clean['type']."'";
- switch ($clean['type']) {
+ if (array_key_exists('types_to_show',$this->types[$type]))
+ {
+ $clean['typeInWhereClause'] = "'".implode("','",explode(',',$this->types[$type]['types_to_show']))."'";
+ }
+
+ switch ($clean['type'])
+ {
case 'user':
$data['object'] = 'user';
$data['box_class'] = 'details_of_actions_inner_user';
@@ -499,7 +507,17 @@ class HistoryController extends BaseController
break;
}
- $data['res'] = $this->m['HistoryModel']->select()->where(array('id'=>$clean['id'],'type'=>$clean['type'],'gr'=>$clean['group']))->send();
+ $data['res'] = $this->m['HistoryModel']
+ ->select()
+ ->where(
+ array
+ (
+ 'id'=>$clean['id'],
+ 'type'=>"in(".$clean['typeInWhereClause'].")",
+ 'gr'=>$clean['group'])
+ )
+ ->send();
+// echo $this->m['HistoryModel']->getQuery();
$data['md_action'] = array(
'hide' => 'hidden',