Namespacing for Sub-modules
chawl - August 9, 2009 - 16:07
| Project: | Spam |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | gnassar |
| Status: | active |
Jump to:
Description
Hello,
Spam module's Custom Filter gets mixed up with "Custom Filter" module on module configuration page due to naming conflict. Therefore native Custom Filter module's entry disappears when two of the modules are present.
How about renaming yours to "Spam Custom Filters"?
Tx.

#1
Yes, somewhere there is an issue to properly name space the spam filter modules -- this will be happening after the 6.x-1.0 stable release (which should be next week). This issue should be marked as a duplicate of that issue -- and a link to that issue should be placed here.
#2
#361547: How to set the maximum number of URLs? has discussion about this problem, but it's not actually devoted to this issue. Perhaps this one should me made more general?
#3
Yes. None of the issues that mention this actually have this as their primary purpose.
Right now, it's looking like this will wait until after the final 1.0 release.
#4
I don't see any menu definition that could interfere with Custom filter. May anybody point me at which menu causes the conflict?
#5
In the development snapshot, the sub-modules are still incorrectly named; the short name of those modules should start with .
This is also true for version 6.x-1.0.
The long name of a module is the same of another module (Custom filter); to avoid confusions, it should be renamed.
#6
Ok, I've namespaced all the modules, and it appears to be working fine. I've tried to break it and haven't managed so far. A few questions:
There are a few functions that were inconsitently named, like custom_spam_filter() and custom_spam_custom_operations() (!). Should these be renamed spam_custom_filter() or spam_custom_spam_filter()? Should custom_spam_custom_operations() be reduced to spam_custom_operations()?
There are some database variables like bayesian_tokenizer and custom_probably. I'm not entirely sure how to upgrade these. Help would be appreciated.
Filters will have to be re-enabled, unless there's a way to upgrade the filter status (this might be best avoided, we're doing this for name clashes, and it'd be a bit bad to break a different name-clashed module).