Code Duplication    Length = 5-5 lines in 2 locations

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

@@ 1432-1436 (lines=5) @@
1429
                imagecopyresampled($tim, $im, 0, 0, 0, 0, $tw, $th, $w, $h);
1430
1431
                // check directories or create them
1432
                if (!file_exists("$thumbpath/$thumb_dir1")) {
1433
                    if (!mkdir("$thumbpath/$thumb_dir1")) {
1434
                        return 'mkdir in thumbpath failed';
1435
                    }
1436
                }
1437
                if (!file_exists("$thumbpath/$thumb_dir1/$thumb_dir2")) {
1438
                    if (!mkdir("$thumbpath/$thumb_dir1/$thumb_dir2")) {
1439
                        return 'mkdir in thumbpath failed';
@@ 1437-1441 (lines=5) @@
1434
                        return 'mkdir in thumbpath failed';
1435
                    }
1436
                }
1437
                if (!file_exists("$thumbpath/$thumb_dir1/$thumb_dir2")) {
1438
                    if (!mkdir("$thumbpath/$thumb_dir1/$thumb_dir2")) {
1439
                        return 'mkdir in thumbpath failed';
1440
                    }
1441
                }
1442
1443
                // save thumb
1444
                if ($ext == 'jpg') {