Closed (fixed)
Project:
Facebook-style Statuses (Microblog)
Version:
6.x-1.x-dev
Component:
Documentation
Priority:
Minor
Category:
Task
Assigned:
Reporter:
Created:
28 Jan 2009 at 23:31 UTC
Updated:
3 Feb 2009 at 22:15 UTC
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
Comment #1
icecreamyou commentedI've decided fielding ignorant bug reports is better than bloating the module with checks for user errors.