Commit graph

159 commits

Author SHA1 Message Date
Tom Hughes
1844a19f48 Add support for GeoIP lookups using Quova. 2009-11-25 00:52:44 +00:00
Tom Hughes
436daaff15 Catch domain exceptions as we approach the poles and handle them by
setting the longitude bounds to select a stripe right around the world
which is what they are tending to as we approach the poles.

Closes #2488.
2009-11-22 13:35:51 +00:00
Ævar Arnfjörð Bjarmason
e0eb2b79b7 [18163] commited by me yesterday (and reverted in [18165]) was
broken. I didn't restart rails when testing it because I thought lib/
was auto-refreshed as well and that:

    ruby -e 'x = []; x[0]["foo"] = "bar"'

Would work and autovify like it does in Perl. But no, you have to do:

    ruby -e 'x = [{}]; x[0]["foo"] = "bar"'

This commit is equivalent to [18163] aside from that fix to lib/potlatch.rb
2009-10-15 08:21:57 +00:00
Tom Hughes
d0c63b6d5d Revert r18163 as it is completely broken. 2009-10-15 07:46:54 +00:00
Ævar Arnfjörð Bjarmason
cc9a9ee399 Make the preset list at the bottom of the screen (Airport, Bus stop,
...) translatable
2009-10-14 23:42:09 +00:00
Tom Hughes
63f61b5f04 Replace hard coded nwr enumeration support with a more generic
system for defining enumerations.
2009-08-04 13:23:36 +00:00
Matt Amos
4826032d18 Added methods to strip those non-XML control characters from tags in AMF controller and give an error if there's invalid UTF-8. 2009-07-27 16:54:00 +00:00
Tom Hughes
291350850d Say which way is too long. 2009-07-15 13:34:14 +00:00
Ævar Arnfjörð Bjarmason
212d56ce88 Delete the old localised.yaml file Potlatch used before it was split into per-language files 2009-07-14 21:40:50 +00:00
Tom Hughes
942ca1ff23 Merge 16355:16480 from trunk. 2009-07-13 23:28:02 +00:00
Richard Fairhurst
1ef85668de and the accompanying SWF 2009-07-09 20:00:29 +00:00
Tom Hughes
9a32033209 Merge 16216:16355 from trunk. 2009-07-05 23:47:40 +00:00
Matt Amos
57e571d241 Changed shortlink zoom level correction char to '-', as this seems to fare better with twitter et al.'s URL highlighting. Decoder is backwards-compatible with the old system. 2009-07-02 16:40:29 +00:00
Tom Hughes
6baccfaddd Merge 16110:16216 from trunk. 2009-06-29 16:50:34 +00:00
Matt Amos
1d8e66016c Adding 'shortlink' functions which will allow URLs like http://osm.org/go/XXXX suitable for use in twitter, etc... 2009-06-25 23:31:53 +00:00
Tom Hughes
9cd29b4721 Make creating a bbox object from a string work. 2009-06-07 16:32:24 +00:00
Tom Hughes
5de81dc4b0 More work on optimisation the location of nearby users - it turns out
that getting the database to do the filtering is much better as it
avoids us constructing thousands of user objects only to then throw
most of them away again.
2009-06-05 09:30:31 +00:00
Tom Hughes
098e757cf2 Add a remove_foreign_key method and make migration 34 reversible. 2009-05-31 13:53:16 +00:00
Tom Hughes
3d906fe8c6 Merge 15165:15373 from trunk. 2009-05-31 11:32:32 +00:00
Matt Amos
2006c416d2 Fixed typo. 2009-05-21 21:24:29 +00:00
Tom Hughes
4a4d89138c Rationalise API error classes by getting of the render_opts method which
was never used except to extract the data it contained. Instead each class
now has a status method that returns the HTTP status code to use and a
to_s method to return a textual description of the error.
2009-05-21 19:28:39 +00:00
Richard Fairhurst
8100be1e8d Potlatch 1.0 2009-05-21 00:30:33 +00:00
Tom Hughes
b38684e59e Add a global timeout that is applied to most API requests. 2009-05-20 22:18:36 +00:00
Matt Amos
3d0ca940d2 Using an around_handler for catching and rendering errors in most of the API controller methods. This simplifies the code and makes errors and error messages a bit more consistent. Also added a utility method for checking the HTTP method. 2009-05-20 17:39:59 +00:00
Matt Amos
d073d9bc75 Added a consistency check that both ids are valid and match. Fixed diff upload code where this wasn't being set. 2009-05-13 19:21:04 +00:00
Tom Hughes
ed68d524de Use a local lookup table for country bounding boxes rather than relying
on geonames.org being able to do it in a reasonable time.
2009-05-11 16:50:09 +00:00
Matt Amos
3e9b6845d3 Fixed 'raw' raises by converting them to the appropriate OSM::APIError type. Made the error messages for placeholder fixing more informative. Added tests for these. 2009-04-29 10:07:35 +00:00
Shaun McDonald
0b6d9ce877 Improve the node/way/relation already deleted error message, and get rid bug in way model with missing new in exception 2009-04-27 11:49:56 +00:00
Richard Fairhurst
9b4271ed8c pass common API error text through to Potlatch so it can be shown to the user 2009-04-24 17:44:52 +00:00
Tom Hughes
869da5e228 Add some extra indexes to the changesets table. 2009-04-20 14:54:05 +00:00
Tom Hughes
a4de927a28 Handle differences in interval constant formatting. 2009-04-16 20:47:18 +00:00
Shaun McDonald
08bd1688ee Railsify the relation member model, type attribute, by putting it into class case, rather than lower case. Requires reload of postgres databases or manual change to the enum. Fixes the databrowser on postgres, however affects the rest of the codebase. 2009-04-15 14:49:21 +00:00
Tom Hughes
7fff6361c1 Use the inet type for IP addresses in postgres. 2009-04-09 15:17:12 +00:00
Tom Hughes
2e1414b229 Fix primary key creation for ACL table. 2009-04-09 15:09:38 +00:00
Tom Hughes
c8ee135104 Merge 12304:14009 from trunk. 2009-03-08 13:02:37 +00:00
Tom Hughes
07c1cd6b98 Update to use libxml 1.0.0 gem. 2009-03-08 11:34:46 +00:00
Richard Fairhurst
e827a04607 further work on 0.6 history (not quite complete yet) 2009-02-25 01:14:19 +00:00
Matt Amos
5143fbcd5b Test and fix for #1567, for teh betterer osmChange compliance. 2009-02-08 16:54:28 +00:00
Matt Amos
12b779f0b4 Test and fix for issue #1568. Wasn't testing for end element in the right place. 2009-02-08 16:33:48 +00:00
Matt Amos
c54471ee33 Fix for #1565. Added a couple of tests and fixed another issue with re-used placeholder IDs. 2009-02-08 08:28:01 +00:00
Frederik Ramm
509832c5b3 splitting and joining tags is gone for good in 0.6 2009-02-03 00:57:19 +00:00
Richard Fairhurst
8b79e2b963 eight zillion more presets for 0.5 Potlatch 2009-01-21 00:31:55 +00:00
Matt Amos
1ffb5c1502 Moved changeset consistency checks to library code. 2008-11-26 12:56:42 +00:00
Shaun McDonald
0ff1214f86 Make the role in relations optional, with a test to make sure it is. Also start moving the errors reading the xml to exceptions, thus making it possible to give meaningful error messages, when bad xml is sent (More work is required on this including doing the same for nodes and ways). With the latest gems update it seems that the lib xml handling was broken, using the newer method. Adding the content type for the exceptions. 2008-11-24 18:55:24 +00:00
Matt Amos
783528830a Fixed bug in changeset idle timeout. Fixed another with a spurious require. 2008-11-21 12:53:09 +00:00
Matt Amos
495bd7f1f0 Made user input parsing more robust in changeset query method. Added tests. 2008-11-17 15:30:46 +00:00
Matt Amos
28839fd150 Fixed some bugs in changeset query code. Added more test cases. 2008-11-17 14:32:15 +00:00
Andy Allan
d717f2d02a Postgres adapter, and make migration 022 db-agnostic 2008-11-10 19:14:00 +00:00
Richard Fairhurst
3065af398d 0.6-friendly Potlatch (work in progress). DO NOT SET POTLATCH_USE_SQL=false as it won't work 2008-11-09 23:50:03 +00:00
Andy Allan
4adeeb51ad remove indexes before renaming tables (some dbs have database-level index namespaces) and unsigned is also a mysqlism 2008-11-09 19:30:22 +00:00