Tom Hughes
f4571eeb7c
Revert r16046.
...
DO NOT COMMIT MAJOR ENHANCEMENTS TO TRUNK WITHOUT TALKING TO ME FIRST.
2009-06-23 02:48:38 +00:00
Matt Amos
b8f6dbd403
Adding initial version of the OAuth token authentication method. This adds basic OAuth support for registering apps, getting and revoking keys, etc... The tokens come with 6 separate permissions bits; read/write user preferences, write diaries, write API and read/write GPS traces. Needs more tests.
2009-06-22 16:54:37 +00:00
Thomas Wood
554818b5b4
Contrary to what the previous commit message said, we do actually have more cases of user A triggering mail to user B.
...
(references #1968 )
2009-06-20 20:42:22 +00:00
Thomas Wood
0ed4cdbd49
Force locale on subject translation for diary comment notifications, since the sending user's locale is not that of recipient.
...
It is assumed that sender locale is that of recipient for the rest of the emails, which is fine, since the sender is the recipient.
The bodies are accounted for correctly by common_headers and the monkeypatching of ActionMailer.
(references #1968 )
2009-06-20 20:36:52 +00:00
Shaun McDonald
65eb6af303
Give a nice error message when parsing the nwr tags and they are missing the k and/or v. Also includes tests.
2009-06-11 11:08:37 +00:00
Shaun McDonald
37df03a043
Cleanup the Relation.from_xml to come in line with the Way and Node versions. Includes tests. Bug fix for the previous tests.
2009-06-10 17:17:03 +00:00
Shaun McDonald
e4d7b3ee66
Throw errors in the way xml parsing if there is a problem. Bring the way parsing in line with the node parsing. Properly deal with the 0 id case. Some Way.from_xml tests.
2009-06-10 15:42:12 +00:00
Shaun McDonald
e3693d487a
More unit tests for the parsing of the Node.from_xml. Some code clean up to ensure that a node that cannot be parsed will always throw an exception, to be handled by the arround handler.
2009-06-08 18:53:19 +00:00
Ævar Arnfjörð Bjarmason
938cdd8503
Made GPX notification E-Mails translatable
...
The multiline 'notifier.gpx_notification.success.loaded_successfully'
message is how one should properly do multiline messages to be
embedded into E-Mail. It wraps at 80 columns (if translated correctly)
and isn't as inhererently limited as splitting the E-Mail into one
message per-line like the other notification messages do it.
2009-06-07 15:50:30 +00:00
Tom Hughes
d9dbd3edf1
Make the rest of the email translatable.
2009-06-05 23:53:47 +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
857eeae8b2
Optimise the finding of nearby users a bit.
2009-06-05 08:27:45 +00:00
Tom Hughes
35eeff0081
Fix up translation issues in diary comment notifier.
2009-06-02 08:25:00 +00:00
Shaun McDonald
2875a2c4b3
more tranlations for validations. Bug fix for the missing translation of the gps upload
2009-06-01 18:09:24 +00:00
Tom Hughes
5294e4d989
Send notification messages in the target user's language.
2009-05-31 16:10:53 +00:00
Tom Hughes
0e96027a20
Sort out storage and use of user preferred languages.
2009-05-31 14:55:45 +00:00
Tom Hughes
3d906fe8c6
Merge 15165:15373 from trunk.
2009-05-31 11:32:32 +00:00
Tom Hughes
5b3b288fc2
Add a list of languages and fix a few issues with the schema. Also get
...
language selection for diary entries working.
2009-05-30 16:37:21 +00:00
Shaun McDonald
3a599519eb
Some more of the user account translations. Custom generate method for languages, that doesn't appear to work. Setting user language on create. Start translations in controllers. Diary entries can now be saved.
2009-05-30 14:04:42 +00:00
Tom Hughes
0e71278320
Rename language_code to code - language_code is tautological when it's
...
in the language table anyway.
2009-05-23 00:00:25 +00:00
Shaun McDonald
53b4d645d8
First stage of i18n. Some migrations and extra plugins.
2009-05-22 18:36:17 +00:00
Matt Amos
4ab495f5db
Added locking around update and delete methods on main API objects. This should remove the 500 errors which come from concurrent overlapping updates. Experimental - might be too slow for production.
2009-05-21 14:57:03 +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
Harry Wood
3415aa4689
label changesets as (big) based on their bbox area
2009-05-15 16:24:55 +00:00
Tom Hughes
fa13a11a94
Optimise retrieval of full relations.
2009-05-15 09:10:50 +00:00
Matt Amos
d7badc8402
Fixed precondition failed message which was trying to dereference nil.
2009-05-14 11:19:28 +00:00
Shaun McDonald
7331f82bce
Remove a rescue, which is stopping a more detailed error message being returned to the user.
2009-05-13 23:42:18 +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
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
43988beec3
A better optimisation, as suggested by TomH.
2009-05-11 15:16:36 +00:00
Matt Amos
9481a79e71
Added optimisation for way checking. Same method as for relations.
2009-05-11 14:34:04 +00:00
Matt Amos
b7f306a437
Fixed problem where tag lengths were generating a 422 error with no message. They now generate a 400 error with a meaningful message.
2009-05-10 00:33:55 +00:00
Tom Hughes
d6e605414d
Set a custom return path so that we can ignore bounces.
2009-05-09 12:17:10 +00:00
Thomas Wood
c273b4b1fa
Tests for PreconditionFailed error messages.
...
Change to relation.rb to bring element selection in-line with that of way, so to return nil to be caught later, rather than raise an error.
Change to way.rb to clarify which way on diff upload.
2009-05-06 21:08:50 +00:00
Thomas Wood
d7fd3fb6e5
One final (I've checked the rest now!) mis-referenced id, plus make the error msg simpler.
2009-05-06 19:55:25 +00:00
Matt Amos
30bbca0f3b
Potential fix for slow relation precondition checking based on Frederik's suggestion on the list to only check new members.
2009-05-06 10:35:39 +00:00
Shaun McDonald
d0e16cdb6c
be a bit more specific when a way is a member of a relation. Actually return an error message when a relation precondition fails. Remove a debug statement.
2009-05-05 17:07:06 +00:00
Thomas Wood
1d48f48827
Fix another mis-referenced error message id!
2009-05-02 18:28:39 +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
Tom Hughes
5b0e72ec71
Get rid of foreign_class specification which is no longer needed.
2009-05-01 23:20:53 +00:00
Tom Hughes
329b6faf91
Use association names with :joins instead of writing the SQL for the
...
join by hand.
2009-04-30 23:45:55 +00:00
Shaun McDonald
34381e56b7
give a id when a way is a member of a relation
2009-04-30 16:50:20 +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
Thomas Wood
2861236f60
Fix another error reporting bug similar to previous, again on printing RelationMember.id rather than RelationMember.relation.id
2009-04-30 07:10:57 +00:00
Thomas Wood
bb3108cb99
Fix grammar/referred relation id in precondition failed error.
...
From: "Precondition failed: The relation 5 is a used in relation 4,0."
To: "Precondition failed: The relation 5 is used in relation 4."
2009-04-30 06:52:14 +00:00
Richard Fairhurst
41f85fb77d
Potlatch 0.11a
2009-04-30 01:23:50 +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
Tom Hughes
6d1c010213
Use the alias for the conditions as well...
2009-04-28 16:25:37 +00:00
Tom Hughes
074e5b0a11
Use an alias for current_relation_members to avoid clashing with
...
any attempt to eager load it.
2009-04-28 16:15:02 +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