Closed
Bug 338796
Opened 18 years ago
Closed 18 years ago
Remove get_product_* from globals.pl
Categories
(Bugzilla :: Bugzilla-General, enhancement)
Tracking
()
RESOLVED
FIXED
Bugzilla 3.0
People
(Reporter: LpSolit, Assigned: LpSolit)
References
Details
Attachments
(1 file, 1 obsolete file)
24.78 KB,
patch
|
wicked
:
review+
|
Details | Diff | Splinter Review |
We should use Bugzilla::Product objects now.
Assignee | ||
Updated•18 years ago
|
Assignee: general → LpSolit
Assignee | ||
Comment 1•18 years ago
|
||
It's impressive the cleanup we can do in enter_bug.cgi when working with a product object only. :) Note that I didn't remove $vars->{'version'} and $vars->{'target_milestone'} because they would require some more work (which is not the topic of this bug). The reason I removed $vars->{'component_'} is because it was trivial to do. :)
Attachment #225747 -
Flags: review?(wicked+bz)
Assignee | ||
Updated•18 years ago
|
Attachment #225747 -
Flags: review?(ghendricks)
Assignee | ||
Updated•18 years ago
|
Status: NEW → ASSIGNED
Comment 2•18 years ago
|
||
Comment on attachment 225747 [details] [diff] [review] patch, v1 Cool, nice cleanup. I love objects. Just fix following non-nits before commit. >Index: editflagtypes.cgi >=================================================================== >+ $products{$product_id} ||= new Bugzilla::Product($product_id); >+ $product_name = $products{$product_id}->name; Nit: What if product doesn't exist anymore? Write $product_name = $products{$product_id}->name if $products{$product_id}; instead. Bonus points for fixing this in the next block doing same for component. >- next if ($component_id >+ return unless scalar(@match); Are you sure? :) I wouldn't be so s/return/next/ >Index: enter_bug.cgi >=================================================================== >+$user->can_enter_product($product ? $product->name : undef, THROW_ERROR); Not undef but rather $product_name so we get same error as before.
Attachment #225747 -
Flags: review?(wicked+bz) → review+
Updated•18 years ago
|
Flags: approval?
Updated•18 years ago
|
Attachment #225747 -
Flags: review?(ghendricks)
Assignee | ||
Comment 3•18 years ago
|
||
comments fixed.
Attachment #225747 -
Attachment is obsolete: true
Attachment #225982 -
Flags: review+
Updated•18 years ago
|
Flags: approval? → approval+
Assignee | ||
Comment 4•18 years ago
|
||
Checking in collectstats.pl; /cvsroot/mozilla/webtools/bugzilla/collectstats.pl,v <-- collectstats.pl new revision: 1.50; previous revision: 1.49 done Checking in duplicates.cgi; /cvsroot/mozilla/webtools/bugzilla/duplicates.cgi,v <-- duplicates.cgi new revision: 1.53; previous revision: 1.52 done Checking in editflagtypes.cgi; /cvsroot/mozilla/webtools/bugzilla/editflagtypes.cgi,v <-- editflagtypes.cgi new revision: 1.37; previous revision: 1.36 done Checking in editgroups.cgi; /cvsroot/mozilla/webtools/bugzilla/editgroups.cgi,v <-- editgroups.cgi new revision: 1.71; previous revision: 1.70 done Checking in enter_bug.cgi; /cvsroot/mozilla/webtools/bugzilla/enter_bug.cgi,v <-- enter_bug.cgi new revision: 1.135; previous revision: 1.134 done Checking in globals.pl; /cvsroot/mozilla/webtools/bugzilla/globals.pl,v <-- globals.pl new revision: 1.370; previous revision: 1.369 done Checking in process_bug.cgi; /cvsroot/mozilla/webtools/bugzilla/process_bug.cgi,v <-- process_bug.cgi new revision: 1.324; previous revision: 1.323 done Checking in Bugzilla/BugMail.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/BugMail.pm,v <-- BugMail.pm new revision: 1.78; previous revision: 1.77 done Checking in template/en/default/bug/create/create-guided.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/bug/create/create-guided.html.tmpl,v <-- create-guided.html.tmpl new revision: 1.31; previous revision: 1.30 done Checking in template/en/default/bug/create/create.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/bug/create/create.html.tmpl,v <-- create.html.tmpl new revision: 1.59; previous revision: 1.58 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.
Description
•