Closed (fixed)
Project:
Project
Version:
5.x-1.x-dev
Component:
Projects
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
28 Aug 2007 at 18:46 UTC
Updated:
26 Sep 2007 at 23:31 UTC
Jump to comment: Most recent file
I was working on #165380 trying to use project_build_query() rather than adding a new query builder function. I think it'd be much more usable if there was a function to build you an empty query array.
This also adds some PHPDocs.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | project_build_query_0.patch | 4.54 KB | drewish |
| project_build_query.patch | 4.54 KB | drewish |
Comments
Comment #1
aclight commentedYou've got a minor typo in one of the comments (each is there twice):
Comment #2
nedjo+1, looks good.
Comment #3
drewish commentedthis fixes the comment issue aclight noticed.
my only question is, is project_empty_query() the best name? perhaps project_build_empty_query() or project_get_empty_query()?
Comment #4
hunmonk commentedthe abstraction seems like a decent idea -- however, given that we're going to move to using views, and this code is most likely going to be ripped out anyways, what is this really buying us in the near term? if it's just a few saved lines of code, i'm not sure i'm convinced.
Comment #5
drewish commentedthe views migration is going to be a huge amount of work and probably end up being a separate branch. i don't want to call it vapor ware, but until someone's actually working on it i don't think it should be a reason not to make improvements in the current code. the reason for this change is so that i can re-use the code in project_usage. if we don't add this then i end up copying that block of code and pasting it into project_usage.
Comment #6
hunmonk commentedtrue, but your pasted block will get ripped out with all of other other project* query building crap when views lands, so i don't see it as that big of a deal -- i'd prefer that instead of creating more code divergence amongst the project* branches.
dww will have to weigh in for us to reach a final decision here.
Comment #7
drewish commentedso now that dww's back maybe we can get him to weigh in on this...
Comment #8
dwwViews support isn't exactly vaporware (I do have a project_issue_views.inc started somewhere), but I agree in reality, it's at least weeks, if not months away from being done and installed on d.o. So, while I don't want to invest a bunch of effort into this query building code in general, I'm happy to see small, incremental improvements like this, especially if it reduces code duplication. Therefore, I committed patch from #3 to HEAD after a review and moderate testing on a local site. Sorry for the delay.
Comment #9
drewish commentedthanks dww, it's good to have you back.
Comment #10
(not verified) commented