Code Duplication    Length = 5-5 lines in 2 locations

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

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