Code Duplication    Length = 9-9 lines in 2 locations

geodirectory-admin/admin_functions.php 2 locations

@@ 3956-3964 (lines=9) @@
3953
                                }
3954
            
3955
                                $attachment = false;
3956
                                if ( isset( $term_data['image'] ) && $term_data['image'] != '' ) {
3957
                                    $cat_image = geodir_get_default_catimage( $term_id, $cat_posttype );
3958
                                    $cat_image = !empty( $cat_image ) && isset( $cat_image['src'] ) ? $cat_image['src'] : '';
3959
                                    
3960
                                    if ( basename($cat_image) != $term_data['image'] ) {
3961
                                        $attachment = true;
3962
                                        update_tax_meta( $term_id, 'ct_cat_default_img', array( 'id' => 'image', 'src' => $uploads['url'] . '/' . $term_data['image'] ), $cat_posttype );
3963
                                    }
3964
                                }
3965
                                
3966
                                if ( isset( $term_data['icon'] ) && $term_data['icon'] != '' ) {
3967
                                    $cat_icon = get_tax_meta( $term_id, 'ct_cat_icon', false, $cat_posttype );
@@ 3966-3974 (lines=9) @@
3963
                                    }
3964
                                }
3965
                                
3966
                                if ( isset( $term_data['icon'] ) && $term_data['icon'] != '' ) {
3967
                                    $cat_icon = get_tax_meta( $term_id, 'ct_cat_icon', false, $cat_posttype );
3968
                                    $cat_icon = !empty( $cat_icon ) && isset( $cat_icon['src'] ) ? $cat_icon['src'] : '';
3969
                                        
3970
                                    if ( basename($cat_icon) != $term_data['icon'] ) {
3971
                                        $attachment = true;
3972
                                        update_tax_meta( $term_id, 'ct_cat_icon', array( 'id' => 'icon', 'src' => $uploads['url'] . '/' . $term_data['icon'] ), $cat_posttype );
3973
                                    }
3974
                                }
3975
                                
3976
                                if ( $attachment ) {
3977
                                    $images++;