summaryrefslogtreecommitdiff
path: root/app/Model/Action.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model/Action.php')
-rw-r--r--app/Model/Action.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/app/Model/Action.php b/app/Model/Action.php
index 905b8914..95e22d27 100644
--- a/app/Model/Action.php
+++ b/app/Model/Action.php
@@ -140,9 +140,17 @@ class Action extends Base
public function getAll()
{
$actions = $this->db->table(self::TABLE)->findAll();
+ $params = $this->db->table(self::TABLE_PARAMS)->findAll();
foreach ($actions as &$action) {
- $action['params'] = $this->db->table(self::TABLE_PARAMS)->eq('action_id', $action['id'])->findAll();
+
+ $action['params'] = array();
+
+ foreach ($params as $param) {
+ if ($param['action_id'] === $action['id']) {
+ $action['params'][] = $param;
+ }
+ }
}
return $actions;