function comment_list_activity_actions in Activity 6.2
List all the Activity Actions that match the hook and op.
Parameters
string $hook: The hook that is to be fired.
string $op: The op to be used in the hook.
int $max_age:
Return value
array An array of arrays with 'id', 'created' and 'actor' keys.
1 string reference to 'comment_list_activity_actions'
File
- modules/
comment.activity.inc, line 106 - Activity definition file for comment.module
Code
function comment_list_activity_actions($hook, $op, $max_age) {
$actions = array();
if (!empty($max_age)) {
$min_time = time() - $max_age;
}
else {
$min_time = 0;
}
if ($op == 'insert') {
$sql = 'SELECT cid as id, timestamp as created, uid as actor FROM {comments} WHERE timestamp > %d';
}
if (isset($sql)) {
$result = db_query($sql, $min_time);
while ($row = db_fetch_array($result)) {
$actions[] = $row;
}
}
return $actions;
}