Closed (fixed)
Project:
CVS integration
Version:
4.7.x-2.0
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
15 Nov 2006 at 16:15 UTC
Updated:
5 Dec 2006 at 01:45 UTC
Jump to comment: Most recent file
Comments
Comment #1
AjK commentedAs dww pointed out in my other patch, this is against the wrong branch. I will reroll the patch later and then mark it for review.
Comment #2
AjK commentedOK, here's the patch re-rolled for DRUPAL-4-7--2 (the branch d.o uses)
Comment #3
AjK commented*sigh* missed t() on the status strings
Comment #4
dww- syntax error on line 2225 ;)
- code style needs work (bad indentation in cvs_get_status())
- a comment at the top of the define()'s for the status values to remind people to update cvs_get_status() would be nice
Comment #5
dwwfaster for me to just fix this myself than go through another patch/review. ;)
commited to DRUPAL-4-7--2 as revision 1.106.2.19.2.27 and installed on d.o.
nice UI improvements, thanks!
-derek
Comment #6
Zen commentedFollowing a visual browse of the committed patch:
Thanks,
-K
Comment #7
Zen commentedIt would also be nice to wrap the filter in a container-inline style.
um, and please ignore my comment on "why are they not in the array block above #action".. I was on drugs at the time.
-K
Comment #8
dwwthanks, zen. ;) that's what i get for reviewing patches at 4:30am. ;)
i noticed the SQL formatting, but honestly:
a) this isn't core
b) i find a little whitespace goes a long way in helping readability.
so, that's why i let is slide. i'm ok with doing it either way, personally.
otherwise, yeah, everything Zen addressed should be fixed. sorry for being hasty. please roll a new patch against the end of DRUPAL-4-7--2 (since i already committed), instead of re-rolling the patch from #3.
thanks!
-derek
Comment #9
AjK commentedI'm away on business at the moment so I'll do this at the weekend
Comment #10
AjK commentedThe attached patch addresses Zen's comments in #6 above. However, it doesn't address them all. Those I had problems with I'll note here, feedback would be welcome:-
When adding the filter code I just copied the way watchdog.module did it. It used a #action so I just used it (amended to use the correct url). However, after testing you're correct, a #action is not required. Should it therefore be removed from watchdog.module (er, which is Core and I use Core as a good example to follow?)
Regarding the #submit. You are correct. 4.7 fAPI uses the form_id with the appended _submit as the function name for the standard submit function. However, 4.7 and beyond API allow for additional submit functions to be called using the syntax I used. However, it wasn't required to do it that way so I changed it to use the "normal" method.
Regarding the "multiline SQL". I know it's Drupal standard to do everything on one line. I like the Drupal standards with this being the one exception. If it's simple SQL one line is good. But when the SQL aquires a degree on complexity the additional whitespace often helps in readability (my personal opinion). However, for the sake of Drupal coding standards I have made it one line.
I've also wrapped it in an isset() to ensure that if the session variable isn't set then the pager_query() isn't passed a none existent variable.
Regarding the SQL plus concat. The value being "concat" in this case is $where. This variable itself contains the %d taken for the filter value. If you can tell me how to pass a string variable to pager_query() with an embedded integer %d value (and be sure the preg_match_replace() function used in db_query() spots the %d buried in a %s) then I'm up for changing it and will follow advice on that (as I can't see how to do it, but the dynamic $where is required to apply the filter).
Probably not, but it's there to ensure we don't return an "out of scope" value which imho is just as bad as passing an unset var to a function (as in your point regarding the session var possibly being passed to pager_query() when it may not exist). "Belt and braces" sort of thing.
regards,
--AjK
Comment #11
AjK commentedI missed/added these points:-
Comment #12
Zen commentedCommitted along with the following additional fixes:
Cheers,
-K
Comment #13
dwwcool, patch looks good. thanks for the updated patch, ajk, and for the careful reviews, zen.
updated the code on d.o to the latest in DRUPAL-4-7--2 branch.
cheers,
-derek
Comment #14
AjK commentedso I nearly got it right ;)
Comment #15
(not verified) commented