Changeset 729


Ignore:
Timestamp:
Feb 11, 2010, 11:08:50 PM (10 years ago)
Author:
Dominic Hargreaves
Message:

externalise password and display error from sanity_check

Location:
freethepostcode.org/html/ruby
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • freethepostcode.org/html/ruby/dao.rb

    r726 r729  
    11require 'mysql'
    2 
     2require 'secrets'
    33
    44module OSM
     
    88    MYSQL_SERVER = '127.0.0.1'
    99    MYSQL_USER = 'postcode'
    10     MYSQL_PASS = 'kc8dFusmw'
     10    MYSQL_PASS = get_password
    1111    MYSQL_DATABASE = 'postcode'
    1212
  • freethepostcode.org/html/ruby/submit.rhtml

    r728 r729  
    1818%>
    1919
    20 Got this data: <%=email%> says that <%=postcode1%> <%=postcode2%> is at <%=lat%>, <%=lon%><br>
     20Got this data: '<%=email%>' says that '<%=postcode1%>' '<%=postcode2%>' is at '<%=lat%>', '<%=lon%>'<br>
    2121
    2222%errs = sanity_check(postcode1 << " " << postcode2, lat.to_f, lon.to_f)
    2323%unless errs.empty?
    2424Sorry, the postcode you entered does not validate, or we think the
    25 latitude/longitude are not correct for the postcode zone.
     25latitude/longitude are not correct for the postcode zone:<br>
     26<%=errs%>
    2627%exit
    2728%end
Note: See TracChangeset for help on using the changeset viewer.