From: Tom Hughes Date: Wed, 16 Jun 2010 20:18:44 +0000 (+0100) Subject: Merge branch 'master' into openid X-Git-Tag: live~7389 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/6a3cadb52d010b333a4acea8942bc4c13394e236?hp=dc35b597a2210d77e3d3e6996138dfdeb3add4a3 Merge branch 'master' into openid --- diff --git a/app/controllers/diary_entry_controller.rb b/app/controllers/diary_entry_controller.rb index 52ce742bf..320f3d029 100644 --- a/app/controllers/diary_entry_controller.rb +++ b/app/controllers/diary_entry_controller.rb @@ -10,7 +10,7 @@ class DiaryEntryController < ApplicationController caches_action :list, :view, :layout => false caches_action :rss, :layout => true - cache_sweeper :diary_sweeper, :only => [:new, :edit, :comment, :hide, :hidecomment] + cache_sweeper :diary_sweeper, :only => [:new, :edit, :comment, :hide, :hidecomment], :unless => OSM_STATUS == :database_offline def new @title = t 'diary_entry.new.title' diff --git a/app/controllers/trace_controller.rb b/app/controllers/trace_controller.rb index f8ce29aba..c51f54c5e 100644 --- a/app/controllers/trace_controller.rb +++ b/app/controllers/trace_controller.rb @@ -18,8 +18,8 @@ class TraceController < ApplicationController caches_action :list, :unless => :logged_in?, :layout => false caches_action :view, :layout => false caches_action :georss, :layout => true - cache_sweeper :trace_sweeper, :only => [:create, :edit, :delete, :api_create] - cache_sweeper :tracetag_sweeper, :only => [:create, :edit, :delete, :api_create] + cache_sweeper :trace_sweeper, :only => [:create, :edit, :delete, :api_create], :unless => OSM_STATUS == :database_offline + cache_sweeper :tracetag_sweeper, :only => [:create, :edit, :delete, :api_create], :unless => OSM_STATUS == :database_offline # Counts and selects pages of GPX traces for various criteria (by user, tags, public etc.). # target_user - if set, specifies the user to fetch traces for. if not set will fetch all traces diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 57881881a..aae059252 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -16,7 +16,7 @@ class UserController < ApplicationController filter_parameter_logging :password, :pass_crypt, :pass_crypt_confirmation - cache_sweeper :user_sweeper, :only => [:account, :set_status, :delete] + cache_sweeper :user_sweeper, :only => [:account, :set_status, :delete], :unless => OSM_STATUS == :database_offline def terms @title = t 'user.new.title' diff --git a/app/helpers/browse_helper.rb b/app/helpers/browse_helper.rb index f121f2f0b..090d1e9c3 100644 --- a/app/helpers/browse_helper.rb +++ b/app/helpers/browse_helper.rb @@ -17,7 +17,7 @@ module BrowseHelper end def link_class(type, object) - return type + " " + h(icon_tags(object).join(' ')) + return type + " " + h(icon_tags(object).join(' ')) + (object.visible == false ? ' deleted' : '') end def link_title(object) @@ -45,7 +45,7 @@ module BrowseHelper private ICON_TAGS = [ - "aeroway", "amenity", "barrier", "building", "highway", "landuse", + "aeroway", "amenity", "barrier", "building", "highway", "historic", "landuse", "leisure", "man_made", "natural", "railway", "shop", "tourism", "waterway" ] diff --git a/app/views/layouts/site.html.erb b/app/views/layouts/site.html.erb index c17255709..cecf5acc2 100644 --- a/app/views/layouts/site.html.erb +++ b/app/views/layouts/site.html.erb @@ -123,6 +123,10 @@ <%= yield :left_menu %> +
+ <%= link_to image_tag("sotm.png", :alt => t('layouts.sotm2010'), :title => t('layouts.sotm2010'), :border => "0"), "http://www.stateofthemap.org/register/" %> +
+ <%= yield :optionals %>
diff --git a/config/environment.rb b/config/environment.rb index 0a67be745..de5852fc4 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -44,6 +44,7 @@ Rails::Initializer.run do |config| # To use Rails without a database, you must remove the Active Record framework if OSM_STATUS == :database_offline config.frameworks -= [ :active_record ] + config.eager_load_paths = [] end # Specify gems that this application depends on. @@ -51,7 +52,9 @@ Rails::Initializer.run do |config| # config.gem "bj" # config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net" # config.gem "aws-s3", :lib => "aws/s3" - config.gem 'composite_primary_keys', :version => '2.2.2' + unless OSM_STATUS == :database_offline + config.gem 'composite_primary_keys', :version => '2.2.2' + end config.gem 'libxml-ruby', :version => '>= 1.1.1', :lib => 'libxml' config.gem 'rmagick', :lib => 'RMagick' config.gem 'oauth', :version => '>= 0.3.6' @@ -86,7 +89,9 @@ Rails::Initializer.run do |config| # Use the database for sessions instead of the cookie-based default, # which shouldn't be used to store highly confidential information # (create the session table with 'rake db:sessions:create') - config.action_controller.session_store = :sql_session_store + unless OSM_STATUS == :database_offline + config.action_controller.session_store = :sql_session_store + end # Use SQL instead of Active Record's schema dumper when creating the test database. # This is necessary if your schema can't be completely dumped by the schema dumper, diff --git a/config/initializers/abstract_adapter.rb b/config/initializers/abstract_adapter.rb index 5cc24d25c..d96742ee5 100644 --- a/config/initializers/abstract_adapter.rb +++ b/config/initializers/abstract_adapter.rb @@ -1,24 +1,26 @@ -module ActiveRecord - module ConnectionAdapters - class AbstractAdapter - protected - alias_method :old_log, :log - - def log(sql, name) - if block_given? - old_log(sql, name) do - yield +if defined?(ActiveRecord::ConnectionAdaptors::AbstractAdaptor) + module ActiveRecord + module ConnectionAdapters + class AbstractAdapter + protected + alias_method :old_log, :log + + def log(sql, name) + if block_given? + old_log(sql, name) do + yield + end + else + old_log(sql, name) + end + rescue ActiveRecord::StatementInvalid => ex + if ex.message =~ /^OSM::APITimeoutError: / + raise OSM::APITimeoutError.new + elsif ex.message =~ /^Timeout::Error: / + raise Timeout::Error.new("time's up!") + else + raise end - else - old_log(sql, name) - end - rescue ActiveRecord::StatementInvalid => ex - if ex.message =~ /^OSM::APITimeoutError: / - raise OSM::APITimeoutError.new - elsif ex.message =~ /^Timeout::Error: / - raise Timeout::Error.new("time's up!") - else - raise end end end diff --git a/config/initializers/postgresql_adapter.rb b/config/initializers/postgresql_adapter.rb new file mode 100644 index 000000000..d8f84959c --- /dev/null +++ b/config/initializers/postgresql_adapter.rb @@ -0,0 +1,57 @@ +if defined?(ActiveRecord::ConnectionAdaptors::PostgreSQLAdaptor) + module ActiveRecord + module ConnectionAdapters + class PostgreSQLAdapter + def pk_and_sequence_for(table) + # First try looking for a sequence with a dependency on the + # given table's primary key. + result = query(<<-end_sql, 'PK and serial sequence')[0] + SELECT attr.attname, seq.relname + FROM pg_class seq, + pg_attribute attr, + pg_depend dep, + pg_namespace name, + pg_constraint cons + WHERE seq.oid = dep.objid + AND seq.relkind = 'S' + AND attr.attrelid = dep.refobjid + AND attr.attnum = dep.refobjsubid + AND attr.attrelid = cons.conrelid + AND attr.attnum = cons.conkey[1] + AND cons.contype = 'p' + AND dep.classid = '"pg_class"'::regclass + AND dep.refclassid = '"pg_class"'::regclass + AND dep.refobjid = '#{quote_table_name(table)}'::regclass + end_sql + + if result.nil? or result.empty? + # If that fails, try parsing the primary key's default value. + # Support the 7.x and 8.0 nextval('foo'::text) as well as + # the 8.1+ nextval('foo'::regclass). + result = query(<<-end_sql, 'PK and custom sequence')[0] + SELECT attr.attname, + CASE + WHEN split_part(def.adsrc, '''', 2) ~ '.' THEN + substr(split_part(def.adsrc, '''', 2), + strpos(split_part(def.adsrc, '''', 2), '.')+1) + ELSE split_part(def.adsrc, '''', 2) + END + FROM pg_class t + JOIN pg_attribute attr ON (t.oid = attrelid) + JOIN pg_attrdef def ON (adrelid = attrelid AND adnum = attnum) + JOIN pg_constraint cons ON (conrelid = adrelid AND adnum = conkey[1]) + WHERE t.oid = '#{quote_table_name(table)}'::regclass + AND cons.contype = 'p' + AND def.adsrc ~* 'nextval' + end_sql + end + + # [primary_key, sequence] + [result.first, result.last] + rescue + nil + end + end + end + end +end diff --git a/config/initializers/query_cache.rb b/config/initializers/query_cache.rb index 83d42feec..61a618bca 100644 --- a/config/initializers/query_cache.rb +++ b/config/initializers/query_cache.rb @@ -1,10 +1,12 @@ -module ActiveRecord - module ConnectionAdapters - module QueryCache - private - def cache_sql(sql) - yield - end +if defined?(ActiveRecord::ConnectionAdaptors::QueryCache) + module ActiveRecord + module ConnectionAdapters + module QueryCache + private + def cache_sql(sql) + yield + end + end end end end diff --git a/config/initializers/sql_session_store.rb b/config/initializers/sql_session_store.rb index 986037afe..2b9543fc2 100644 --- a/config/initializers/sql_session_store.rb +++ b/config/initializers/sql_session_store.rb @@ -4,4 +4,6 @@ adapter = Rails.configuration.database_configuration[environment]["adapter"] session_class = adapter + "_session" # Configure SqlSessionStore -SqlSessionStore.session_class = session_class.camelize.constantize +unless OSM_STATUS == :database_offline + SqlSessionStore.session_class = session_class.camelize.constantize +end diff --git a/config/locales/en.yml b/config/locales/en.yml index 5b6924f5c..832610d60 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -933,7 +933,7 @@ en: shop: Shop shop_tooltip: Shop with branded OpenStreetMap merchandise shop_url: http://wiki.openstreetmap.org/wiki/Merchandise - sotm: 'Come to the 2009 OpenStreetMap Conference, The State of the Map, July 10-12 in Amsterdam!' + sotm2010: 'Come to the 2010 OpenStreetMap Conference, The State of the Map, July 9-11 in Girona!' license: alt: CC by-sa 2.0 title: OpenStreetMap data is licensed under the Creative Commons Attribution-Share Alike 2.0 Generic License diff --git a/public/images/browse/education_nursery.p.16.png b/public/images/browse/education_nursery.p.16.png new file mode 100644 index 000000000..63651ef87 Binary files /dev/null and b/public/images/browse/education_nursery.p.16.png differ diff --git a/public/images/browse/education_school.p.16.png b/public/images/browse/education_school.p.16.png new file mode 100644 index 000000000..95744bf6c Binary files /dev/null and b/public/images/browse/education_school.p.16.png differ diff --git a/public/images/browse/education_university.p.16.png b/public/images/browse/education_university.p.16.png new file mode 100644 index 000000000..57c92c39e Binary files /dev/null and b/public/images/browse/education_university.p.16.png differ diff --git a/public/images/browse/health_dentist.p.16.png b/public/images/browse/health_dentist.p.16.png new file mode 100644 index 000000000..e3219f792 Binary files /dev/null and b/public/images/browse/health_dentist.p.16.png differ diff --git a/public/images/browse/health_doctors.p.16.png b/public/images/browse/health_doctors.p.16.png new file mode 100644 index 000000000..9cdc46914 Binary files /dev/null and b/public/images/browse/health_doctors.p.16.png differ diff --git a/public/images/browse/health_opticians.p.16.png b/public/images/browse/health_opticians.p.16.png new file mode 100644 index 000000000..d89ff568f Binary files /dev/null and b/public/images/browse/health_opticians.p.16.png differ diff --git a/public/images/browse/health_veterinary.p.16.png b/public/images/browse/health_veterinary.p.16.png new file mode 100644 index 000000000..dd8ee1699 Binary files /dev/null and b/public/images/browse/health_veterinary.p.16.png differ diff --git a/public/images/browse/place_of_worship_unknown3.p.16.png b/public/images/browse/place_of_worship_unknown3.p.16.png new file mode 100644 index 000000000..08b832963 Binary files /dev/null and b/public/images/browse/place_of_worship_unknown3.p.16.png differ diff --git a/public/images/browse/rental_bicycle.p.20.png b/public/images/browse/rental_bicycle.p.20.png deleted file mode 100644 index 4bb10e00a..000000000 Binary files a/public/images/browse/rental_bicycle.p.20.png and /dev/null differ diff --git a/public/images/browse/service.20.png b/public/images/browse/service.20.png new file mode 100644 index 000000000..b28d744dd Binary files /dev/null and b/public/images/browse/service.20.png differ diff --git a/public/images/browse/shop_bicycle.p.16.png b/public/images/browse/shop_bicycle.p.16.png new file mode 100644 index 000000000..d0b3680f0 Binary files /dev/null and b/public/images/browse/shop_bicycle.p.16.png differ diff --git a/public/images/browse/shop_books.p.16.png b/public/images/browse/shop_books.p.16.png new file mode 100644 index 000000000..dc241d202 Binary files /dev/null and b/public/images/browse/shop_books.p.16.png differ diff --git a/public/images/browse/shop_butcher.p.16.png b/public/images/browse/shop_butcher.p.16.png new file mode 100644 index 000000000..8ff574093 Binary files /dev/null and b/public/images/browse/shop_butcher.p.16.png differ diff --git a/public/images/browse/shop_estateagent2.p.16.png b/public/images/browse/shop_estateagent2.p.16.png new file mode 100644 index 000000000..fc2cecff5 Binary files /dev/null and b/public/images/browse/shop_estateagent2.p.16.png differ diff --git a/public/images/browse/shop_fish.p.16.png b/public/images/browse/shop_fish.p.16.png new file mode 100644 index 000000000..7e0eabbbd Binary files /dev/null and b/public/images/browse/shop_fish.p.16.png differ diff --git a/public/images/browse/shop_garden_centre.p.16.png b/public/images/browse/shop_garden_centre.p.16.png new file mode 100644 index 000000000..ca07d4302 Binary files /dev/null and b/public/images/browse/shop_garden_centre.p.16.png differ diff --git a/public/images/browse/shop_gift.p.16.png b/public/images/browse/shop_gift.p.16.png new file mode 100644 index 000000000..ac084f5fa Binary files /dev/null and b/public/images/browse/shop_gift.p.16.png differ diff --git a/public/images/browse/shop_greengrocer.p.16.png b/public/images/browse/shop_greengrocer.p.16.png new file mode 100644 index 000000000..abb2c5231 Binary files /dev/null and b/public/images/browse/shop_greengrocer.p.16.png differ diff --git a/public/images/browse/shop_jewelry.p.16.png b/public/images/browse/shop_jewelry.p.16.png new file mode 100644 index 000000000..bb9825596 Binary files /dev/null and b/public/images/browse/shop_jewelry.p.16.png differ diff --git a/public/images/browse/tourist_castle.p.16.png b/public/images/browse/tourist_castle.p.16.png new file mode 100644 index 000000000..477166750 Binary files /dev/null and b/public/images/browse/tourist_castle.p.16.png differ diff --git a/public/images/browse/tourist_memorial.p.16.png b/public/images/browse/tourist_memorial.p.16.png new file mode 100644 index 000000000..0db93d729 Binary files /dev/null and b/public/images/browse/tourist_memorial.p.16.png differ diff --git a/public/images/browse/tourist_monument.p.16.png b/public/images/browse/tourist_monument.p.16.png new file mode 100644 index 000000000..5c468aa19 Binary files /dev/null and b/public/images/browse/tourist_monument.p.16.png differ diff --git a/public/images/browse/tourist_picnic.p.16.png b/public/images/browse/tourist_picnic.p.16.png new file mode 100644 index 000000000..0eff097bf Binary files /dev/null and b/public/images/browse/tourist_picnic.p.16.png differ diff --git a/public/images/browse/tourist_ruin.p.16.png b/public/images/browse/tourist_ruin.p.16.png new file mode 100644 index 000000000..804672ec6 Binary files /dev/null and b/public/images/browse/tourist_ruin.p.16.png differ diff --git a/public/images/browse/tourist_windmill.p.16.png b/public/images/browse/tourist_windmill.p.16.png new file mode 100644 index 000000000..9ec568cc6 Binary files /dev/null and b/public/images/browse/tourist_windmill.p.16.png differ diff --git a/public/images/browse/tourist_wreck.p.16.png b/public/images/browse/tourist_wreck.p.16.png new file mode 100644 index 000000000..eb190e207 Binary files /dev/null and b/public/images/browse/tourist_wreck.p.16.png differ diff --git a/public/images/browse/transport_parking_bicycle.p.16.png b/public/images/browse/transport_parking_bicycle.p.16.png new file mode 100644 index 000000000..ff988ba55 Binary files /dev/null and b/public/images/browse/transport_parking_bicycle.p.16.png differ diff --git a/public/images/browse/transport_rental_bicycle.p.16.png b/public/images/browse/transport_rental_bicycle.p.16.png new file mode 100644 index 000000000..edf986c1e Binary files /dev/null and b/public/images/browse/transport_rental_bicycle.p.16.png differ diff --git a/public/images/browse/transport_rental_car.p.16.png b/public/images/browse/transport_rental_car.p.16.png new file mode 100644 index 000000000..b5fc399c8 Binary files /dev/null and b/public/images/browse/transport_rental_car.p.16.png differ diff --git a/public/images/sotm.png b/public/images/sotm.png new file mode 100644 index 000000000..af2d049bc Binary files /dev/null and b/public/images/sotm.png differ diff --git a/public/stylesheets/browse.css b/public/stylesheets/browse.css index 2ca44bcd1..68bef6cc5 100644 --- a/public/stylesheets/browse.css +++ b/public/stylesheets/browse.css @@ -1,27 +1,34 @@ .node { padding-left: 25px; } .way { padding-left: 25px; } -/* Nodes */ +.deleted { text-decoration: line-through; } + +/* Nodes (and ways as areas) */ .aeroway.aerodrome { background: url(/images/browse/aerodrome.p.16.png) no-repeat center left; } .amenity.atm { background: url(/images/browse/atm2.p.16.png) no-repeat center left; } .amenity.bank { background: url(/images/browse/bank2.p.16.png) no-repeat center left; } .amenity.bar { background: url(/images/browse/bar.p.16.png) no-repeat center left; } -.amenity.bicycle_rental { background: url(/images/browse/rental_bicycle.p.20.png) no-repeat center left; } +.amenity.bicycle_parking { background: url(/images/browse/transport_parking_bicycle.p.16.png) no-repeat center left; } +.amenity.bicycle_rental { background: url(/images/browse/transport_rental_bicycle.p.16.png) no-repeat center left; } .amenity.bus_station { background: url(/images/browse/bus_station.n.16.png) no-repeat center left; } .amenity.cafe { background: url(/images/browse/cafe.p.16.png) no-repeat center left; } +.amenity.car_rental { background: url(/images/browse/transport_rental_car.p.16.png) no-repeat center left; } .amenity.car_sharing { background: url(/images/browse/car_share.p.16.png) no-repeat center left; } .amenity.cinema { background: url(/images/browse/cinema.p.16.png) no-repeat center left; } +.amenity.dentist { background: url(/images/browse/health_dentist.p.16.png) no-repeat center left; } +.amenity.doctors { background: url(/images/browse/health_doctors.p.16.png) no-repeat center left; } .amenity.drinking_water { background: url(/images/browse/drinkingtap.p.16.png) no-repeat center left; } .amenity.fast_food { background: url(/images/browse/fast_food.p.16.png) no-repeat center left; } .amenity.fire_station { background: url(/images/browse/firestation.p.16.png) no-repeat center left; } .amenity.fuel { background: url(/images/browse/fuel.p.16.png) no-repeat center left; } .amenity.hospital { background: url(/images/browse/hospital.p.16.png) no-repeat center left; } .amenity.library { background: url(/images/browse/library.p.16.png) no-repeat center left; } +.amenity.nursery { background: url(/images/browse/education_nursery.p.16.png) no-repeat center left; } .amenity.parking { background: url(/images/browse/parking.p.16.png) no-repeat center left; } .amenity.pharmacy { background: url(/images/browse/pharmacy.p.16.png) no-repeat center left; } -.amenity.place_of_worship { background: url(/images/browse/place_of_worship.png) no-repeat center left; } +.amenity.place_of_worship { background: url(/images/browse/place_of_worship_unknown3.p.16.png) no-repeat center left; } .amenity.police { background: url(/images/browse/police.p.16.png) no-repeat center left; } .amenity.post_box { background: url(/images/browse/post_box.p.16.png) no-repeat center left; } .amenity.post_office { background: url(/images/browse/post_office.p.16.png) no-repeat center left; } @@ -29,10 +36,13 @@ .amenity.pub { background: url(/images/browse/pub.p.16.png) no-repeat center left; } .amenity.restaurant { background: url(/images/browse/restaurant.p.16.png) no-repeat center left; } .amenity.recycling { background: url(/images/browse/recycling.p.16.png) no-repeat center left; } +.amenity.school { background: url(/images/browse/education_school.p.16.png) no-repeat center left; } .amenity.shelter { background: url(/images/browse/shelter2.p.16.png) no-repeat center left; } .amenity.telephone { background: url(/images/browse/telephone.p.16.png) no-repeat center left; } .amenity.theatre { background: url(/images/browse/theatre.p.16.png) no-repeat center left; } .amenity.toilets { background: url(/images/browse/toilets.p.16.png) no-repeat center left; } +.amenity.university { background: url(/images/browse/education_university.p.16.png) no-repeat center left; } +.amenity.veterinary { background: url(/images/browse/health_veterinary.p.16.png) no-repeat center left; } .barrier.gate { background: url(/images/browse/gate2.p.16.png) no-repeat center left; } @@ -41,7 +51,14 @@ .highway.traffic_signals { background: url(/images/browse/traffic_light.png) no-repeat center left; } .highway.turning_circle { background: url(/images/browse/turning_circle.p.16.png) no-repeat center left; } +.historic.castle { background: url(/images/browse/tourist_castle.p.16.png) no-repeat center left; } +.historic.memorial { background: url(/images/browse/tourist_memorial.p.16.png) no-repeat center left; } +.historic.monument { background: url(/images/browse/tourist_monument.p.16.png) no-repeat center left; } +.historic.ruins { background: url(/images/browse/tourist_ruins.p.16.png) no-repeat center left; } +.historic.wreck { background: url(/images/browse/tourist_wreck.p.16.png) no-repeat center left; } + .man_made.lighthouse { background: url(/images/browse/lighthouse.p.16.png) no-repeat center left; } +.man_made.windmill { background: url(/images/browse/tourist_windmill.p.16.png) no-repeat center left; } .natural.tree { background: url(/images/browse/tree.p.16.png) no-repeat center left; } @@ -51,10 +68,19 @@ .shop { background: url(/images/browse/shop_convenience.p.16.png) no-repeat center left; } .shop.bakery { background: url(/images/browse/shop_bakery.p.16.png) no-repeat center left; } +.shop.bicycle { background: url(/images/browse/shop_bicycle.p.16.png) no-repeat center left; } +.shop.books { background: url(/images/browse/shop_books.p.16.png) no-repeat center left; } +.shop.butcher { background: url(/images/browse/shop_butcher.p.16.png) no-repeat center left; } .shop.clothes { background: url(/images/browse/shop_clothes.p.16.png) no-repeat center left; } .shop.convenience { background: url(/images/browse/shop_convenience.p.16.png) no-repeat center left; } .shop.diy { background: url(/images/browse/shop_diy.p.16.png) no-repeat center left; } +.shop.estate_agent { background: url(/images/browse/shop_estateagent2.p.16.png) no-repeat center left; } +.shop.fish { background: url(/images/browse/shop_fish.p.16.png) no-repeat center left; } +.shop.garden_centre { background: url(/images/browse/shop_garden_centre.p.16.png) no-repeat center left; } +.shop.gift { background: url(/images/browse/shop_gift.p.16.png) no-repeat center left; } +.shop.greengrocer { background: url(/images/browse/shop_greengrocer.p.16.png) no-repeat center left; } .shop.hairdresser { background: url(/images/browse/shop_hairdresser.p.16.png) no-repeat center left; } +.shop.jewelry { background: url(/images/browse/shop_jewelry.p.16.png) no-repeat center left; } .shop.supermarket { background: url(/images/browse/shop_supermarket.p.16.png) no-repeat center left; } .tourism.alpine_hut { background: url(/images/browse/alpinehut.p.16.png) no-repeat center left; } @@ -63,6 +89,7 @@ .tourism.hostel { background: url(/images/browse/hostel.p.16.png) no-repeat center left; } .tourism.hotel { background: url(/images/browse/hotel.p.16.png) no-repeat center left; } .tourism.museum { background: url(/images/browse/museum.p.16.png) no-repeat center left; } +.tourism.picnic_site { background: url(/images/browse/tourist_picnic.p.16.png) no-repeat center left; } .tourism.viewpoint { background: url(/images/browse/view_point.p.16.png) no-repeat center left; } /* Ways */ @@ -77,10 +104,15 @@ .highway.cycleway { background: url(/images/browse/cycleway.20.png) no-repeat center left; } .highway.footway { background: url(/images/browse/footway.20.png) no-repeat center left; } .highway.motorway { background: url(/images/browse/motorway.20.png) no-repeat center left; } +.highway.motorway_link { background: url(/images/browse/motorway.20.png) no-repeat center left; } +.highway.pedestrian { background: url(/images/browse/service.20.png) no-repeat center left; } .highway.primary { background: url(/images/browse/primary.20.png) no-repeat center left; } +.highway.primary_link { background: url(/images/browse/primary.20.png) no-repeat center left; } .highway.residential { background: url(/images/browse/unclassified.20.png) no-repeat center left; } .highway.secondary { background: url(/images/browse/secondary.20.png) no-repeat center left; } +.highway.service { background: url(/images/browse/service.20.png) no-repeat center left; } .highway.trunk { background: url(/images/browse/trunk.20.png) no-repeat center left; } +.highway.trunk_link { background: url(/images/browse/trunk.20.png) no-repeat center left; } .highway.unclassified { background: url(/images/browse/unclassified.20.png) no-repeat center left; } .landuse.brownfield { background: url(/images/browse/brownfield.png) no-repeat center left; } diff --git a/vendor/plugins/deadlock_retry/init.rb b/vendor/plugins/deadlock_retry/init.rb index e090f68af..2d7c5f36e 100644 --- a/vendor/plugins/deadlock_retry/init.rb +++ b/vendor/plugins/deadlock_retry/init.rb @@ -1,2 +1,5 @@ require 'deadlock_retry' -ActiveRecord::Base.send :include, DeadlockRetry + +if defined?(ActiveRecord::Base) + ActiveRecord::Base.send :include, DeadlockRetry +end diff --git a/vendor/plugins/file_column/init.rb b/vendor/plugins/file_column/init.rb index d31ef1b9c..0610d486c 100644 --- a/vendor/plugins/file_column/init.rb +++ b/vendor/plugins/file_column/init.rb @@ -8,6 +8,11 @@ require 'file_column_helper' require 'validations' require 'test_case' -ActiveRecord::Base.send(:include, FileColumn) -ActionView::Base.send(:include, FileColumnHelper) -ActiveRecord::Base.send(:include, FileColumn::Validations) \ No newline at end of file +if defined?(ActiveRecord::Base) + ActiveRecord::Base.send(:include, FileColumn) + ActiveRecord::Base.send(:include, FileColumn::Validations) +end + +if defined?(ActionView::Base) + ActionView::Base.send(:include, FileColumnHelper) +end diff --git a/vendor/plugins/validates_email_format_of/rails/init.rb b/vendor/plugins/validates_email_format_of/rails/init.rb index bdc8b5794..bf0e94370 100644 --- a/vendor/plugins/validates_email_format_of/rails/init.rb +++ b/vendor/plugins/validates_email_format_of/rails/init.rb @@ -1 +1,3 @@ -require 'validates_email_format_of' +if defined?(ActiveRecord::Base) + require 'validates_email_format_of' +end