Closed (fixed)
Project:
Sarnia
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
16 Feb 2017 at 16:48 UTC
Updated:
6 Apr 2017 at 19:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mparker17Here's a patch. Feedback welcome.
Comment #3
jmdeleon commentedTrying this out right now... I like :)
Comment #5
jmdeleon commentedHighly useful.
Comment #6
mparker17@jmdeleon, thanks!
***
For reasons I don't fully understand, my site has decided to start using the
SarniaViewsHandlerFilterclass inhandlers/handler_filter_date.incinstead of theSarniaViewsHandlerFilterclass in thehandlers/handler_filter.inc. I haven't made any changes to any other files in the Sarnia module; and I'm not even sure how the two classes (which have the same name AFAICT) can be loaded into the same namespace without conflicts, but it seems to be happening, and removingfiles[] = handlers/handler_filter_date.incfrom the .info file apparently causes missing/broken handler errors.Whatever the reason, it seems I also have to patch
handlers/handler_filter_date.incif I want token substitution to continue to work on my site. Here's another patch. Interdiff not necessary due to the fact that the previous code was committed.Comment #7
jmdeleon commented@mparker17: The situation with the duplicate classes is definitely curious.
handler_filter_date.inc only overrides the function admin_summary() that isn't already in handler_filter.inc, which might be the cause of the broken/missing handler errors when removing handler_filter_date.inc from sarnia.info
So I copied the admin_summary() function to handler_filter.inc and was able to remove handler_filter_date.inc completely without any broken/missing handler errors, while still incorporating your new token support.
Attaching a patch here.
Comment #8
jmdeleon commentedUpdated the patch in #7 slightly to apply a bit more cleanly.
Comment #11
jmdeleon commentedComment #12
mparker17Updating issue summary.
Comment #13
mparker17