function comment_alter_comment_load in Comment Alter 7
Same name and namespace in other branches
- 8 comment_alter.module \comment_alter_comment_load()
Implements hook_comment_load().
File
- ./
comment_alter.module, line 413 - Provides UI to alter nodes' parameters from comment forms.
Code
function comment_alter_comment_load($comments) {
$result = db_select('comment_alter', 'ca')
->fields('ca', array(
'cid',
'old_vid',
'new_vid',
))
->condition('cid', array_keys($comments), 'IN')
->execute();
foreach ($result as $row) {
$comments[$row->cid]->comment_alter['old_vid'] = $row->old_vid;
$comments[$row->cid]->comment_alter['new_vid'] = $row->new_vid;
}
}