You are here

function elysia_cron_help in Elysia Cron 7

Same name and namespace in other branches
  1. 5.2 elysia_cron.module \elysia_cron_help()
  2. 5 elysia_cron.module \elysia_cron_help()
  3. 6.2 elysia_cron.module \elysia_cron_help()
  4. 6 elysia_cron.module \elysia_cron_help()
  5. 7.2 elysia_cron.module \elysia_cron_help()

I use help section for admin/build/modules page to check if elysia_cron is the module with the smallest weight. If it's not i'll set it and print a message

File

./elysia_cron.module, line 176

Code

function elysia_cron_help($section, $arg = false) {
  if ($section == _dcf_internal_path('admin/modules')) {
    $min = drupal_module_get_min_weight('elysia_cron');
    $weight = drupal_module_get_weight('elysia_cron');
    if ($min <= $weight) {
      drupal_set_message(t('Elysia cron module is not the module with the smallest weight (and it must be). Updating weight...'));
      drupal_module_set_weight('elysia_cron', $min - 1);
    }
  }
}