incompatible with page cache
moshe weitzman - May 1, 2006 - 02:29
| Project: | Auto Time Zone |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
autotimezone uses hook_init() for putting js into the page. Thats OK, but it runs even for cached pages and in that case, url() is not available yet. The attached patch moves all processing to hook_menu(!$may_cache) so is a performance improvement (runs only on non cached pages) fixes this bug.
If you wanted to clean up further, use addLoadEvent() as per http://drupal.org/node/22218#hook_onload. Your js function would presumably request an image or inject a stylesheet via the DOM.
| Attachment | Size |
|---|---|
| patch_38 | 2.47 KB |

#1
applied patch so that large sites can use this module
#2
Cool.
#3