Closed
Bug 140437
Opened 23 years ago
Closed 23 years ago
Clean up parameters
Categories
(Bugzilla :: Administration, task)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.16
People
(Reporter: gerv, Assigned: gerv)
References
Details
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
justdave
:
review+
justdave
:
review+
|
Details | Diff | Splinter Review |
The following parameters are no longer used, and can be removed:
preferlists
capitalizelists
errorhtml
blurbhtml
mostfreqhtml
nummilestones
entryheaderhtml
Currently, checksetup.pl just nukes removed parameters. We should probably dump
the HTML ones, at least, to a file and tell the admin where it is.
The following parameters are deprecated; that is, if you want to change them
from the default, you are better off editing the relevant template. We should
say so in their descriptions:
headerhtml
bodyhtml
bannerhtml
footerhtml
Gerv
Assignee | ||
Updated•23 years ago
|
Target Milestone: --- → Bugzilla 2.16
Assignee | ||
Comment 1•23 years ago
|
||
Here it is.
Note that dumping them to a file is probably OK for these particular params;
however, we may have to do something more intelligent at some point for the
ones which this patch "deprecates" - i.e. dynamically insert them into the
appropriate template. Or we could decide that it's not worth it, and let the
admin do it. <shrug>. We can discuss that later.
Gerv
Comment 2•23 years ago
|
||
Are we sure these HTML-template parameters are unused? Not everything is
templatised. You need to keep them in sync at the moment to handle both situations.
Full removal is bug #100089.
Comment 3•23 years ago
|
||
We should also remove the despot params. They're not used anywhere.
Assignee | ||
Comment 4•23 years ago
|
||
I checked - the HTML params I'm removing are not used. The ones I'm deprecating
still are.
Gerv
Assignee | ||
Comment 5•23 years ago
|
||
No despot params.
Gerv
Attachment #81225 -
Attachment is obsolete: true
Updated•23 years ago
|
Attachment #81266 -
Flags: review-
Comment 6•23 years ago
|
||
Comment on attachment 81266 [details] [diff] [review]
Patch v.2
>Index: checksetup.pl
>===================================================================
>RCS file: /cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v
>retrieving revision 1.139
>diff -u -r1.139 checksetup.pl
>--- checksetup.pl 26 Apr 2002 21:12:42 -0000 1.139
>+++ checksetup.pl 27 Apr 2002 07:03:43 -0000
>@@ -750,6 +750,15 @@
> if (!grep($_ eq $item, @::param_list) && $item ne "version") {
> print "The $item parameter is no longer used in Bugzilla\n" .
> "and has been removed from your parameters file.\n";
>+
>+ open(PARAMFILE, ">param-$item.txt")
>+ || die "$0: Can't open param-$item.txt for writing: $!\n";
>+ print PARAMFILE $::param{$item};
>+ close PARAMFILE;
>+
Hmm. Why not put all the params into an "oldparams.txt" file, rather than lots
of separate files?
Assignee | ||
Comment 7•23 years ago
|
||
> Hmm. Why not put all the params into an "oldparams.txt" file, rather than lots
> of separate files?
I'm sure I had a good reason when I wrote the patch, but I can't think what it
is now, so let's do that :-)
Gerv
Comment 8•23 years ago
|
||
If they are still used, why are we deprecating them? They are still the only
way to customise every header and footer (eg reports.cgi. edit*.cgi).
Assignee | ||
Comment 9•23 years ago
|
||
My thinking has changed somewhat here. This is the current idea (please criticise):
PutHeader() and PutFooter() now call the templates. This means that customising
the templates customises all headers and footers.
Over in bug 140435, I am doing a proper template for the footer, which includes
all the defaults for the Command Menu, blurbhtml, footerhtml etc. I think we
should do the same thing for the header.
This would mean that all the header and footer template params are no longer
used anywhere. We would then remove them from defparams.pl. This would mean they
got written out to the oldparams.txt file (as proposed in this bug.)
Lastly, add a release note:
"The bodyhtml, blurbhtml, footerhtml etc. parameters are now obsolete, and have
been removed from Bugzilla. When you run checksetup.pl, their contents will be
dumped to a file "oldparams.txt" in the Bugzilla directory. If you have
customised these parameters, you will need to take your customisations out of
this file and edit template/en/default/global/header.html.tmpl and
template/en/default/global/footer.html.tmpl so that they contain your changes."
This seems the right thing to do to me.
Gerv
Comment 10•23 years ago
|
||
I think Gerv's approach sounds sensible.
As for upgrading admins moving their customizations from parameters to
templates: the automatics mentioned in comment 1 would be cool but probably
still not worth the effort - especially since many of the current templates are
rather complex rather than just lumps of html tagsoup.
My question is: what can be done to offer an easier migration for the admins? It
would be acceptable if you could just copy the previous parameter value from
oldparams.txt to a template and get the thing working. Theoretically this is
possible even with the current header template, but the admin should be guided
so that you wouldn't have to be a template toolkit specialist to cope with this
upgrade. So, at least Gerv's release note should contain a reference to where
more information on this particular phase of customization can be found.
Nit: As far as I can see, oldparams.txt should reside in data directory.
Assignee | ||
Comment 11•23 years ago
|
||
> My question is: what can be done to offer an easier migration for the admins? It
We could add comments to the template indicating which sections correspond to
the old parameters. Then they could just about cut and paste (with a little
thought.)
Gerv
Assignee | ||
Comment 12•23 years ago
|
||
Exactly what we do here depends on bug 140435 getting checked in; when it is,
we'll be able to remove some more parameters.
Gerv
Assignee: justdave → gerv
Depends on: 140435
Assignee | ||
Comment 13•23 years ago
|
||
Patch v.3 - review comments addressed, and extra obsolete parameters removed.
Gerv
Attachment #81266 -
Attachment is obsolete: true
Comment 14•23 years ago
|
||
Comment on attachment 82706 [details] [diff] [review]
Patch v.3
2xr= justdave
Attachment #82706 -
Flags: review+
Assignee | ||
Comment 15•23 years ago
|
||
Fixed.
Checking in defparams.pl;
/cvsroot/mozilla/webtools/bugzilla/defparams.pl,v <-- defparams.pl
new revision: 1.72; previous revision: 1.71
done
Checking in checksetup.pl;
/cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v <-- checksetup.pl
new revision: 1.146; previous revision: 1.145
done
Checking in CGI.pl;
/cvsroot/mozilla/webtools/bugzilla/CGI.pl,v <-- CGI.pl
new revision: 1.153; previous revision: 1.152
done
Checking in globals.pl;
/cvsroot/mozilla/webtools/bugzilla/globals.pl,v <-- globals.pl
new revision: 1.168; previous revision: 1.167
done
Checking in relogin.cgi;
/cvsroot/mozilla/webtools/bugzilla/relogin.cgi,v <-- relogin.cgi
new revision: 1.18; previous revision: 1.17
done
Gerv
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Updated•12 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•