Code Duplication    Length = 6-8 lines in 2 locations

application/modules/admin/components.php 2 locations

@@ 219-224 (lines=6) @@
216
217
            $this->lib_admin->log(lang('Installed a module', 'admin') . ' ' . $data['name']);
218
219
            if ($this->input->server('HTTP_X_REQUESTED_WITH') == 'XMLHttpRequest') {
220
                $result = true;
221
                echo json_encode(['result' => $result]);
222
            } else {
223
                return TRUE;
224
            }
225
        } else {
226
            if ($this->input->server('HTTP_X_REQUESTED_WITH') == 'XMLHttpRequest') {
227
                $result = true;
@@ 225-232 (lines=8) @@
222
            } else {
223
                return TRUE;
224
            }
225
        } else {
226
            if ($this->input->server('HTTP_X_REQUESTED_WITH') == 'XMLHttpRequest') {
227
                $result = true;
228
                echo json_encode(['result' => $result]);
229
            } else {
230
                return FALSE;
231
            }
232
        }
233
    }
234
235
    /**