From b73deff06d83b58422ff745f4ffc71fd7d965fcb Mon Sep 17 00:00:00 2001 From: "justdave%syndicomm.com" Date: Thu, 15 Apr 2004 05:44:47 +0000 Subject: [PATCH] Backing out checkin from bug 238865: patch was negatively reviewed post-mortem. a=justdave git-svn-id: svn://10.0.0.236/trunk@154915 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/page.cgi | 13 ++++--------- .../template/en/default/global/code-error.html.tmpl | 5 ----- .../template/en/default/pages/linked.html.tmpl | 6 ++---- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/mozilla/webtools/bugzilla/page.cgi b/mozilla/webtools/bugzilla/page.cgi index 6e78317fc06..b68a9313b48 100755 --- a/mozilla/webtools/bugzilla/page.cgi +++ b/mozilla/webtools/bugzilla/page.cgi @@ -42,19 +42,14 @@ Bugzilla->login(); my $cgi = Bugzilla->cgi; -my $id = $cgi->param('id'); -if ($id) { +if ($::FORM{'id'}) { # Remove all dodgy chars, and split into name and ctype. - $id =~ s/[^\w\-\.]//g; - $id =~ /(.*)\.(.*)/; - if (!$2) { - # if this regexp fails to match completely, something bad came in - ThrowCodeError("bad_page_cgi_id", { "page_id" => $id }); - } + $::FORM{'id'} =~ s/[^\w\-\.]//g; + $::FORM{'id'} =~ /(.*)\.(.*)/; my $format = GetFormat("pages/$1", undef, $2); - $cgi->param('id', $id); + $vars->{'form'} = \%::FORM; print $cgi->header($format->{'ctype'}); diff --git a/mozilla/webtools/bugzilla/template/en/default/global/code-error.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/global/code-error.html.tmpl index c5233b8e88d..342d67102d1 100644 --- a/mozilla/webtools/bugzilla/template/en/default/global/code-error.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/global/code-error.html.tmpl @@ -56,11 +56,6 @@ [% ELSIF error == "authres_unhandled" %] An authorization handler return value was not handled by the login code. - [% ELSIF error == "bad_page_cgi_id" %] - [% title = "Invalid Page ID" %] - The ID [% page_id FILTER html %] is not a - valid page identifier. - [% ELSIF error == "bug_error" %] Trying to retrieve [% terms.bug %] [%+ bug.bug_id FILTER html %] returned the error [% bug.error FILTER html %]. diff --git a/mozilla/webtools/bugzilla/template/en/default/pages/linked.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/pages/linked.html.tmpl index fcb5ee9d0dd..2a3521a3581 100644 --- a/mozilla/webtools/bugzilla/template/en/default/pages/linked.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/pages/linked.html.tmpl @@ -21,8 +21,6 @@ #%] [% INCLUDE global/header.html.tmpl title = "Your Linkified Text" %] -[% USE Bugzilla %] -[% cgi = Bugzilla.cgi %]

Copy and paste the text below: @@ -32,7 +30,7 @@

-[%- cgi.param("text") FILTER quoteUrls FILTER html -%]
+[%- form.text FILTER quoteUrls FILTER html -%]
 

@@ -47,7 +45,7 @@

-[%- cgi.param("text") FILTER quoteUrls -%]
+[%- form.text FILTER quoteUrls -%]