Index: autotimezone.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/autotimezone/autotimezone.module,v
retrieving revision 1.5
diff -F^f -u -u -F^f -r1.5 autotimezone.module
--- autotimezone.module 23 Apr 2006 02:39:12 -0000 1.5
+++ autotimezone.module 1 May 2006 02:19:18 -0000
@@ -7,28 +7,6 @@
*/
/**
- * Implementation of hook_init().
- */
-function autotimezone_init() {
- if (!function_exists('throttle_status') || !throttle_status()) { //Only do stuff if the throttle is off.
- $javascript = '\n";
- global $user;
- //If only_update_new is enabled then make sure the user->timezone matches default.
- if (!variable_get('autotimezone_only_update_new', 0) or $user->timezone == variable_get('date_default_timezone', 0)) {
- $max = 100 / variable_get('autotimezone_update_percent', 25);
- if ($max == 1 or rand(1, $max) == 1) {
- drupal_set_html_head($javascript);
- }
- }
- }
-}
-
-/**
* Implementation of hook_help().
*/
function autotimezone_help($section) {
@@ -49,6 +27,24 @@ function autotimezone_menu($may_cache) {
'access' => TRUE,
'type' => MENU_CALLBACK);
}
+ else {
+ if (!function_exists('throttle_status') || !throttle_status()) {
+ $javascript = '\n";
+ global $user;
+ //If only_update_new is enabled then make sure the user->timezone matches default.
+ if (!variable_get('autotimezone_only_update_new', 0) or $user->timezone == variable_get('date_default_timezone', 0)) {
+ $max = 100 / variable_get('autotimezone_update_percent', 25);
+ if ($max == 1 or rand(1, $max) == 1) {
+ drupal_set_html_head($javascript);
+ }
+ }
+ }
+ }
return $items;
}