Code Duplication    Length = 7-7 lines in 2 locations

geodirectory-functions/custom_fields_functions.php 1 location

@@ 1624-1630 (lines=7) @@
1621
1622
                    $new_name = $post_id . '_' . $field_id . '_' . $img_name_arr[0] . '.' . $img_name_arr[1];
1623
                    $explode_sub_dir = explode("/", $sub_dir);
1624
                    if ($curr_img_dir == end($explode_sub_dir)) {
1625
                        $img_path = $geodir_uploadpath . '/' . $filename;
1626
                        $img_url = $geodir_uploadurl . '/' . $filename;
1627
                    } else {
1628
                        $img_path = $uploads_dir . '/temp_' . $current_user->data->ID . '/' . $filename;
1629
                        $img_url = $uploads['url'] . '/temp_' . $current_user->data->ID . '/' . $filename;
1630
                    }
1631
1632
                    $uploaded_file = '';
1633
                    if (file_exists($img_path))

geodirectory-functions/post_functions.php 1 location

@@ 1056-1062 (lines=7) @@
1053
                        } else {
1054
                            $new_name = $post_id . '_' . $file_name;
1055
1056
                            if ($curr_img_dir == $sub_dir) {
1057
                                $img_path = $geodir_uploadpath . '/' . $filename;
1058
                                $img_url = $geodir_uploadurl . '/' . $filename;
1059
                            } else {
1060
                                $img_path = $uploads_dir . '/temp_' . $current_user->data->ID . '/' . $filename;
1061
                                $img_url = $uploads['url'] . '/temp_' . $current_user->data->ID . '/' . $filename;
1062
                            }
1063
1064
                            $uploaded_file = '';
1065