summaryrefslogtreecommitdiffstats
path: root/attachment.cgi
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2014-10-16 18:14:49 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2014-10-16 18:14:49 +0200
commit94ffb7a9fb63cf16805b7c627d1914b499960088 (patch)
tree188ac1e453a818cd9e906e53cbb1d23df8d360f2 /attachment.cgi
parent7ce5b04d20684101748812cf2bd5e7d6275bd5e7 (diff)
downloadbugzilla-94ffb7a9fb63cf16805b7c627d1914b499960088.tar.gz
bugzilla-94ffb7a9fb63cf16805b7c627d1914b499960088.tar.xz
Bug 1068494: Remove CVS/Bonsai/LXR-specific bits of Patch Viewer
r=gerv a=glob
Diffstat (limited to 'attachment.cgi')
-rwxr-xr-xattachment.cgi20
1 files changed, 2 insertions, 18 deletions
diff --git a/attachment.cgi b/attachment.cgi
index 1ddb9337e..5db8f5909 100755
--- a/attachment.cgi
+++ b/attachment.cgi
@@ -190,20 +190,6 @@ sub validateFormat {
return $format;
}
-# Validates context of a diff/interdiff. Will throw an error if the context
-# is not number, "file" or "patch". Returns the validated, detainted context.
-sub validateContext
-{
- my $context = $cgi->param('context') || "patch";
- if ($context ne "file" && $context ne "patch") {
- my $orig_context = $context;
- detaint_natural($context)
- || ThrowUserError("invalid_context", { context => $orig_context });
- }
-
- return $context;
-}
-
# Gets the attachment object(s) generated by validateID, while ensuring
# attachbase and token authentication is used when required.
sub get_attachment {
@@ -392,17 +378,15 @@ sub interdiff {
$old_attachment = validateID('oldid');
$new_attachment = validateID('newid');
}
- my $context = validateContext();
Bugzilla::Attachment::PatchReader::process_interdiff(
- $old_attachment, $new_attachment, $format, $context);
+ $old_attachment, $new_attachment, $format);
}
sub diff {
# Retrieve and validate parameters
my $format = validateFormat('html', 'raw');
my $attachment = $format eq 'raw' ? get_attachment() : validateID();
- my $context = validateContext();
# If it is not a patch, view normally.
if (!$attachment->ispatch) {
@@ -410,7 +394,7 @@ sub diff {
return;
}
- Bugzilla::Attachment::PatchReader::process_diff($attachment, $format, $context);
+ Bugzilla::Attachment::PatchReader::process_diff($attachment, $format);
}
# Display all attachments for a given bug in a series of IFRAMEs within one