You are here

function elysia_cron_install in Elysia Cron 7

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

Implementation of hook_install().

File

./elysia_cron.install, line 120

Code

function elysia_cron_install() {

  //drupal_install_schema('elysia_cron');

  // elysia_cron MUST be the first returned by module_list
  // This is to ensure elysia_cron_cron is the first hook called by standard cron.php.
  $min = db_query("select min(weight) from {system}")
    ->fetchField();
  if ($min > -65535) {
    $min = -65535;
  }
  else {
    $min--;
  }
  db_update('system')
    ->fields(array(
    'weight' => $min,
  ))
    ->condition('name', 'elysia_cron')
    ->execute();
  variable_set('elysia_cron_version', elysia_cron_version());
  drupal_set_message('Elysia cron installed. Setup could be found at ' . l(t('Settings page'), 'admin/config/system/cron') . '. See INSTALL.TXT for more info.');
}