]> projects.mako.cc - selectricity-live/commitdiff
Strip ridiculously long DNS names
authorJohn Dong <jdong@mit.edu>
Fri, 31 Aug 2007 16:25:42 +0000 (12:25 -0400)
committerJohn Dong <jdong@mit.edu>
Fri, 31 Aug 2007 16:25:42 +0000 (12:25 -0400)
app/controllers/quickvote_controller.rb
app/views/quickvote/list_voters.rhtml

index b9c790f40f872fa99048f10aec38cc76abc348a1..cc57bb51d80ff8f825a3d88119ccbf90b4e22ef3 100644 (file)
@@ -185,8 +185,7 @@ class QuickvoteController < ApplicationController
 
       marker = GMarker.new([location.lat,location.lng],
                            :title => "Voter",
-                           :info_window => (voter.ipaddress or "unknown") \
-                                           + "   " + voter.vote.votestring)
+                           :info_window => (voter.ipaddress or "unknown"))
       @map.overlay_init(marker)
     end
   end
index ea276d7b6a7d50570ae059e5348ba82ca6b8b2ab..4d8e5388aae7b0f674b1be991e5b5662788b0e05 100644 (file)
             end
             
             %>
-        <%=h((w.host == nil or w.host.empty?) ? voter.ipaddress : w.host)%>
+        <%=h((w.host == nil or w.host.empty?) ? voter.ipaddress : w.host[-30..-1])%>
       </td>
       <td>
         <%org=(w.all.grep(/^(OrgName|org-name)/)[0] or "").sub(/^(OrgName|org-name)\:/,'').strip+" - "+ (w.all.grep(/^(NetName|netname)/)[0] or "").sub(/^(NetName|netname)\:/,'').strip %>
-        <% if org =~ /IANA/ %>
+        <% if org =~ /asdfasdf/ %>
           <%= "No additional information" %>
         <% else %>
           <%= h(org) %>

Benjamin Mako Hill || Want to submit a patch?