Skip to content

Commit

Permalink
replaced remaining instances of data[this->display_field] for display…
Browse files Browse the repository at this point in the history
…_name

function;
  • Loading branch information
ryan-k-t committed Nov 4, 2015
1 parent 47df6dd commit 835b14e
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions fuel/modules/fuel/controllers/module.php
@@ -1,4 +1,4 @@
1<?php
<?php
require_once(FUEL_PATH.'/libraries/Fuel_base_controller.php');

class Module extends Fuel_base_controller {
Expand Down Expand Up @@ -963,7 +963,7 @@ protected function _process_create()

if ( ! empty($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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 835b14e

Please sign in to comment.