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
Tom Hughes
912f708d62
Fix some comments to reflect reality.
2009-05-21 17:30:20 +00:00
Matt Amos
94c89838d4
Use utility method for error reporting.
2009-05-21 14:55:25 +00:00
Shaun McDonald
d4954bc7b1
Raising an exception in Ruby requires a .new. Add a timeout line to the capabilities call.
2009-05-21 14:05:09 +00:00
Tom Hughes
97769170fd
Give the API error handler a generic rescue that returns 500 with
...
the exception details.
2009-05-21 10:02:26 +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
Tom Hughes
058d942c7c
Log arguments to AMF read methods.
2009-05-20 13:24:59 +00:00
Tom Hughes
fe13e13d16
Arrays of object IDs are a bad idea.
2009-05-15 09:18:10 +00:00
Tom Hughes
fa13a11a94
Optimise retrieval of full relations.
2009-05-15 09:10:50 +00:00
Richard Fairhurst
add2d223a6
Apply #1824 .
2009-05-14 08:38:32 +00:00
Richard Fairhurst
ced42cf101
always set new node id when updating/deleting (to be read in conjunction with zere's patch)
2009-05-13 19:23:59 +00:00
Shaun McDonald
807070f818
Actually mark a trace as being public based on the saved preference, rather than simply ignoring the saved preference.
2009-05-12 15:29:27 +00:00
Matt Amos
ed0a1658df
Removed updatetimeout method, as it isn't needed any more.
2009-05-12 14:38:22 +00:00
Matt Amos
1ceb4ab9ba
Fixed bug #1816 - the timeout updating logic should have been in a before_save handler, not in save_with_tags.
2009-05-12 13:54:37 +00:00
Tom Hughes
3a8a2ebb1a
Add an internal geocoder for lat/lon positions.
2009-05-10 11:57:10 +00:00
Tom Hughes
69c2400997
Add a warning about whitelisting webmaster@openstreetmap.org in antispam
...
systems.
2009-05-09 16:46:36 +00:00
Tom Hughes
f7cbff9a5a
Move geocoder constants to application configuration to avoid test warnings.
2009-05-08 18:21:39 +00:00
Shaun McDonald
a41f1b297b
No need to define a constand for the appconfig var. Removes a warning when running under rails 2.2.2
2009-05-08 14:20:26 +00:00
Richard Fairhurst
8696d144ad
Potlatch 0.11b
2009-05-04 23:37:06 +00:00
Thomas Wood
22292debda
Data browser changes, make links more user friendly, displaying name tag where possible.
...
Changes to models ok'd (and suggested as temporary solution) by TomH
References #1777
2009-05-02 00:26:37 +00:00
Shaun McDonald
33d32bf737
We don't need an extra method for the amf controller for saving nodes, just catch the exception and do nothing with that exception.
2009-04-30 15:16:15 +00:00
Richard Fairhurst
41f85fb77d
Potlatch 0.11a
2009-04-30 01:23:50 +00:00
Tom Hughes
9acc6d3288
Eager load node and way details when processing a map call.
2009-04-28 16:26:06 +00:00
Tom Hughes
4de6006567
Eager load nodes and node tags for the way when doing a getway call.
2009-04-28 15:55:54 +00:00
Tom Hughes
bf31791f65
Add a changeset cache to stop us looking up the same changeset over
...
and over again when processing a map call.
2009-04-28 13:40:30 +00:00
Tom Hughes
c20f55045d
Reject any AMF request which is not a POST request.
2009-04-28 11:14:15 +00:00
Tom Hughes
6f0b3ccbcd
Don't log the contents of the changeset.
2009-04-28 08:59:33 +00:00
Tom Hughes
a7ea614dd0
Finish removing old request counting logic.
2009-04-26 23:27:40 +00:00
Tom Hughes
72b05157ae
Remove old code to exit after 10000 requests as the memory limit code
...
should do a better job of controlling things.
2009-04-26 23:14:20 +00:00
Shaun McDonald
788e817e4a
Make the report_error function support any http status code for added flexibility.
2009-04-26 21:11:31 +00:00
Richard Fairhurst
2acdfd7132
a couple of minor revert fixes
2009-04-24 20:12:43 +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
Richard Fairhurst
3cc3ff7ad6
lots of relations changes for speed and version management
2009-04-24 14:46:52 +00:00
Shaun McDonald
e3ae690a00
The render method needs to be last, otherwise the error header won't get set. Needs tests.
2009-04-23 21:03:59 +00:00
Richard Fairhurst
64d076847b
fix another way-node/Way-Node problem in amf_controller; add WinIE JS compatibility via ExternalInterface (we can use this later to alert for a commit message if none is provided)
2009-04-23 17:54:17 +00:00
Richard Fairhurst
749a735472
actually delete nodes on deleteway (might help)
2009-04-23 12:01:42 +00:00
Richard Fairhurst
c65a3d76ae
fix nodes bug
2009-04-23 08:32:26 +00:00
Richard Fairhurst
0a682b9da6
change relation_member 'type' case, to match change in database
2009-04-22 17:47:06 +00:00
Shaun McDonald
0b94234a6b
adding the maximum number of elements in a changeset to the capabilities call, including test update
2009-04-22 11:03:22 +00:00
Richard Fairhurst
a80b42652b
fix id/relid inconsistency
2009-04-21 23:36:53 +00:00
Tom Hughes
9e337e1ab8
Fixed search controller to have some chance of working.
2009-04-21 23:35:19 +00:00
Tom Hughes
ab7ac69e68
Force selection to fail when no traces match the tag.
2009-04-21 21:54:44 +00:00
Tom Hughes
2201a7ff32
Don't generate an IN condition with an empty list.
2009-04-21 21:51:02 +00:00
Tom Hughes
e192c77986
Use correct names for member types.
2009-04-21 21:37:27 +00:00
Thomas Wood
d8aacff595
Slight performance improvement (a reported 2s) by skipping db query if no bbox is passed in on /history
...
Thanks apmon for the report.
2009-04-21 18:04:43 +00:00
Tom Hughes
ddba8eeff7
Add an expiry header to trace images.
2009-04-21 17:10:35 +00:00
Richard Fairhurst
5e10a7d48b
Make error messages more helpful
2009-04-21 11:27:03 +00:00
Richard Fairhurst
f423c13ad4
Split out subscript to see which one is erroring
2009-04-21 10:14:28 +00:00