function ad_modules_enabled in Advertisement 7.3
Implements hook_modules_enabled().
File
- ./
ad.install, line 45 - Installation file for the ad module.
Code
function ad_modules_enabled($modules) {
// Convert the "url" and "referrer" fields to TEXT to accommodate longer URLs.
// We perform this after "hook_modules_enabled()" has run, because this is the
// event that triggers base table creation by ECK via Features.
if (in_array('ad', $modules) && db_table_exists('eck_tracked_event')) {
$spec = array(
'description' => 'Text',
'type' => 'text',
'not null' => TRUE,
);
foreach ([
'url',
'referrer',
'user_agent',
'page_title',
] as $field) {
db_change_field('eck_tracked_event', $field, $field, $spec);
}
}
}