You are here

function heartbeat_modules_enabled in Heartbeat 7

Implements hook_modules_enabled($modules).

File

./heartbeat.module, line 776
Module file for heartbeat activity. Basic hook implementations and helper functions will be found here.

Code

function heartbeat_modules_enabled($modules) {

  // Add the heartbeat in_group field if it does not exist yet.
  if (in_array('og', $modules) && db_table_exists('og')) {
    db_query("UPDATE {heartbeat_activity} SET in_group = 1 WHERE nid IN (SELECT DISTINCT etid FROM {og})");
    db_query("UPDATE {heartbeat_activity} SET in_group = 1 WHERE nid_target IN (SELECT DISTINCT etid FROM {og})");
  }
}