Closed Bug 272623 Opened 20 years ago Closed 20 years ago

FindWrapPoint is misplaced in process_bug.cgi

Categories

(Bugzilla :: Creating/Changing Bugs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.20

People

(Reporter: kiko, Assigned: LpSolit)

Details

Attachments

(1 file, 2 obsolete files)

The function FindWrapPoint is misplaced in process_bug.cgi -- LogActivityEntry
in CGI.pl requires it.
Attached patch kiko_v1: obvious (obsolete) — Splinter Review
Attachment #167567 - Flags: review?(justdave)
Comment on attachment 167567 [details] [diff] [review]
kiko_v1: obvious

hmmm...  yeah, I guess so.  I hate to add things to CGI.pl, since we're trying
to get rid of it, but I can't think of a more appropriate place at the moment. 
Perhaps Bug.pm or Bug/Activity.pm or something similar that doesn't exist yet.
:)
Attachment #167567 - Flags: review?(justdave) → review+
Comment on attachment 167567 [details] [diff] [review]
kiko_v1: obvious

Put it in Bugzilla::Util, now that we have that. :-)
Attachment #167567 - Flags: review-
Status: NEW → ASSIGNED
Flags: blocking2.20?
Target Milestone: --- → Bugzilla 2.20
Attached patch patch, v2 (obsolete) — Splinter Review
Move FindWrapPoint to Util.pm and rename it to find_wrap_point.
Assignee: kiko → LpSolit
Attachment #167567 - Attachment is obsolete: true
Attachment #180876 - Flags: review?(mkanat)
Comment on attachment 180876 [details] [diff] [review]
patch, v2

Looks good, but a few points:

The POD docs should specify that it actually starts searching at the end of the
string, for a position to wrap from.

And from the caller's perspective, I think $startpos is a confusing variable
name, because it sounds like where we are starting a *forward* search of the
string. Maybe $line_length or something like that, instead?

Finally, that 254 in CGI.pl should become a constant instead of a raw number,
while we're hitting that line anyway.
Attachment #180876 - Flags: review?(mkanat) → review-
Attached patch patch, v3Splinter Review
fix all mkanat' comments.
Attachment #180876 - Attachment is obsolete: true
Attachment #180928 - Flags: review?(mkanat)
Comment on attachment 180928 [details] [diff] [review]
patch, v3

OK, but MAX_LINE_LENGTH needs a comment explaining what it is and where it's
used, and the POD docs need to explain what the function returns. (Right now,
it sounds like it returns a split string, which isn't true.)
Attachment #180928 - Flags: review?(mkanat) → review+
POD docs in Util.pm are already there. And I won't add anything more than a
small comment in CGI.pl as this file will soon disappear. I will add the comment
on checkin.
Flags: approval?
OS: Linux → All
Hardware: PC → All
(In reply to comment #8)
> POD docs in Util.pm are already there. And I won't add anything more than a
> small comment in CGI.pl as this file will soon disappear. I will add the comment
> on checkin.

  Yeah, it's going away, but when we move the constant the comment will be moved
with it.
Flags: approval? → approval+
Checking in CGI.pl;
/cvsroot/mozilla/webtools/bugzilla/CGI.pl,v  <--  CGI.pl
new revision: 1.240; previous revision: 1.239
done
Checking in process_bug.cgi;
/cvsroot/mozilla/webtools/bugzilla/process_bug.cgi,v  <--  process_bug.cgi
new revision: 1.251; previous revision: 1.250
done
Checking in Bugzilla/Util.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Util.pm,v  <--  Util.pm
new revision: 1.24; previous revision: 1.23
done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Flags: blocking2.20?
Resolution: --- → FIXED
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: