It is my belief that when you call hook_views_query_substitutions, you should have available the string of the query as it is seen so far. That way, you can make intelligent decisions about what to change.

I am submitting a one-line fix: I added $view->query = $info['query']; just before the hook is invoked. I hope this is a friendly change.

CommentFileSizeAuthor
queryavailable.patch809 bytesAnonymous (not verified)

Comments

merlinofchaos’s picture

I will do this after 1.6 real -- I don't want to endanger that actually being released as a non-beta.

sun’s picture

Status: Reviewed & tested by the community » Needs work

Patch no longer applies. Please re-roll.

mroswell’s picture

Title: hook_views_query_substitutions should have the query abailable » hook_views_query_substitutions should have the query available

title spelling fix

esmerel’s picture

Status: Needs work » Closed (won't fix)

No patch submitted.