You are here

function subscriptions_content_cron in Subscriptions 6

Same name and namespace in other branches
  1. 5.2 subscriptions_content.module \subscriptions_content_cron()
  2. 7 subscriptions_content.module \subscriptions_content_cron()
  3. 2.0.x subscriptions_content/subscriptions_content.module \subscriptions_content_cron()

Implementation of hook_cron().

Ensure that we're heavier than the taxonomy.module.

File

./subscriptions_content.module, line 1273
Subscriptions to content events

Code

function subscriptions_content_cron() {
  $result = db_query("SELECT name, weight FROM {system} WHERE name IN ('taxonomy', 'subscriptions_content') AND type = 'module'");
  while ($module = db_fetch_array($result)) {
    $weights[$module['name']] = $module['weight'];
  }
  if ($weights['subscriptions_content'] <= $weights['taxonomy']) {
    db_query("UPDATE {system} SET weight = %d WHERE name = 'subscriptions_content' AND type = 'module'", $weights['taxonomy'] + 1);
  }
}