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
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.
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
Priority: -- → P1
Target Milestone: --- → Bugzilla 2.18
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+
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
Last Resolved: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.