Code Duplication    Length = 9-9 lines in 2 locations

geodirectory-admin/admin_functions.php 2 locations

@@ 4229-4237 (lines=9) @@
4226
                                }
4227
            
4228
                                $attachment = false;
4229
                                if ( isset( $term_data['image'] ) && $term_data['image'] != '' ) {
4230
                                    $cat_image = geodir_get_default_catimage( $term_id, $cat_posttype );
4231
                                    $cat_image = !empty( $cat_image ) && isset( $cat_image['src'] ) ? $cat_image['src'] : '';
4232
                                    
4233
                                    if ( basename($cat_image) != $term_data['image'] ) {
4234
                                        $attachment = true;
4235
                                        update_tax_meta( $term_id, 'ct_cat_default_img', array( 'id' => 'image', 'src' => $uploads['url'] . '/' . $term_data['image'] ), $cat_posttype );
4236
                                    }
4237
                                }
4238
                                
4239
                                if ( isset( $term_data['icon'] ) && $term_data['icon'] != '' ) {
4240
                                    $cat_icon = get_tax_meta( $term_id, 'ct_cat_icon', false, $cat_posttype );
@@ 4239-4247 (lines=9) @@
4236
                                    }
4237
                                }
4238
                                
4239
                                if ( isset( $term_data['icon'] ) && $term_data['icon'] != '' ) {
4240
                                    $cat_icon = get_tax_meta( $term_id, 'ct_cat_icon', false, $cat_posttype );
4241
                                    $cat_icon = !empty( $cat_icon ) && isset( $cat_icon['src'] ) ? $cat_icon['src'] : '';
4242
                                        
4243
                                    if ( basename($cat_icon) != $term_data['icon'] ) {
4244
                                        $attachment = true;
4245
                                        update_tax_meta( $term_id, 'ct_cat_icon', array( 'id' => 'icon', 'src' => $uploads['url'] . '/' . $term_data['icon'] ), $cat_posttype );
4246
                                    }
4247
                                }
4248
                                
4249
                                if ( $attachment ) {
4250
                                    $images++;