From b76eccf502afe85715f26bc9a95692d5e19b1643 Mon Sep 17 00:00:00 2001
From: Eric Rasmussen <erasmussen2@unl.edu>
Date: Mon, 31 Aug 2009 15:23:59 +0000
Subject: [PATCH] only show users on the homepage with latitude and location
 explanation

---
 .../views/default/customindex/content.php     | 24 ++++++++++---------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/customindex/views/default/customindex/content.php b/customindex/views/default/customindex/content.php
index 5266aa4f..02d2a1a9 100644
--- a/customindex/views/default/customindex/content.php
+++ b/customindex/views/default/customindex/content.php
@@ -181,17 +181,19 @@
 	                
 	                if($users){
 	                    foreach($users as $user){
-	                    	echo "<div class=\"member_icon\"><img onclick=\"window.openLocation('" . $user->longitude . "','" . $user->latitude . "','" . $user->username . "',";
-	                    	if($user->profile_country)
-		                    	echo "'" . $user->profile_country . " - " . str_replace("'","\'",htmlentities($user->profile_city)) . ", " . $user->profile_state . "',";
-		                    else
-		                    	echo "'',";
-	                    	echo "'" . str_replace("'","\'",htmlentities($user->name)) . "',";
-	                    	if($user->profile_attended_from != "Did Not Attend UNL" && $user->profile_attended_from != "" && $user->profile_attended_from != NULL)
-		                    	echo "'Attended UNL: " . $user->profile_attended_from . "-" . $user->profile_attended_to . "'";
-		                    else
-		                    	echo "''";
-	                    	echo ",'". str_replace("'","\'",htmlentities($user->map_explanation))."');return false;\" src=\"mod/profile/icon.php?username=" . $user->username . "&size=tiny\" /></div>";                         
+	                    	if($user->longitude != undefined && $user->longitude != "" && $user->map_explanation != undefined && $user->map_explanation != "")
+		                    	echo "<div class=\"member_icon\"><img onclick=\"window.openLocation('" . $user->longitude . "','" . $user->latitude . "','" . $user->username . "',";
+		                    	if($user->profile_country)
+			                    	echo "'" . $user->profile_country . " - " . str_replace("'","\'",htmlentities($user->profile_city)) . ", " . $user->profile_state . "',";
+			                    else
+			                    	echo "'',";
+		                    	echo "'" . str_replace("'","\'",htmlentities($user->name)) . "',";
+		                    	if($user->profile_attended_from != "Did Not Attend UNL" && $user->profile_attended_from != "" && $user->profile_attended_from != NULL)
+			                    	echo "'Attended UNL: " . $user->profile_attended_from . "-" . $user->profile_attended_to . "'";
+			                    else
+			                    	echo "''";
+		                    	echo ",'". str_replace("'","\'",htmlentities($user->map_explanation))."');return false;\" src=\"mod/profile/icon.php?username=" . $user->username . "&size=tiny\" /></div>";                         
+	                    	else{}
 	                    }
 	                }
 	                ?>
-- 
GitLab