Closed Bug 313531 Opened 19 years ago Closed 18 years ago

Move 'use Bugzilla;' out of globals.pl

Categories

(Bugzilla :: Bugzilla-General, enhancement)

2.21
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: LpSolit, Assigned: LpSolit)

References

Details

Attachments

(1 file)

.cgi scripts should call 'use Bugzilla;' themselves.
Bugzilla.pm cannot be used (use Bugzilla) in checksetup.pl, and mkanat said this wasn't so easy to fix. So I decided to kindly let him fix this one. :-p

Thanks Max! :-D
Assignee: LpSolit → mkanat
Target Milestone: Bugzilla 2.22 → Bugzilla 2.24
Thanks to bug 328642, we can safely remove 'use Bugzilla;' from globals.pl, right? I mean it's not a problem with checksetup.pl anymore?

Then we only have to fix the remaining scripts which are still not using Bugzilla.pm explicitly:

grep -L 'use Bugzilla;' *.cgi *.pl
editparams.cgi
editversions.cgi
editwhines.cgi
index.cgi
query.cgi
quips.cgi
sanitycheck.cgi
sidebar.cgi
testagent.cgi
checksetup.pl
customfield.pl
runtests.pl
testserver.pl
whine.pl
(In reply to comment #2)
> Thanks to bug 328642, we can safely remove 'use Bugzilla;' from globals.pl,
> right? I mean it's not a problem with checksetup.pl anymore?

 Yeah, checksetup.pl now uses Bugzilla directly, so we're fine.
Attached patch patch, v1Splinter Review
A pretty easy one. I also removed all non-Bugzilla modules from globals.pl.
Assignee: mkanat → LpSolit
Status: NEW → ASSIGNED
Attachment #226244 - Flags: review?(mkanat)
Blocks: 341454
Comment on attachment 226244 [details] [diff] [review]
patch, v1

Yeah, looks right to me.

That "use strict" should actually be at the *top* of testserver.pl, though (above the BEGIN block). I'm not sure how we got away with that before.
Attachment #226244 - Flags: review?(mkanat) → review+
Flags: approval?
Flags: approval? → approval+
Checking in buglist.cgi;
/cvsroot/mozilla/webtools/bugzilla/buglist.cgi,v  <--  buglist.cgi
new revision: 1.334; previous revision: 1.333
done
Checking in customfield.pl;
/cvsroot/mozilla/webtools/bugzilla/customfield.pl,v  <--  customfield.pl
new revision: 1.4; previous revision: 1.3
done
Checking in editparams.cgi;
/cvsroot/mozilla/webtools/bugzilla/editparams.cgi,v  <--  editparams.cgi
new revision: 1.35; previous revision: 1.34
done
Checking in editversions.cgi;
/cvsroot/mozilla/webtools/bugzilla/editversions.cgi,v  <--  editversions.cgi
new revision: 1.49; previous revision: 1.48
done
Checking in editwhines.cgi;
/cvsroot/mozilla/webtools/bugzilla/editwhines.cgi,v  <--  editwhines.cgi
new revision: 1.14; previous revision: 1.13
done
Checking in globals.pl;
/cvsroot/mozilla/webtools/bugzilla/globals.pl,v  <--  globals.pl
new revision: 1.374; previous revision: 1.373
done
Checking in index.cgi;
/cvsroot/mozilla/webtools/bugzilla/index.cgi,v  <--  index.cgi
new revision: 1.19; previous revision: 1.18
done
Checking in query.cgi;
/cvsroot/mozilla/webtools/bugzilla/query.cgi,v  <--  query.cgi
new revision: 1.164; previous revision: 1.163
done
Checking in quips.cgi;
/cvsroot/mozilla/webtools/bugzilla/quips.cgi,v  <--  quips.cgi
new revision: 1.33; previous revision: 1.32
done
Checking in sanitycheck.cgi;
/cvsroot/mozilla/webtools/bugzilla/sanitycheck.cgi,v  <--  sanitycheck.cgi
new revision: 1.115; previous revision: 1.114
done
Checking in sidebar.cgi;
/cvsroot/mozilla/webtools/bugzilla/sidebar.cgi,v  <--  sidebar.cgi
new revision: 1.17; previous revision: 1.16
done
Checking in testserver.pl;
/cvsroot/mozilla/webtools/bugzilla/testserver.pl,v  <--  testserver.pl
new revision: 1.11; previous revision: 1.10
done
Checking in whine.pl;
/cvsroot/mozilla/webtools/bugzilla/whine.pl,v  <--  whine.pl
new revision: 1.26; previous revision: 1.25
done
Checking in Bugzilla/Chart.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Chart.pm,v  <--  Chart.pm
new revision: 1.12; previous revision: 1.11
done
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: