Commit 3971931c700bd4267af06e6a78e4f9a96c5af34c
Exists in
master
and in
28 other branches
Merge branch 'stable'
Showing
8 changed files
with
24 additions
and
17 deletions
Show diff stats
app/controllers/public/account_controller.rb
@@ -71,10 +71,6 @@ class AccountController < ApplicationController | @@ -71,10 +71,6 @@ class AccountController < ApplicationController | ||
71 | @block_bot = !!session[:may_be_a_bot] | 71 | @block_bot = !!session[:may_be_a_bot] |
72 | @invitation_code = params[:invitation_code] | 72 | @invitation_code = params[:invitation_code] |
73 | begin | 73 | begin |
74 | - if params[:user] | ||
75 | - params[:user].delete(:password_confirmation_clear) | ||
76 | - params[:user].delete(:password_clear) | ||
77 | - end | ||
78 | @user = User.new(params[:user]) | 74 | @user = User.new(params[:user]) |
79 | @user.terms_of_use = environment.terms_of_use | 75 | @user.terms_of_use = environment.terms_of_use |
80 | @user.environment = environment | 76 | @user.environment = environment |
app/views/layouts/application-ng.rhtml
@@ -69,7 +69,7 @@ | @@ -69,7 +69,7 @@ | ||
69 | <% end %> | 69 | <% end %> |
70 | 70 | ||
71 | </span> | 71 | </span> |
72 | - <form action="/search" class="search_form" method="get" class="clean"> | 72 | + <form action="/search" class="search_form clean" method="get" id="top-search"> |
73 | <input name="query" size="15" title="<%=_('Search...')%>" onfocus="this.form.className='focused';" onblur="this.form.className=''" /> | 73 | <input name="query" size="15" title="<%=_('Search...')%>" onfocus="this.form.className='focused';" onblur="this.form.className=''" /> |
74 | <div><%=_('Press <strong>Enter</strong> to send the search query.')%></div> | 74 | <div><%=_('Press <strong>Enter</strong> to send the search query.')%></div> |
75 | <%= javascript_tag 'jQuery("#user form input").hint();' %> | 75 | <%= javascript_tag 'jQuery("#user form input").hint();' %> |
app/views/shared/tiny_mce.rhtml
@@ -20,7 +20,7 @@ tinyMCE.init({ | @@ -20,7 +20,7 @@ tinyMCE.init({ | ||
20 | editor_selector : "mceEditor", | 20 | editor_selector : "mceEditor", |
21 | theme : "advanced", | 21 | theme : "advanced", |
22 | relative_urls : false, | 22 | relative_urls : false, |
23 | - remove_script_host : true, | 23 | + remove_script_host : false, |
24 | document_base_url : <%= environment.top_url.to_json %>, | 24 | document_base_url : <%= environment.top_url.to_json %>, |
25 | plugins: myplugins, | 25 | plugins: myplugins, |
26 | theme_advanced_toolbar_location : "top", | 26 | theme_advanced_toolbar_location : "top", |
db/migrate/20130117132943_remove_index_articles_on_name.rb
0 → 100644
plugins/shopping_cart/public/cart.js
@@ -65,7 +65,7 @@ function Cart(config) { | @@ -65,7 +65,7 @@ function Cart(config) { | ||
65 | ).appendTo(li); | 65 | ).appendTo(li); |
66 | var input = $("input", li)[0]; | 66 | var input = $("input", li)[0]; |
67 | input.lastValue = input.value; | 67 | input.lastValue = input.value; |
68 | - input.itemId = item.id; | 68 | + input.productId = item.id; |
69 | input.ajustSize = function() { | 69 | input.ajustSize = function() { |
70 | var len = this.value.toString().length; | 70 | var len = this.value.toString().length; |
71 | if(len > 2) len--; | 71 | if(len > 2) len--; |
@@ -73,7 +73,7 @@ function Cart(config) { | @@ -73,7 +73,7 @@ function Cart(config) { | ||
73 | }; | 73 | }; |
74 | input.ajustSize(); | 74 | input.ajustSize(); |
75 | input.onchange = function() { | 75 | input.onchange = function() { |
76 | - me.updateQuantity(this, this.itemId, this.value); | 76 | + me.updateQuantity(this, this.productId, this.value); |
77 | }; | 77 | }; |
78 | // document.location.href = "#"+liId; | 78 | // document.location.href = "#"+liId; |
79 | // document.location.href = "#"+this.cartElem.id; | 79 | // document.location.href = "#"+this.cartElem.id; |
plugins/spaminator/lib/spaminator_plugin/spaminator.rb
@@ -12,7 +12,10 @@ class SpaminatorPlugin::Spaminator | @@ -12,7 +12,10 @@ class SpaminatorPlugin::Spaminator | ||
12 | puts Benchmark.measure { run(environment) } | 12 | puts Benchmark.measure { run(environment) } |
13 | end | 13 | end |
14 | 14 | ||
15 | - def initialize_logger(logpath) | 15 | + def initialize_logger(environment) |
16 | + logdir = File.join(RAILS_ROOT, 'log', SpaminatorPlugin.name.underscore) | ||
17 | + File.makedirs(logdir) if !File.exist?(logdir) | ||
18 | + logpath = File.join(logdir, "#{environment.name.to_slug}_#{ENV['RAILS_ENV']}_#{Time.now.strftime("%F_%T")}.log") | ||
16 | @logger = Logger.new(logpath) | 19 | @logger = Logger.new(logpath) |
17 | end | 20 | end |
18 | 21 | ||
@@ -28,8 +31,7 @@ class SpaminatorPlugin::Spaminator | @@ -28,8 +31,7 @@ class SpaminatorPlugin::Spaminator | ||
28 | @report = SpaminatorPlugin::Report.new(:environment => environment, | 31 | @report = SpaminatorPlugin::Report.new(:environment => environment, |
29 | :total_people => Person.count, | 32 | :total_people => Person.count, |
30 | :total_comments => Comment.count) | 33 | :total_comments => Comment.count) |
31 | - logpath = File.join(SpaminatorPlugin.root_path, 'log', "#{environment.name.to_slug}_#{ENV['RAILS_ENV']}_#{Time.now.strftime("%F_%T")}.log") | ||
32 | - self.class.initialize_logger(logpath) | 34 | + self.class.initialize_logger(environment) |
33 | end | 35 | end |
34 | 36 | ||
35 | def run | 37 | def run |
test/functional/account_controller_test.rb
@@ -730,12 +730,6 @@ class AccountControllerTest < ActionController::TestCase | @@ -730,12 +730,6 @@ class AccountControllerTest < ActionController::TestCase | ||
730 | assert_template 'signup' | 730 | assert_template 'signup' |
731 | end | 731 | end |
732 | 732 | ||
733 | - should 'remove useless user data on signup' do | ||
734 | - assert_nothing_raised do | ||
735 | - new_user :password_clear => 'nothing', :password_confirmation_clear => 'nothing' | ||
736 | - end | ||
737 | - end | ||
738 | - | ||
739 | should 'login after signup when no e-mail confirmation is required' do | 733 | should 'login after signup when no e-mail confirmation is required' do |
740 | e = Environment.default | 734 | e = Environment.default |
741 | e.enable('skip_new_user_email_confirmation') | 735 | e.enable('skip_new_user_email_confirmation') |
test/functional/application_controller_test.rb
@@ -217,6 +217,12 @@ class ApplicationControllerTest < ActionController::TestCase | @@ -217,6 +217,12 @@ class ApplicationControllerTest < ActionController::TestCase | ||
217 | assert_no_tag :tag => 'div', :attributes => { :id => 'user_box' }, :descendant => { :tag => 'a', :attributes => { :href => 'http://web.mail/' } } | 217 | assert_no_tag :tag => 'div', :attributes => { :id => 'user_box' }, :descendant => { :tag => 'a', :attributes => { :href => 'http://web.mail/' } } |
218 | end | 218 | end |
219 | 219 | ||
220 | + should 'display search form with id' do | ||
221 | + @controller.stubs(:get_layout).returns('application-ng') | ||
222 | + get :index | ||
223 | + assert_tag :tag => 'form', :attributes => { :class => 'search_form clean', :id => 'top-search' } | ||
224 | + end | ||
225 | + | ||
220 | should 'display theme test panel when testing theme' do | 226 | should 'display theme test panel when testing theme' do |
221 | @request.session[:theme] = 'my-test-theme' | 227 | @request.session[:theme] = 'my-test-theme' |
222 | theme = mock | 228 | theme = mock |