user-error.html.tmpl's use [% changedsince %] instead of $changedsince

RESOLVED FIXED in Bugzilla 2.18

Status

()

defect
RESOLVED FIXED
17 years ago
7 years ago

People

(Reporter: burnus, Assigned: burnus)

Tracking

2.17.3
Bugzilla 2.18
Dependency tree / graph
Bug Flags:
approval +

Details

Attachments

(1 attachment, 1 obsolete attachment)

In global/user-error.html.tmpl there is this line:

  [% ELSIF error == "no_dupe_stats_error_whenever" %]
    [% title = "Error Reading Previous Dupes File" %]
    An error occurred opening $changedsince days ago ($whenever)'s

Relevant lines from duplicates.cgi:
  my $changedsince = formvalue("changedsince", 7);
  my $whenever = days_ago($changedsince);
  # If error then
        $vars->{'changedsince'} = $changedsince;
        $vars->{'whenever'} = $whenever;
        ThrowUserError("no_dupe_stats_error_whenever");
});
This patch is based on the patch from bug 192677.

I use FILTER html though this is not needed since the variables are detained or
save, respectively.
Attachment #119135 - Flags: review?(gerv)
burnus: is this patch still necessary? I'm sure some of it's already gone in...

Gerv
Posted patch RediffSplinter Review
> is this patch still necessary? I'm sure some of it's already gone in...
Hmm, I couldn't find any changes (other that duplicates.cgi's patch didn't
apply anymore).
Attachment #119135 - Attachment is obsolete: true
Attachment #121799 - Flags: review?(gerv)
Attachment #119135 - Flags: review?(gerv)
Comment on attachment 121799 [details] [diff] [review]
Rediff

Why does the detaint code have to move 20 lines up the file?

Gerv
> Why does the detaint code have to move 20 lines up the file?
|detaint_natural($maxrows)
No particular reason but keeping the two detaints together.

|detaint_natural($changedsince)
Well, I like to detain $changedsince before I use it, since I filter it anyway
in the template, it shouldn't matter though. (Not knowing what exactly might get
wrong in this line: tie(%before, 'AnyDBM_File',
"data/duplicates/dupes$whenever"[...])

This comes between the new and the former location:
  my $whenever = days_ago($changedsince);
    if (!$!{ENOENT}) {
        ThrowUserError("no_dupe_stats_error_whenever",
                       { error_msg => $!,
                         changedsince => $changedsince,
                         whenever => $whenever,
                       });
Status: NEW → ASSIGNED
Attachment #121799 - Flags: review?(gerv) → review+
Flags: approval?
Target Milestone: --- → Bugzilla 2.18
Flags: approval? → approval+
Checking in duplicates.cgi;
/cvsroot/mozilla/webtools/bugzilla/duplicates.cgi,v  <--  duplicates.cgi
new revision: 1.37; previous revision: 1.36
done
Checking in template/en/default/global/user-error.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/global/user-error.html.tmpl,v
 <--  user-error.html.tmpl
new revision: 1.35; previous revision: 1.34
done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.