Code Duplication    Length = 13-16 lines in 2 locations

application/modules/admin/sys_update.php 1 location

@@ 194-209 (lines=16) @@
191
     */
192
    public function properties() {
193
194
        if ($this->input->post()) {
195
            $this->form_validation->set_rules('careKey', lang('careKey must required', 'admin'), 'trim|required');
196
197
            if ($this->form_validation->run() == FALSE) {
198
                showMessage(validation_errors(), '', 'r');
199
            } else {
200
201
                $this->update->setSettings(['careKey' => trim($this->input->post('careKey'))]);
202
                showMessage(lang('Changes saved', 'admin'));
203
            }
204
        } else {
205
            $data = [
206
                'careKey' => $this->update->getSettings('careKey')
207
            ];
208
            $this->template->show('sys_update_properties', FALSE, $data);
209
        }
210
    }
211
212
    /**

application/modules/feedback/admin.php 1 location

@@ 62-74 (lines=13) @@
59
                    $this->form_validation->set_rules('email', lang('E-Mail', 'feedback'), 'trim|valid_email|required|xss_clean');
60
                    $this->form_validation->set_rules('message_max_len', lang('Maximum message length', 'feedback'), 'trim|integer|required|xss_clean');
61
62
                    if ($this->form_validation->run($this) == FALSE) {
63
                        showMessage(validation_errors(), false, 'r');
64
                    } else {
65
                        $data = [
66
                            'email' => $this->input->post('email'),
67
                            'message_max_len' => (int) $this->input->post('message_max_len'),
68
                        ];
69
                        $this->db->where('name', 'feedback');
70
                        $this->db->update('components', ['settings' => serialize($data)]);
71
72
                        $this->lib_admin->log(lang('Feedbacks settings was edited', 'feedback'));
73
                        showMessage(lang('Settings have been saved', 'feedback'));
74
                    }
75
                }
76
                break;
77
        }