Code Duplication    Length = 5-6 lines in 2 locations

application/modules/gallery/admin.php 2 locations

@@ 1063-1068 (lines=6) @@
1060
                    echo $this->image_lib->display_errors();
1061
                }
1062
            }
1063
        } else {
1064
            // copy file to thumbs folder
1065
            $this->load->helper('File');
1066
            $file_data = read_file($file['full_path']);
1067
            write_file($thumb_name, $file_data);
1068
        }
1069
1070
        // Create admin thumb file
1071
        $config = [];
@@ 1087-1091 (lines=5) @@
1084
            $this->image_lib->clear();
1085
            $this->image_lib->initialize($config);
1086
            $this->image_lib->resize();
1087
        } else {
1088
            $this->load->helper('File');
1089
            $file_data = read_file($file['full_path']);
1090
            write_file($thumb_name, $file_data);
1091
        }
1092
1093
        // Draw watermark.
1094
        if ($file['image_width'] > $this->conf['watermark_min_width'] AND $file['image_height'] > $this->conf['watermark_min_height']) {