You are here

function feeds_update_6012 in Feeds 6

Same name and namespace in other branches
  1. 7 feeds.install \feeds_update_6012()

Drop schedule table install Job Scheduler module.

File

./feeds.install, line 554
Schema definitions install/update/uninstall hooks.

Code

function feeds_update_6012() {
  $ret = array();

  // Only attempt installation if module is present, otherwise we would leave
  // the system table in a limbo.
  $modules = module_rebuild_cache();
  if (isset($modules['job_scheduler'])) {
    if (!$modules['job_scheduler']->status) {
      drupal_install_modules(array(
        'job_scheduler',
      ));
      drupal_set_message(t('Installed Job Scheduler module.'));
    }
  }
  else {
    drupal_set_message(t('NOTE: Please install new dependency of Feeds: <a href="@job-scheduler-link">Job scheduler module</a>.', array(
      '@job-scheduler-link' => url('http://drupal.org/project/job_scheduler'),
    )), 'warning');
  }
  db_drop_table($ret, 'feeds_schedule');
  return $ret;
}