buddylistactivity.install in Activity 5.4
File
contrib/buddylistactivity/buddylistactivity.install
View source
<?php
function buddylistactivity_install() {
if (!module_exists('activity')) {
require_once drupal_get_path('module', 'activity') . '/activity.module';
}
activity_install_activity_defaults('buddylistactivity');
drupal_set_message(t('Activity integration with Buddylist module installed. Go to <a href="@settings">Buddylist Activity settings</a> to customize ', array(
'@settings' => url('admin/settings/activity/buddylistactivity'),
)));
}
function buddylistactivity_uninstall() {
if (module_exists('activityhistory')) {
db_query("DELETE FROM {activity_history} WHERE aid IN (SELECT aid FROM {activity} WHERE module = '%s')", 'buddylistactivity');
}
db_query("DELETE FROM {activity_targets} WHERE aid IN (SELECT aid FROM {activity} WHERE module = '%s')", 'buddylistactivity');
db_query("DELETE FROM {activity} WHERE module = '%s'", 'buddylistactivity');
$result = db_query("SELECT name FROM {variable} WHERE name LIKE 'buddylistactivity_%'");
while ($row = db_fetch_object($result)) {
variable_del($row->name);
}
}