|  | @@ -1038,7 +1038,7 @@ function tripal_feature_load_featurelocs ($feature_id,$side = 'as_parent',$aggre
 | 
	
		
			
				|  |  |     $previous_db = tripal_db_set_active('chado');  // use chado database
 | 
	
		
			
				|  |  |     $flresults = db_query($sql, $feature_id);
 | 
	
		
			
				|  |  |     tripal_db_set_active($previous_db);  // now use drupal database 
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +dpm($flresults);
 | 
	
		
			
				|  |  |     // copy the results into an array
 | 
	
		
			
				|  |  |     $i=0;
 | 
	
		
			
				|  |  |     $featurelocs = array();
 | 
	
	
		
			
				|  | @@ -1054,7 +1054,7 @@ function tripal_feature_load_featurelocs ($feature_id,$side = 'as_parent',$aggre
 | 
	
		
			
				|  |  |        // add the result to the array
 | 
	
		
			
				|  |  |        $featurelocs[$i++] = $loc;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +dpm($featurelocs);  
 | 
	
		
			
				|  |  |     // Add the relationship feature locs if aggregate is turned on
 | 
	
		
			
				|  |  |     if($aggregate and strcmp($side,'as_parent')==0){ 
 | 
	
		
			
				|  |  |        // get the relationships for this feature without substituting any children
 | 
	
	
		
			
				|  | @@ -1068,7 +1068,7 @@ function tripal_feature_load_featurelocs ($feature_id,$side = 'as_parent',$aggre
 | 
	
		
			
				|  |  |           }
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |     } 
 | 
	
		
			
				|  |  | -dpm($featurelocs);     
 | 
	
		
			
				|  |  | +   
 | 
	
		
			
				|  |  |     usort($featurelocs,'tripal_feature_sort_locations');
 | 
	
		
			
				|  |  |     return $featurelocs;
 | 
	
		
			
				|  |  |  }
 |