I'm a little confused about whether the content_reference_filter module is actually required for the userreference_filter module. In the module description is says it is; in the .info file it says it will only call functions if the module is enabled. Can this be simplified and standardized?

Comments

rdeboer’s picture

To me, the .info file is about programmatic dependencies. So if a module calls a function in another module, then that module needs to be listed or a runtime error may occur. userreference_filter does not have such programmatic dependencies -- you won't get errors when you disable content_reference_filter, while leaving userreference_filter enabled.

However without content_reference_filter enabled, while not producing errors, userreference_filter won't be able to do anything useful either. That's the functional dependency referred to in the project page description.

I agree, this may come across as a grey area, to say the least. I could force a uniform dependency of the programmatic and functional aspects by listing content_reference_filter in the .info file. But that also means you'll end up with a two-step disable procedure.... plus I'm bound to get PHP programmers complaining that the .info file declares (programmatic) dependencies that strictly speaking aren't there....

Does that explain things?

Either way, hope you enjoy the module.

rdeboer’s picture

Status: Active » Closed (works as designed)
roball’s picture

Version: 6.x-1.0-beta1 » 6.x-1.1
Status: Closed (works as designed) » Active

I also find this confusing and would vote for adding the dependency in the .info file, even when no error would arise when the core module ("Content Reference Filter") isn't enabled. If you allow users to only enable "Node Reference Filter" or "User Reference Filter" without enabling "Content Reference Filter" you are saying that won't do anything useful. IMO that does not make sense then. If you don't want to add the requirement in dependencies[], then you should at least mention it in description.

Or, maybe even better, drop the Content Reference Filter module at all and use its code as an .inc file.

rdeboer’s picture

Status: Active » Closed (won't fix)

As of 1-Jan-2012, I'm only doing minimal maintenance on this module and since this is not a bug fix or feature request, I'm closing it.