diff --git a/fuel/modules/fuel/controllers/module.php b/fuel/modules/fuel/controllers/module.php index a1e95b295..7f35d00a5 100644 --- a/fuel/modules/fuel/controllers/module.php +++ b/fuel/modules/fuel/controllers/module.php @@ -1,4 +1,4 @@ -1display_field])) ? json_encode($data[$this->display_field]) : $data[$this->display_field]; + $msg_data = $this->model->display_name($data); $msg = lang('module_edited', $this->module_name, $msg_data); $this->fuel->logs->write($msg); $this->_clear_cache(); @@ -1158,7 +1158,7 @@ protected function _process_edit($id) // run after_save hook $this->_run_hook('after_save', $data); - $msg_data = (is_array($data[$this->display_field])) ? json_encode($data[$this->display_field]) : $data[$this->display_field]; + $msg_data = $this->model->display_name($data); $msg = lang('module_edited', $this->module_name, $msg_data); $this->fuel->logs->write($msg); $this->_clear_cache(); @@ -1700,11 +1700,7 @@ function delete($id = NULL) { $data = $this->model->find_by_key($id, 'array'); $vars['id'] = $id; - - if (isset($data[$this->display_field])) - { - $vars['title'] = $data[$this->display_field]; - } + $vars['title'] = $this->model->display_name($data); } if (empty($data)) show_404(); @@ -2089,7 +2085,7 @@ function _toggle($id, $field, $toggle) // run after_save hook $this->_run_hook('after_save', $data); - $msg_data = (is_array($data[$this->display_field])) ? json_encode($data[$this->display_field]) : $data[$this->display_field]; + $msg_data = $this->model->display_name($data); $msg = lang('module_edited', $this->module_name, $msg_data); $this->fuel->logs->write($msg); }