Closed
Bug 162151
Opened 22 years ago
Closed 22 years ago
Fix page.cgi's method of finding templates
Categories
(Bugzilla :: Bugzilla-General, defect, P1)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.18
People
(Reporter: gerv, Assigned: gerv)
References
Details
Attachments
(1 file)
3.29 KB,
patch
|
bbaetz
:
review+
bbaetz
:
review+
|
Details | Diff | Splinter Review |
Currently, page.cgi gets its template mappings from localconfig. This is bad, because new installations don't pick up new mappings. The new idea is to have a template/en/default/pages directory. This contains all the pages page.cgi can serve. page.cgi?id=foo.html will look up "html" in the %contenttypes hash, send the appropriate content type, then look for foo.html.tmpl in the pages directory. Gerv
Assignee | ||
Comment 1•22 years ago
|
||
I want to fix bug 146945 first, if possible. This just makes things easier. Gerv
Depends on: 146945
Comment 2•22 years ago
|
||
we could even have id=foo&format=html - that may allow a more generic solution. However, formats per se aren't really useful for the page.cgi stuff, since there isn't any processing results to share like there are for the other format thingys.
Assignee | ||
Comment 3•22 years ago
|
||
Indeed. So my idea was to make an id look like a filename, but split it into pieces and use ValidateOutputFormat under the covers to make sure the template file exists etc. and avoid duplicating code. However, I ran into the problem that the file would really have to be called foo-html.html , because of the way ValidateOutputFormat works. So, it would be good to fix that (bug 146945). So, I've posted my proposal for fixing it to the newsgroups. If people like it, we can do that, then this, then get back to the linkify script. <phew> Gerv
Updated•22 years ago
|
Priority: -- → P1
Target Milestone: --- → Bugzilla 2.18
Assignee | ||
Comment 4•22 years ago
|
||
This should do the trick. Gerv
Comment 5•22 years ago
|
||
Comment on attachment 99594 [details] [diff] [review] Patch v.1 You need to pull %pages out of Bugzilla::Config::EXPORT_OK too. r=bbaetz with that change, assuming that you've tested. I also don't like the error message someone will get mistyping a url, but I think that we can let that live until we clean up our error handling stuff.
Attachment #99594 -
Flags: review+
Assignee | ||
Comment 6•22 years ago
|
||
Fixed. Checking in page.cgi; /cvsroot/mozilla/webtools/bugzilla/page.cgi,v <-- page.cgi new revision: 1.5; previous revision: 1.4 done Checking in checksetup.pl; /cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v <-- checksetup.pl new revision: 1.189; previous revision: 1.188 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.8; previous revision: 1.7 done Checking in Bugzilla/Config.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Config.pm,v <-- Config.pm new revision: 1.4; previous revision: 1.3 done Gerv
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Updated•11 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
•