Code Duplication    Length = 5-6 lines in 2 locations

application/modules/gallery/admin.php 2 locations

@@ 1078-1083 (lines=6) @@
1075
                    echo $this->image_lib->display_errors();
1076
                }
1077
            }
1078
        } else {
1079
            // copy file to thumbs folder
1080
            $this->load->helper('File');
1081
            $file_data = read_file($file['full_path']);
1082
            write_file($thumb_name, $file_data);
1083
        }
1084
1085
        // Create admin thumb file
1086
        $config = [];
@@ 1102-1106 (lines=5) @@
1099
            $this->image_lib->clear();
1100
            $this->image_lib->initialize($config);
1101
            $this->image_lib->resize();
1102
        } else {
1103
            $this->load->helper('File');
1104
            $file_data = read_file($file['full_path']);
1105
            write_file($thumb_name, $file_data);
1106
        }
1107
1108
        // Draw watermark.
1109
        if ($file['image_width'] > $this->conf['watermark_min_width'] AND $file['image_height'] > $this->conf['watermark_min_height']) {