aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorFabrice Bellingard <bellingard@gmail.com>2011-09-19 14:39:41 +0200
committerFabrice Bellingard <bellingard@gmail.com>2011-09-19 14:43:22 +0200
commit359bfe1a087289ffecc9457fbc7dd6b2b00c5481 (patch)
treea154e0fe18996582bd36c920a3b73ccd882316c2 /sonar-server
parent1935abb54a572958b115e8cf58d46a9fed2acc42 (diff)
downloadsonarqube-359bfe1a087289ffecc9457fbc7dd6b2b00c5481.tar.gz
sonarqube-359bfe1a087289ffecc9457fbc7dd6b2b00c5481.zip
SONAR-893 Fix bug of update request on Derby
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb2
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/project/history.html.erb2
2 files changed, 2 insertions, 2 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb
index 3e4c077a09c..c9097ef560d 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb
@@ -66,7 +66,7 @@ class ProjectController < ApplicationController
sid = params[:snapshot_id]
if sid
- Snapshot.update_all("status='U'", ["id=? or root_snapshot_id=(?)", sid, sid])
+ Snapshot.update_all("status='U'", ["id=? or root_snapshot_id=(?)", sid.to_i, sid.to_i])
flash[:notice] = message('project_history.snapshot_deleted')
end
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/project/history.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/project/history.html.erb
index 4c8dc6235b1..c0be0cb0b8d 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/project/history.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/project/history.html.erb
@@ -34,7 +34,7 @@
cell_content = "<b>" + message('project_history.last_snapshot') + "</b>"
else
cell_content = button_to( message('project_history.delete_snapshot'),
- { :action => "delete_snapshot_history", :id => @project.id, :snapshot_id => [snapshot.id] },
+ { :action => "delete_snapshot_history", :id => @project.id, :snapshot_id => snapshot.id },
:class => 'action red-button',
:confirm => message('project_history.are_you_sure_delete_snapshot_x', :params => l(time, :format => :long)) )
end