Commit graph

42 commits

Author SHA1 Message Date
Tom MacWright
221ca3c1fa Improve user page navigation menu
Add counts to edits, blocks, and traces; don't show blocks if there
are none; and move OAuth to the settings page.
2012-08-10 08:26:48 +01:00
Peter Gray
95d899786a Refactor bounding box code
Moved duplicated code into the BoundingBox class, and pass around
BoundingBox objects instead of lists of bounds.
2011-11-14 09:42:57 +00:00
Tom Hughes
036632bad3 Avoid noise on console when running tests 2011-11-14 09:42:53 +00:00
Tom Hughes
fc25c3d412 Rename all ID columns that aren't unique
Having a table with a column called ID that is only part of the
primary key really doesn't work as rails likes to treat ID as a
special name so it becomes impossible to assign to it or read it.
2011-11-14 09:42:52 +00:00
Tom Hughes
0dba53c023 Declare callbacks explicitly 2011-11-14 09:42:43 +00:00
Matt Amos
cb4f1e62a0 Don't compare changeset bbox coordinates when they may be nil
The code assumed that the changeset bounding box would only be
updated with a valid bounding box, but this isn't the case when
dealing with certain corner cases, including when removing
deleted members from relations.
2011-07-06 08:50:08 +01:00
Tom Hughes
9deeae3f96 Remove validates_associated_of calls which target the user model as
we have a number of users with minor validation failures.
2010-02-25 21:50:09 +00:00
Shaun McDonald
094855be22 Actually the changeset doesn't need an id attribute in the xml. It is simply fetched as a parameter in the url. Thanks for pointing it out Frederik. We really need more tests so that things like this are thought about more before committing potentially significant changes. 2009-12-15 23:53:19 +00:00
Shaun McDonald
43a28065b1 Change the way that the changeset parsing is done, so that it is in line with the nodes/ways/relations and gives much nicer error messages. Adding some tests too to back up those changes. 2009-12-06 02:13:30 +00:00
Tom Hughes
0f6dda6050 Qualify SCALE properly - apparently object visibility when running the
test suite is not the same as when running live... Rails FAIL!
2009-08-16 10:36:16 +00:00
Matt Amos
d0e47d30e4 Fixes bug #2152 by preventing over-expansion of bboxes beyond the world range. 2009-08-16 00:19:18 +00:00
Harry Wood
3415aa4689 label changesets as (big) based on their bbox area 2009-05-15 16:24:55 +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
Shaun McDonald
5bc558e355 Should have a .new when raising error 2009-04-14 12:00:26 +00:00
Thomas Wood
c64ebb9139 Add has_valid_bbox? method to Changeset model to tidy checking for bbox, and fix edge case where no bbox would cause changeset browsing to die. 2009-04-09 11:18:31 +00:00
Matt Amos
afcb345014 Moved a bunch of time functions into UTC. Fixes bugs which we only see for 4 hours a year. 2009-03-29 01:31:04 +00:00
Tom Hughes
c8ee135104 Merge 12304:14009 from trunk. 2009-03-08 13:02:37 +00:00
Matt Amos
76708eefcf Fixed bug in changeset closing and querying where the number of elements exceeded the maximum. Added a fixture for this. 2009-02-07 17:45:27 +00:00
Matt Amos
d6a1ccf6b4 removed comments which apparently no-one bothers to read anyway. since no-one reads the comments, changed changeset model to use Time instead of DateTime. will probably have to change it back later, when someone else who doesn't read comments comes along. 2008-12-23 15:59:56 +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
Shaun McDonald
59c69a642f the user id may be negative, so that osmosis can create changesets for users that are anonymous, which it uses a negative id for, as a special id. 2008-12-08 15:32:29 +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
bbbf256986 Actually set the instance var when closing the changeset 2008-12-01 18:47:03 +00:00
Shaun McDonald
1375095343 More model validations. Fixing one test. 2008-11-25 17:23:47 +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
Matt Amos
a90be5e69a Migration to add close-time to changesets. This replaces the boolean 'open' attribute. Added checks to ensure that the maximum lifetime and number of changes in a changeset are enforced. Added some tests. 2008-11-17 19:00:01 +00:00
Matt Amos
98b15bef45 Implemented changeset tags updating via the update method. 2008-11-17 11:45:50 +00:00
Frederik Ramm
81ca9cfabf return user id AND name with changeset get request 2008-11-09 16:12:23 +00:00
Frederik Ramm
c02c516047 fix SCALE, make changeset GET use floats 2008-11-09 15:52:10 +00:00
Matt Amos
02fbcf5f06 Added first attempt at bounding box support in changesets and tests for the same. 2008-11-04 15:52:22 +00:00
Matt Amos
a8eb3a6ada Removed debugging code. 2008-10-21 09:31:36 +00:00
Shaun McDonald
2c16177174 adding changeset stuff for the data browser 2008-10-13 20:48:58 +00:00
Shaun McDonald
1d4a957c79 fix so that changeset will be closed without an exception due to double validation 2008-10-13 16:11:57 +00:00
Shaun McDonald
233a97bfcb fix indentation. Get teh api version from the constant, rather than hard coding it. Using right save method, so that exception is thrown. Some comment questions. 2008-10-10 18:24:07 +00:00
Shaun McDonald
e1b205913c Fix the data config, so that the development database is not the same as the test database. Make a good stab at getting the creates and updates for relations working, adding some new error exceptions. Some code indentation cleanup. 2008-10-08 15:42:42 +00:00
Shaun McDonald
2347761266 some useful notes in code for ideas that require implementing. 2008-10-07 23:49:53 +00:00
Shaun McDonald
40414cf324 changing the belongs_to and has_many items in the models to reflect the new foriegn keys in the db and the fact that a (old)node/way/relation now belong to a changeset, which in turn has a user. 2008-09-30 18:21:56 +00:00
Christopher Schmidt
604f9ddd46 spit out whether the changeset is open in the xml 2008-05-11 22:26:11 +00:00
Christopher Schmidt
9cbc370a7e add FIXME FIXME FIXME for serializing changes in a changeset 2008-05-11 20:07:47 +00:00
Christopher Schmidt
e48cbc6a5f Add support for accessing changesets as XML through the API via the
changeset controller "read" method
2008-05-11 20:03:17 +00:00
Frederik Ramm
8c5638d696 initial changeset support 2008-05-04 10:41:42 +00:00