Commit graph

700 commits

Author SHA1 Message Date
Tom Hughes
554614723a Back out hack to setMapCenter and fix the problem in the right place. 2009-02-05 22:23:45 +00:00
Thomas Wood
1522ed275c Set params to sane defaults if unset by client.
Reject creates with no file with 400, model validations will also reject with 400 (as was existing but broken behaviour)
Closes #1510
2009-01-23 19:14:21 +00:00
Thomas Wood
9bb9de0fbe Require auth on calls to /trace/create, and pass through to form if called without params. Adjust validations on traces to prevent dual error messages on description (validates_presence_of catches the empty string removed from length validation)
More changes to come for api_create
References #1510
2009-01-23 01:19:45 +00:00
Shaun McDonald
d3dc973376 Move the ActiveRecord::RecordNotFound to the block, so that it catches the not found in line 327, when a nonexistant way id is searched for. 2009-01-14 00:17:42 +00:00
Richard Fairhurst
c9237a3583 swap way write with node deletion as per dev@ 2009-01-13 08:37:58 +00:00
Richard Fairhurst
8e394b1625 small versioning fix (plus history rework in progress) 2009-01-11 17:09:43 +00:00
Thomas Wood
747d6f1d11 Revert last commit - too many test failures 2008-12-31 16:43:44 +00:00
Thomas Wood
898beb7b7f DateTime => Time for consistency in changeset code, ok by shaun. 2008-12-31 16:33:02 +00:00
Thomas Wood
8fe53e4823 Only show changesets that are actually closed in the index view. 2008-12-31 16:14:39 +00:00
Thomas Wood
62b6d15967 Make browse controller index show recently closed changesets, rather than recently changed nodes. 2008-12-23 15:47:06 +00:00
Thomas Wood
60834f33f9 Pass the to_user to the view. Tests may follow. Closes #1394 2008-12-23 15:08:18 +00:00
Richard Fairhurst
9fa1f4b013 session management on only for :list 2008-12-23 13:09:36 +00:00
Richard Fairhurst
cc90867183 view changesets by user 2008-12-23 13:06:07 +00:00
Richard Fairhurst
2b8bde9055 Potlatch for API 0.6 now saving ways happily with node versioning... I think 2008-12-18 00:32:02 +00:00
Richard Fairhurst
b823e9fccc some more putway fixes - this actually creates new ways with 0.6 Potlatch now 2008-12-17 00:30:29 +00:00
Shaun McDonald
d646530206 Fix UTF-8 encoding error char in source file that RichardF introduced 2008-12-16 16:40:59 +00:00
Richard Fairhurst
ff01f76293 bit more putway stuff 2008-12-16 00:40:04 +00:00
Richard Fairhurst
40647c53df yet more rewriting of putway... 2008-12-16 00:23:11 +00:00
Shaun McDonald
b1445ab023 Fix the transactions, need to set anything that will be returned to nil outside the transaction, otherwise it won't be available after the end of the transaction, when it is returned. 2008-12-15 19:20:24 +00:00
Shaun McDonald
e5674abd2c bug fix. Adding some transactions to amf controller, and adding the missing version to putway method signature. 2008-12-15 18:57:12 +00:00
Shaun McDonald
eb9138813c Return, rather than allow a second render to happen. Closes #1407 2008-12-14 23:16:27 +00:00
Shaun McDonald
721dd9c27d resync from rails_port 11795:12304 2008-12-12 19:29:27 +00:00
Shaun McDonald
fac8b5d28a Log the request on a few requests when there is a bad request, probably should do this in a few more places. This makes it easier to see why we are getting errors/bad requests. 2008-12-12 19:04:28 +00:00
Shaun McDonald
c76e60f052 Improving the not found handling of preferences. adding a user preference test. adding some utility methods to the test helper 2008-12-12 18:54:03 +00:00
Tom Hughes
9b1b6be371 Optimise lookup of traces with a given tag. 2008-12-12 15:17:14 +00:00
Shaun McDonald
541c24b23d capture the too many way nodes error, and give the user an error message 2008-12-12 11:24:40 +00:00
Shaun McDonald
b051dd11af Making amf controller act more like the xml apis 2008-12-11 17:22:15 +00:00
Shaun McDonald
814822120a Don't give an error when you access the login page when you are logged in. Instead take you to the page in the referer or the home page. 2008-12-11 15:05:53 +00:00
Shaun McDonald
8bf0a3197c some more progress towards making amf_controller do version checking of nodes before deleting them 2008-12-11 10:38:36 +00:00
Shaun McDonald
eafcf91ceb some further progress to amf controller checking the version numbers. 2008-12-10 18:07:30 +00:00
Matt Amos
aeaf2d2d20 Added missing version to the pure rails AMF controller. More stringent tests on whichways. 2008-12-10 14:31:07 +00:00
Matt Amos
3ed9ac21b5 Some fixes to the rails part of the AMF controller and associated test. 2008-12-10 13:23:21 +00:00
Shaun McDonald
b7335940e2 Some improvements for the XML parsing, as there are somethings that we don't need, like timestamp and visibility, thus hopefully bringing a speedup in the xml parsing. Some more AMF controller fixes, plenty more to go though. 2008-12-09 18:44:11 +00:00
Shaun McDonald
c0b4c1b905 Adding some amf create poi tests. Minor bugfix tweaks to the amf controller 2008-12-08 14:22:34 +00:00
Shaun McDonald
ec97c63e5c Fix for the refactoring commited yesterday, based on review by Dave Stubbs 2008-12-05 11:08:58 +00:00
Shaun McDonald
e9527b363d Refactoring the amf controller, and all models so that save_with_history! is now private. Everyone should use create_with_history, delete_with_history, and update_from instead. Also gets the amf controller to do version checks in the node/way/relation models. Needs checked. This breaks Potlatch until #1376 is fixed. 2008-12-04 17:30:17 +00:00
Shaun McDonald
d9c6758ee6 turning the session off for the changeset controller, to come in line with the other api controllers 2008-12-04 14:36:21 +00:00
Shaun McDonald
1a7ab3570c Deal with active record not found exceptions when creating message. Some tidying of html. For some reason in rails 2.1.2 having a comment at the end of a line, in the view, means that the closing tag needs to be on the next line. 2008-12-03 12:56:02 +00:00
Shaun McDonald
073c866032 adding link to download the full changeset xml 2008-12-02 18:44:50 +00:00
Shaun McDonald
2ed84e26cd Adding pagination to the changesets, thus allowing you to browe large changesets, without MySQL complaining about memory. Probably needs some fine tuning. You currently can only page one of nodes, ways, and relations, without manually setting the relations. Fixing deprection notice for the classic_pagination plugin. 2008-11-27 17:06:43 +00:00
Matt Amos
1ffb5c1502 Moved changeset consistency checks to library code. 2008-11-26 12:56:42 +00:00
Shaun McDonald
a4e5e8437f Renaming the include action to expand_bbox in the changeset controller. 2008-11-26 11:36:10 +00:00
Shaun McDonald
8348493ccb Some improvements to the error messages that are returned by the api. 2008-11-25 18:59:35 +00:00
Richard Fairhurst
ecefee485b various fixes/enhancements, including a couple to the 0.5 version 2008-11-25 00:15:30 +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
Shaun McDonald
e2c0e51e45 Closes #1350 through updating amf_controller to use the newer closed_at method of determining whether a changeset is closed. Richard please check the rest of the amf controller for more things that may reference the open field that is no longer available. Use is_open? to determine if a changeset is open. Fix indentation in amf controller. Fix minor bug in the links to changesets in the data brower. 2008-11-20 21:23:44 +00:00
Shaun McDonald
55d511bf21 Remember whether the user set the public checkbox on GPX upload as a user preference. Closes #827 2008-11-18 20:22:09 +00:00
Tom Hughes
990dcedc4c Require the user to be logged in for those methods which make no
sense otherwise.
2008-11-18 17:23:40 +00:00
Tom Hughes
f77ce935a4 Fix syntax of status only renders. Closes #1345. 2008-11-18 17:19:37 +00:00