Last Comment Bug 301508 - Say 'Goodbye' to CGI.pl
: Say 'Goodbye' to CGI.pl
Status: RESOLVED FIXED
:
Product: Bugzilla
Classification: Server Software
Component: Bugzilla-General (show other bugs)
: 2.21
: All All
: -- enhancement (vote)
: Bugzilla 2.22
Assigned To: Frédéric Buclin
: default-qa
Mentors:
Depends on:
Blocks: 59353 bz-globals 282121
  Show dependency treegraph
 
Reported: 2005-07-20 16:04 PDT by Frédéric Buclin
Modified: 2006-02-12 17:39 PST (History)
2 users (show)
justdave: approval+
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch (work in progress), v0.6 (40.48 KB, patch)
2005-07-22 03:59 PDT, Frédéric Buclin
no flags Details | Diff | Splinter Review
patch, v1 (39.50 KB, patch)
2005-08-06 17:45 PDT, Frédéric Buclin
wicked: review+
mkanat: review+
Details | Diff | Splinter Review

Description Frédéric Buclin 2005-07-20 16:04:20 PDT
All routines are gone. It's time to remove CGI.pl.
Comment 1 Myk Melez [:myk] [@mykmelez] 2005-07-20 16:05:15 PDT
Bye bye!
Comment 2 Frédéric Buclin 2005-07-22 03:59:29 PDT
Created attachment 190117 [details] [diff] [review]
patch (work in progress), v0.6

I did only a few test (explaining why this patch has a version < 1.0) and
realized that Bugzilla::Error was required in almost each .cgi page. I prefered
to put it in globals.pl for now than writing 'use Bugzilla::Error;' everywhere.
About Bugzilla::Bug, I still have to check whether we really need it in
globals.pl or not. Also, globals.pl is still required in most files because of
SendSQL-like routines as well as $::templates and $::vars.

Question: which files should care about "do $localconfig;" as well as $::ENV
and $::SIG variables defined in globals.pl? That's another reason I avoided to
remove "require globals.pl" even when this call didn't seem useful.
Comment 3 Max Kanat-Alexander 2005-07-22 22:12:54 PDT
The $::ENV modifications are required for taint safety. The $::SIG handlers are
also needed by every CGI.
Comment 4 Frédéric Buclin 2005-08-06 17:45:34 PDT
Created attachment 191848 [details] [diff] [review]
patch, v1

Get rid of CGI.pl, meaning that:
- $::cgi and $::buffer go away;
- $vars->{'help'} is now replaced by cgi.param("help") in templates;
- require "CGI.pl" is replaced by require "globals.pl" where appropriate
(CGI.pl called globals.pl);
- use Bugzilla::Error which was called from CGI.pl is now called from
globals.pl.
Comment 5 Max Kanat-Alexander 2005-08-06 21:00:50 PDT
Comment on attachment 191848 [details] [diff] [review]
patch, v1

This *looks* basically very good. :-) I'm quite excited about it. :-)

I'll let wicked do the code testing.
Comment 6 Frédéric Buclin 2005-08-07 08:03:30 PDT
I did some additional tests for all affected files, and I saw no problem.
Comment 7 Teemu Mannermaa (:wicked) 2005-08-09 17:52:18 PDT
Comment on attachment 191848 [details] [diff] [review]
patch, v1

Looks valid and brief tests didn't hint on any major regessions so farewell
CGI.pl!
Comment 8 Frédéric Buclin 2005-08-09 18:31:26 PDT
Bye bye!

Removing CGI.pl;
/cvsroot/mozilla/webtools/bugzilla/CGI.pl,v  <--  CGI.pl
new revision: delete; previous revision: 1.251
done
Checking in attachment.cgi;
/cvsroot/mozilla/webtools/bugzilla/attachment.cgi,v  <--  attachment.cgi
new revision: 1.91; previous revision: 1.90
done
Checking in buglist.cgi;
/cvsroot/mozilla/webtools/bugzilla/buglist.cgi,v  <--  buglist.cgi
new revision: 1.303; previous revision: 1.302
done
Checking in chart.cgi;
/cvsroot/mozilla/webtools/bugzilla/chart.cgi,v  <--  chart.cgi
new revision: 1.12; previous revision: 1.11
done
Checking in colchange.cgi;
/cvsroot/mozilla/webtools/bugzilla/colchange.cgi,v  <--  colchange.cgi
new revision: 1.50; previous revision: 1.49
done
Checking in config.cgi;
/cvsroot/mozilla/webtools/bugzilla/config.cgi,v  <--  config.cgi
new revision: 1.9; previous revision: 1.8
done
Checking in createaccount.cgi;
/cvsroot/mozilla/webtools/bugzilla/createaccount.cgi,v  <--  createaccount.cgi
new revision: 1.43; previous revision: 1.42
done
Checking in describecomponents.cgi;
/cvsroot/mozilla/webtools/bugzilla/describecomponents.cgi,v  <-- 
describecomponents.cgi
new revision: 1.30; previous revision: 1.29
done
Checking in describekeywords.cgi;
/cvsroot/mozilla/webtools/bugzilla/describekeywords.cgi,v  <--  describekeywords.cgi
new revision: 1.15; previous revision: 1.14
done
Checking in doeditparams.cgi;
/cvsroot/mozilla/webtools/bugzilla/doeditparams.cgi,v  <--  doeditparams.cgi
new revision: 1.35; previous revision: 1.34
done
Checking in duplicates.cgi;
/cvsroot/mozilla/webtools/bugzilla/duplicates.cgi,v  <--  duplicates.cgi
new revision: 1.45; previous revision: 1.44
done
Checking in editcomponents.cgi;
/cvsroot/mozilla/webtools/bugzilla/editcomponents.cgi,v  <--  editcomponents.cgi
new revision: 1.57; previous revision: 1.56
done
Checking in editflagtypes.cgi;
/cvsroot/mozilla/webtools/bugzilla/editflagtypes.cgi,v  <--  editflagtypes.cgi
new revision: 1.23; previous revision: 1.22
done
Checking in editgroups.cgi;
/cvsroot/mozilla/webtools/bugzilla/editgroups.cgi,v  <--  editgroups.cgi
new revision: 1.56; previous revision: 1.55
done
Checking in editkeywords.cgi;
/cvsroot/mozilla/webtools/bugzilla/editkeywords.cgi,v  <--  editkeywords.cgi
new revision: 1.29; previous revision: 1.28
done
Checking in editmilestones.cgi;
/cvsroot/mozilla/webtools/bugzilla/editmilestones.cgi,v  <--  editmilestones.cgi
new revision: 1.41; previous revision: 1.40
done
Checking in editparams.cgi;
/cvsroot/mozilla/webtools/bugzilla/editparams.cgi,v  <--  editparams.cgi
new revision: 1.26; previous revision: 1.25
done
Checking in editproducts.cgi;
/cvsroot/mozilla/webtools/bugzilla/editproducts.cgi,v  <--  editproducts.cgi
new revision: 1.91; previous revision: 1.90
done
Checking in editsettings.cgi;
/cvsroot/mozilla/webtools/bugzilla/editsettings.cgi,v  <--  editsettings.cgi
new revision: 1.4; previous revision: 1.3
done
Checking in editusers.cgi;
/cvsroot/mozilla/webtools/bugzilla/editusers.cgi,v  <--  editusers.cgi
new revision: 1.95; previous revision: 1.94
done
Checking in editversions.cgi;
/cvsroot/mozilla/webtools/bugzilla/editversions.cgi,v  <--  editversions.cgi
new revision: 1.36; previous revision: 1.35
done
Checking in editwhines.cgi;
/cvsroot/mozilla/webtools/bugzilla/editwhines.cgi,v  <--  editwhines.cgi
new revision: 1.9; previous revision: 1.8
done
Checking in enter_bug.cgi;
/cvsroot/mozilla/webtools/bugzilla/enter_bug.cgi,v  <--  enter_bug.cgi
new revision: 1.115; previous revision: 1.114
done
Checking in globals.pl;
/cvsroot/mozilla/webtools/bugzilla/globals.pl,v  <--  globals.pl
new revision: 1.332; previous revision: 1.331
done
Checking in importxml.pl;
/cvsroot/mozilla/webtools/bugzilla/importxml.pl,v  <--  importxml.pl
new revision: 1.46; previous revision: 1.45
done
Checking in index.cgi;
/cvsroot/mozilla/webtools/bugzilla/index.cgi,v  <--  index.cgi
new revision: 1.14; previous revision: 1.13
done
Checking in long_list.cgi;
/cvsroot/mozilla/webtools/bugzilla/long_list.cgi,v  <--  long_list.cgi
new revision: 1.46; previous revision: 1.45
done
Checking in move.pl;
/cvsroot/mozilla/webtools/bugzilla/move.pl,v  <--  move.pl
new revision: 1.34; previous revision: 1.33
done
Checking in page.cgi;
/cvsroot/mozilla/webtools/bugzilla/page.cgi,v  <--  page.cgi
new revision: 1.16; previous revision: 1.15
done
Checking in post_bug.cgi;
/cvsroot/mozilla/webtools/bugzilla/post_bug.cgi,v  <--  post_bug.cgi
new revision: 1.121; previous revision: 1.120
done
Checking in process_bug.cgi;
/cvsroot/mozilla/webtools/bugzilla/process_bug.cgi,v  <--  process_bug.cgi
new revision: 1.273; previous revision: 1.272
done
Checking in query.cgi;
/cvsroot/mozilla/webtools/bugzilla/query.cgi,v  <--  query.cgi
new revision: 1.148; previous revision: 1.147
done
Checking in quips.cgi;
/cvsroot/mozilla/webtools/bugzilla/quips.cgi,v  <--  quips.cgi
new revision: 1.29; previous revision: 1.28
done
Checking in relogin.cgi;
/cvsroot/mozilla/webtools/bugzilla/relogin.cgi,v  <--  relogin.cgi
new revision: 1.26; previous revision: 1.25
done
Checking in report.cgi;
/cvsroot/mozilla/webtools/bugzilla/report.cgi,v  <--  report.cgi
new revision: 1.30; previous revision: 1.29
done
Checking in reports.cgi;
/cvsroot/mozilla/webtools/bugzilla/reports.cgi,v  <--  reports.cgi
new revision: 1.77; previous revision: 1.76
done
Checking in request.cgi;
/cvsroot/mozilla/webtools/bugzilla/request.cgi,v  <--  request.cgi
new revision: 1.24; previous revision: 1.23
done
Checking in sanitycheck.cgi;
/cvsroot/mozilla/webtools/bugzilla/sanitycheck.cgi,v  <--  sanitycheck.cgi
new revision: 1.101; previous revision: 1.100
done
Checking in show_activity.cgi;
/cvsroot/mozilla/webtools/bugzilla/show_activity.cgi,v  <--  show_activity.cgi
new revision: 1.17; previous revision: 1.16
done
Checking in show_bug.cgi;
/cvsroot/mozilla/webtools/bugzilla/show_bug.cgi,v  <--  show_bug.cgi
new revision: 1.33; previous revision: 1.32
done
Checking in showdependencygraph.cgi;
/cvsroot/mozilla/webtools/bugzilla/showdependencygraph.cgi,v  <-- 
showdependencygraph.cgi
new revision: 1.41; previous revision: 1.40
done
Checking in showdependencytree.cgi;
/cvsroot/mozilla/webtools/bugzilla/showdependencytree.cgi,v  <-- 
showdependencytree.cgi
new revision: 1.34; previous revision: 1.33
done
Checking in sidebar.cgi;
/cvsroot/mozilla/webtools/bugzilla/sidebar.cgi,v  <--  sidebar.cgi
new revision: 1.15; previous revision: 1.14
done
Checking in summarize_time.cgi;
/cvsroot/mozilla/webtools/bugzilla/summarize_time.cgi,v  <--  summarize_time.cgi
new revision: 1.8; previous revision: 1.7
done
Checking in token.cgi;
/cvsroot/mozilla/webtools/bugzilla/token.cgi,v  <--  token.cgi
new revision: 1.34; previous revision: 1.33
done
Checking in userprefs.cgi;
/cvsroot/mozilla/webtools/bugzilla/userprefs.cgi,v  <--  userprefs.cgi
new revision: 1.83; previous revision: 1.82
done
Checking in votes.cgi;
/cvsroot/mozilla/webtools/bugzilla/votes.cgi,v  <--  votes.cgi
new revision: 1.30; previous revision: 1.29
done
Checking in xml.cgi;
/cvsroot/mozilla/webtools/bugzilla/xml.cgi,v  <--  xml.cgi
new revision: 1.13; previous revision: 1.12
done
Checking in Bugzilla/Attachment.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Attachment.pm,v  <--  Attachment.pm
new revision: 1.23; previous revision: 1.22
done
Checking in Bugzilla/Flag.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Flag.pm,v  <--  Flag.pm
new revision: 1.47; previous revision: 1.46
done
Checking in Bugzilla/FlagType.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/FlagType.pm,v  <--  FlagType.pm
new revision: 1.21; previous revision: 1.20
done
Checking in Bugzilla/Search.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Search.pm,v  <--  Search.pm
new revision: 1.106; previous revision: 1.105
done
Checking in Bugzilla/Token.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Token.pm,v  <--  Token.pm
new revision: 1.34; previous revision: 1.33
done
Checking in contrib/sendunsentbugmail.pl;
/cvsroot/mozilla/webtools/bugzilla/contrib/sendunsentbugmail.pl,v  <-- 
sendunsentbugmail.pl
new revision: 1.6; previous revision: 1.5
done
Checking in contrib/syncLDAP.pl;
/cvsroot/mozilla/webtools/bugzilla/contrib/syncLDAP.pl,v  <--  syncLDAP.pl
new revision: 1.4; previous revision: 1.3
done
Checking in template/en/default/global/help-header.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/global/help-header.html.tmpl,v
 <--  help-header.html.tmpl
new revision: 1.6; previous revision: 1.5
done
Checking in template/en/default/global/help.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/global/help.html.tmpl,v 
<--  help.html.tmpl
new revision: 1.4; previous revision: 1.3
done
Checking in template/en/default/search/search-advanced.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/search/search-advanced.html.tmpl,v
 <--  search-advanced.html.tmpl
new revision: 1.25; previous revision: 1.24
done
Comment 9 Max Kanat-Alexander 2006-02-12 17:39:27 PST
Added to the Bugzilla 2.22 Release Notes in bug 322960.

Note You need to log in before you can comment on or make changes to this bug.