Code Duplication    Length = 11-13 lines in 2 locations

geodirectory-functions/taxonomy_functions.php 1 location

@@ 1679-1691 (lines=13) @@
1676
			$location_manager = defined('POST_LOCATION_TABLE') ? true : false;
1677
			$neighbourhood_active = $location_manager && get_option('location_neighbourhoods') ? true : false;
1678
            
1679
			if(geodir_is_page('detail') && isset($post->country_slug)){
1680
                $location_terms = array(
1681
                    'gd_country' => $post->country_slug,
1682
                    'gd_region' => $post->region_slug,
1683
                    'gd_city' => $post->city_slug
1684
                );
1685
				
1686
				if ($neighbourhood_active && !empty($location_terms['gd_city']) && $gd_ses_neighbourhood = $gd_session->get('gd_neighbourhood')) {
1687
					$location_terms['gd_neighbourhood'] = $gd_ses_neighbourhood;
1688
				}
1689
            } else {
1690
                $location_terms = geodir_get_current_location_terms('query_vars');
1691
            }
1692
1693
            $geodir_show_location_url = get_option('geodir_show_location_url');
1694
            $location_terms = geodir_remove_location_terms($location_terms);

geodirectory-functions/general_functions.php 1 location

@@ 978-988 (lines=11) @@
975
            $location_manager = defined('POST_LOCATION_TABLE') ? true : false;
976
			$neighbourhood_active = $location_manager && get_option('location_neighbourhoods') ? true : false;
977
				
978
			if(geodir_is_page('detail') && isset($post->country_slug)){
979
                $location_terms = array(
980
                    'gd_country' => $post->country_slug,
981
                    'gd_region' => $post->region_slug,
982
                    'gd_city' => $post->city_slug
983
                );
984
				
985
				if ($neighbourhood_active && !empty($location_terms['gd_city']) && $gd_ses_neighbourhood = $gd_session->get('gd_neighbourhood')) {
986
					$location_terms['gd_neighbourhood'] = $gd_ses_neighbourhood;
987
				}
988
            }
989
990
            $geodir_show_location_url = get_option('geodir_show_location_url');
991