Code Duplication    Length = 5-5 lines in 2 locations

htdocs/lib2/logic/user.class.php 2 locations

@@ 1399-1403 (lines=5) @@
1396
                    if (!imagejpeg($tim, "$thumbpath/$thumb_dir1/$thumb_dir2/$fn", 75)) {
1397
                        return "save thumb failed [$ext]";
1398
                    }
1399
                } elseif ($ext == 'png') {
1400
                    if (!imagepng($tim, "$thumbpath/$thumb_dir1/$thumb_dir2/$fn", 4)) {
1401
                        return "save thumb failed [$ext]";
1402
                    }
1403
                } elseif ($ext == 'gif') {
1404
                    if (!imagegif($tim, "$thumbpath/$thumb_dir1/$thumb_dir2/$fn")) {
1405
                        return "save thumb failed [$ext]";
1406
                    }
@@ 1407-1411 (lines=5) @@
1404
                    if (!imagegif($tim, "$thumbpath/$thumb_dir1/$thumb_dir2/$fn")) {
1405
                        return "save thumb failed [$ext]";
1406
                    }
1407
                } elseif ($ext == 'bmp') {
1408
                    if (!imagebmp($tim, "$thumbpath/$thumb_dir1/$thumb_dir2/$fn")) {
1409
                        return "save thumb failed [$ext]";
1410
                    }
1411
                } else {
1412
                    return "save thumb failed [$ext], unknown extension";
1413
                }
1414
            }