refinerycms-core 0.9.9.15 → 0.9.9.16

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,7 +6,11 @@ class SitemapController < ::Refinery::FastController
6
6
 
7
7
  respond_to do |format|
8
8
  format.xml do
9
- @pages = Page.live.includes(:parts)
9
+ @locales = if defined?(::Refinery::I18n) && ::Refinery::I18n.enabled?
10
+ ::Refinery::I18n.frontend_locales
11
+ else
12
+ [::I18n.locale]
13
+ end
10
14
  end
11
15
  end
12
16
  end
@@ -4,8 +4,8 @@
4
4
  hide_children = RefinerySetting.find_or_set(:menu_hide_children, false) if hide_children.nil?
5
5
  # Select top menu items unless 'roots' is supplied.
6
6
  collection ||= @menu_pages
7
- caching = ((defined?(cache_menu) && cache_menu) || RefinerySetting.find_or_set(:cache_menu, false)) && File.writable?(Rails.cache.cache_path)
8
- cache_if(caching && !user_signed_in?, [Refinery.base_cache_key, "pages_menus", dom_id, Globalize.locale, request.path].join('_')) do
7
+ caching = (cache_menu ||= RefinerySetting.find_or_set(:cache_menu, false))
8
+ cache_if(caching, [Refinery.base_cache_key, "pages_menus", dom_id, Globalize.locale, cache_path ||= request.path].join('_')) do
9
9
  if (roots ||= collection.select{|p| p.parent_id.nil?}).present?
10
10
  # In order to match items that aren't shown in menu and highlight their associations.
11
11
  # This can be supplied if the logic is different in your case.
@@ -7,7 +7,7 @@
7
7
  :update_resource => "current_resource_#{field}",
8
8
  :update_text => "current_resource_text_#{field}",
9
9
  :callback => "resource_changed_#{field}",
10
- :field => [f.object_name, field].join('_'),
10
+ :field => [f.object_name.gsub(/\]\[|[^-a-zA-Z0-9:.]/, "_").sub(/_$/, ""), field].join('_'),
11
11
  :current_link => "#{resource.url if resource.present?}",
12
12
  :height => 480
13
13
  })
@@ -45,7 +45,7 @@
45
45
  $('#no_resource_selected_<%= field %>').hide();
46
46
  $('iframe#dialog_iframe').dialog("close");
47
47
  $('iframe#dialog_iframe').remove().parents(".ui-dialog").remove();
48
- $('#<%= f.object_name %>_<%= field %>').val(callback_args.id);
48
+ $('#<%= f.object_name.gsub(/\]\[|[^-a-zA-Z0-9:.]/, "_").sub(/_$/, "") %>_<%= field %>').val(callback_args.id);
49
49
  $('#current_resource_link_<%= field %>').attr('href', $('#current_resource_link_<%= field %>').attr('href').replace(/current_link=([^&])*&/, "current_link=" + callback_args.href + "&"));
50
50
  $("#current_resource_<%= field %>").attr('href', callback_args.href);
51
51
  $('#current_resource_text_<%= field %>').html(callback_args.html);
data/lib/gemspec.rb CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
26
26
  s.add_dependency 'friendly_id_globalize3', '~> 3.2.1'
27
27
  s.add_dependency 'globalize3', '>= 0.1.0.beta'
28
28
  s.add_dependency 'moretea-awesome_nested_set', '~> 1.4'
29
- s.add_dependency 'rails', '~> 3.0.5'
29
+ s.add_dependency 'rails', '~> 3.0.6'
30
30
  s.add_dependency 'rdoc', '>= 2.5.11' # helps fix ubuntu
31
31
  s.add_dependency 'truncate_html', '~> 0.5'
32
32
  s.add_dependency 'will_paginate', '~> 3.0.pre'
@@ -31,24 +31,10 @@ module Refinery
31
31
  end
32
32
 
33
33
  def error_404(exception=nil)
34
- if (@page = Page.find_by_menu_match("^/404$", :include => [:parts, :slugs])).present?
35
- params[:action] = 'error_404'
36
- # change any links in the copy to the admin_root_path
37
- # and any references to "home page" to "Dashboard"
38
- part_symbol = Page.default_parts.first.to_sym
39
- @page[part_symbol] = @page[part_symbol].to_s.gsub(
40
- /href=(\'|\")\/(\'|\")/, "href='#{admin_root_path}'"
41
- ).gsub("home page", "Dashboard")
42
-
43
- render :template => "/pages/show",
44
- :layout => layout?,
45
- :status => 404
46
- else
47
- # fallback to the default 404.html page.
48
- render :file => Rails.root.join("public", "404.html").cleanpath.to_s,
49
- :layout => false,
50
- :status => 404
51
- end
34
+ # fallback to the default 404.html page.
35
+ render :file => Rails.root.join("public", "404.html").cleanpath.to_s,
36
+ :layout => false,
37
+ :status => 404
52
38
  end
53
39
 
54
40
  protected
@@ -1,5 +1,3 @@
1
- require 'tmpdir'
2
-
3
1
  module Refinery
4
2
  module Application
5
3
 
@@ -41,7 +39,7 @@ module Refinery
41
39
  base.config.filter_parameters += [:password, :password_confirmation]
42
40
 
43
41
  # Specify a cache store to use
44
- base.config.cache_store = :file_store, File.join(Dir.tmpdir, base.name.to_s.gsub(':', '-'))
42
+ base.config.cache_store = :memory_store
45
43
 
46
44
  # Include the refinery controllers and helpers dynamically
47
45
  base.config.to_prepare do
@@ -2,10 +2,10 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{refinerycms-core}
5
- s.version = %q{0.9.9.15}
5
+ s.version = %q{0.9.9.16}
6
6
  s.summary = %q{Core engine for Refinery CMS}
7
7
  s.description = %q{The core of Refinery CMS. This handles the common functionality and is required by most engines}
8
- s.date = %q{2011-04-01}
8
+ s.date = %q{2011-04-07}
9
9
  s.email = %q{info@refinerycms.com}
10
10
  s.homepage = %q{http://refinerycms.com}
11
11
  s.rubyforge_project = %q{refinerycms}
@@ -14,14 +14,14 @@ Gem::Specification.new do |s|
14
14
  s.require_paths = %w(lib)
15
15
  s.executables = %w()
16
16
 
17
- s.add_dependency 'refinerycms-base', '= 0.9.9.15'
18
- s.add_dependency 'refinerycms-settings', '= 0.9.9.15'
17
+ s.add_dependency 'refinerycms-base', '= 0.9.9.16'
18
+ s.add_dependency 'refinerycms-settings', '= 0.9.9.16'
19
19
  s.add_dependency 'refinerycms-generators', '~> 1.0'
20
20
  s.add_dependency 'acts_as_indexed', '~> 0.7'
21
21
  s.add_dependency 'friendly_id_globalize3', '~> 3.2.1'
22
22
  s.add_dependency 'globalize3', '>= 0.1.0.beta'
23
23
  s.add_dependency 'moretea-awesome_nested_set', '~> 1.4'
24
- s.add_dependency 'rails', '~> 3.0.5'
24
+ s.add_dependency 'rails', '~> 3.0.6'
25
25
  s.add_dependency 'rdoc', '>= 2.5.11' # helps fix ubuntu
26
26
  s.add_dependency 'truncate_html', '~> 0.5'
27
27
  s.add_dependency 'will_paginate', '~> 3.0.pre'
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: refinerycms-core
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.9.9.15
5
+ version: 0.9.9.16
6
6
  platform: ruby
7
7
  authors:
8
8
  - Resolve Digital
@@ -13,7 +13,7 @@ autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
15
 
16
- date: 2011-04-01 00:00:00 +13:00
16
+ date: 2011-04-07 00:00:00 +12:00
17
17
  default_executable:
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
@@ -24,7 +24,7 @@ dependencies:
24
24
  requirements:
25
25
  - - "="
26
26
  - !ruby/object:Gem::Version
27
- version: 0.9.9.15
27
+ version: 0.9.9.16
28
28
  type: :runtime
29
29
  version_requirements: *id001
30
30
  - !ruby/object:Gem::Dependency
@@ -35,7 +35,7 @@ dependencies:
35
35
  requirements:
36
36
  - - "="
37
37
  - !ruby/object:Gem::Version
38
- version: 0.9.9.15
38
+ version: 0.9.9.16
39
39
  type: :runtime
40
40
  version_requirements: *id002
41
41
  - !ruby/object:Gem::Dependency
@@ -101,7 +101,7 @@ dependencies:
101
101
  requirements:
102
102
  - - ~>
103
103
  - !ruby/object:Gem::Version
104
- version: 3.0.5
104
+ version: 3.0.6
105
105
  type: :runtime
106
106
  version_requirements: *id008
107
107
  - !ruby/object:Gem::Dependency