Active
Project:
Views arguments in filters (Sandbox)
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
17 May 2012 at 17:19 UTC
Updated:
14 Jun 2014 at 14:18 UTC
Jump to comment: Most recent
Hi,
I am wondering why it is that module does not make use of the argument that (a view object) that gets passed to functions implementing hook_views_query_substitutions()?
right now it looks like this:
/**
* Implements hook_views_query_substitutions().
*/
function argfilters_views_query_substitutions() {
// TODO: Chache this thing, so we don't have reload the view if it is already
// loaded. Alternatively, make sure that Views does this alreday (which is
// likely).
$view = views_get_current_view();
// Build the array of replacement patterns, but only if there is any arguments
// set.
$replacements = array();
when this will work as well:
/**
* Implements hook_views_query_substitutions().
*/
function argfilters_views_query_substitutions($view) {
// Build the array of replacement patterns, but only if there is any arguments
// set.
$replacements = array();
Is there anything that I am missing or is the reason for this related to caching?
Comments
Comment #1
itangalo commentedHi – thanks for the question, and sorry that it took so long to get back.
There is no great explanation of why the code looks the way it does – other than this was one of the first modules I wrote.
I am no longer visiting drupal.org every day, or every week, and cannot maintain this project in a good way. :-(
(If you are interested in maintaining this module, please write a comment here and send me a message on my contact page.)
Comment #2
geek-merlinYes i'm interested to maintain and extend this.
Comment #3
geek-merlinComment #4
ar-jan commentedI'll just add that this module is very useful, so it would be great to have more people working on it.
Comment #5
geek-merlin@ar-jan: i'm working on a rewrite-on-steroids, just wait a bit... ;-)