barnhouse (barnhouse) wrote in changelog,
barnhouse
barnhouse
changelog

[livejournal] r15443: LJSUP-3978: Don't show street and buildi...

Committer: sebua
LJSUP-3978: Don't show street and building when detecting with wi2Geo IP

U   trunk/htdocs/js/entry.js
Modified: trunk/htdocs/js/entry.js
===================================================================
--- trunk/htdocs/js/entry.js	2009-07-09 02:07:06 UTC (rev 15442)
+++ trunk/htdocs/js/entry.js	2009-07-09 03:15:19 UTC (rev 15443)
@@ -118,12 +118,14 @@
 	          if(q){		
 		  	wi2Geo.country=q.city.country;
 		  	wi2Geo.city=q.city.name;
-		  	wi2Geo.street=q.building.street;
-		  	wi2Geo.building=q.building.address;
-			wi2Geo.metro=q.metro.name;
+			wi2Geo.type=q.type;
+			if(wi2Geo.type!='IP'){
+		  		wi2Geo.street=q.building.street;
+		  		wi2Geo.building=q.building.address;
+				wi2Geo.metro=q.metro.name;
+			}
 		  	wi2Geo.lat=q.lat;
 		  	wi2Geo.lng=q.lng;
-			wi2Geo.type=q.type;
 		  }
 		  wi2Geo.response=true;
 	 }
@@ -178,7 +180,7 @@
 				var fMetro=(wi2Geo.metro)||"";
 				var fLat=(gGears.lat||wi2Geo.lat)?((gGears.lat||wi2Geo.lat)+", "):("");
 				var fLng=gGears.lng||wi2Geo.lng||"";
-				if((!fCountry || !fCity || !fLat || !fLng)||(gGears.type=='IP' && wi2Geo.type=='IP')){
+				if(!fCountry || !fCity || !fLat || !fLng){
 					HTTPReq.getJSON({url:'/tools/endpoints/geo_location.bml',
 						onData:function(data){
 							if(data.data){

Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments