So many people are erroneously using Activity 4.x that there seems to be a need to let them know that they shouldn't. Some revision of facebook_status_activity_version() should also be added to an update in the install file to alert people who are already using Activity 4.x.

/**
 * Implementation of hook_enable().
 */
function facebook_status_enable() {
  $version = facebook_status_activity_version();
  if ($version == 4) {
    drupal_set_message(t('The Facebook-style Statuses module is not compatible with Activity 4.x yet!  Please use Activity 3.x.'), 'error');
  }
}

/**
 * Returns the Activity.module version.
 * @return
 *   The integer 3 or 4.
 */
function facebook_status_activity_version() {
  $files = module_rebuild_cache();
  uasort($files, 'system_sort_modules_by_info_name');
  foreach ($files as $file) {
    if ($file->info['name'] == 'Activity') {
      return drupal_substr($file->info['version'], 4, 1);
    }
  }
}

Comments

icecreamyou’s picture

Status: Needs review » Closed (fixed)

I've decided fielding ignorant bug reports is better than bloating the module with checks for user errors.