diff --git a/mozilla/webtools/testopia/template/en/default/testopia/case/show.html.tmpl b/mozilla/webtools/testopia/template/en/default/testopia/case/show.html.tmpl
index 4fb7117931c..b1f34cbd7a1 100644
--- a/mozilla/webtools/testopia/template/en/default/testopia/case/show.html.tmpl
+++ b/mozilla/webtools/testopia/template/en/default/testopia/case/show.html.tmpl
@@ -305,13 +305,11 @@
Export:
-
-[%#

#%]
-[%#
#%]
+
+[%#
#%]
+
[%##### Footer #####%]
[% PROCESS global/footer.html.tmpl %]
diff --git a/mozilla/webtools/testopia/template/en/default/testopia/caserun/confirm.html.tmpl b/mozilla/webtools/testopia/template/en/default/testopia/caserun/confirm.html.tmpl
deleted file mode 100644
index 8747ec5b381..00000000000
--- a/mozilla/webtools/testopia/template/en/default/testopia/caserun/confirm.html.tmpl
+++ /dev/null
@@ -1,94 +0,0 @@
-[%# 1.0@bugzilla.org %]
-[%# The contents of this file are subject to the Mozilla Public
- # License Version 1.1 (the "License"); you may not use this file
- # except in compliance with the License. You may obtain a copy of
- # the License at http://www.mozilla.org/MPL/
- #
- # Software distributed under the License is distributed on an "AS
- # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- # implied. See the License for the specific language governing
- # rights and limitations under the License.
- #
- # The Original Code is the Bugzilla Test Runner System.
- #
- # The Initial Developer of the Original Code is Maciej Maczynski.
- # Portions created by Maciej Maczynski are Copyright (C) 2001
- # Maciej Maczynski. All Rights Reserved.
- #
- # Contributor(s): Greg Hendricks
- #%]
-
-[%# INTERFACE:
- # ...
- #%]
-
-[%############################################################################%]
-[%# Template Initialization #%]
-[%############################################################################%]
-
-[% PROCESS global/variables.none.tmpl %]
-[% PROCESS testopia/blocks.html.tmpl %]
-[% title = "Confirm Test Case-Run Update" %]
-
-[%############################################################################%]
-[%# Page Header #%]
-[%############################################################################%]
-
-[% PROCESS global/header.html.tmpl %]
-
-[% PROCESS testopia/style.none.tmpl %]
-
-The build you selected already has a record in the database.
-
-
-
-
- | [% existing.build.name FILTER html %] |
- [% existing.assignee.login FILTER html %] |
- [% existing.testedby.login FILTER html %] |
- [% existing.close_date FILTER time %] |
- [% existing.status FILTER html %] |
-
-
-
- Do you wish to over write this information with the following?
-
-
-
-
- | [% assignee FILTER html %] |
- [% testedby FILTER html %] |
- [% close_date FILTER time %] |
- [% status_name FILTER html %] |
-
-
-
-
-
-No, take me back
-
-[% PROCESS global/footer.html.tmpl %]
diff --git a/mozilla/webtools/testopia/tr_list_caseruns.cgi b/mozilla/webtools/testopia/tr_list_caseruns.cgi
index bfedba187bc..0fb39d82f7a 100755
--- a/mozilla/webtools/testopia/tr_list_caseruns.cgi
+++ b/mozilla/webtools/testopia/tr_list_caseruns.cgi
@@ -99,9 +99,7 @@ if ($action eq 'Commit'){
|| ThrowTemplateError($template->error());
}
- my $status = $cgi->param('status') == -1 ? $caserun->status_id : $cgi->param('status');
my $build = $cgi->param('caserun_build') == -1 ? $caserun->build->id : $cgi->param('caserun_build');
- my $assignee = $cgi->param('assignee') eq '--Do Not Change--' ? $caserun->assignee->id : DBNameToIdAndCheck(trim($cgi->param('assignee')));
my $notes = $cgi->param('notes');
my $env = $cgi->param('caserun_env') eq '--Do Not Change--' ? $caserun->environment->id : $cgi->param('caserun_env');
@@ -110,14 +108,9 @@ if ($action eq 'Commit'){
detaint_natural($env);
detaint_natural($build);
- detaint_natural($status);
+
trick_taint($notes);
- # If there is already a caserun with the selected build and environment,
- # switch to it.
- my $is = $caserun->check_exists($caserun->run_id, $caserun->case_id, $build, $env);
- $caserun = Bugzilla::Testopia::TestCaseRun->new($is) if $is;
-
unless ($caserun->canedit){
print $cgi->multipart_end if $serverpush;
ThrowUserError("testopia-read-only", {'object' => 'Case Run', 'id' => $caserun->id});
@@ -127,6 +120,11 @@ if ($action eq 'Commit'){
# If there is not one, it will create it and switch to that.
$caserun = $caserun->switch($build,$env);
+ my $status = $cgi->param('status') == -1 ? $caserun->status_id : $cgi->param('status');
+ my $assignee = $cgi->param('assignee') eq '--Do Not Change--' ? $caserun->assignee->id : DBNameToIdAndCheck(trim($cgi->param('assignee')));
+
+ detaint_natural($status);
+
$caserun->set_status($status) if ($caserun->status_id != $status);
$caserun->set_assignee($assignee) if ($caserun->assignee->id != $assignee);
$caserun->append_note($notes);