function activity_insert in Activity 5.2
Same name and namespace in other branches
- 5.4 activity.module \activity_insert()
- 5 activity.module \activity_insert()
- 5.3 activity.module \activity_insert()
- 6 activity.module \activity_insert()
function that does all the recording
6 calls to activity_insert()
- ActivityAPITest::testGetActivity in tests/
ActivityAPITests.test - Test activity_get_activity Assert that function can take an array of arbitrary uids or NULL Can take an optional array of module names to filter the results Takes a pager parameter Support HTML tables with tablesort query additions Should always…
- ActivityAPITest::testInsertActivity in tests/
ActivityAPITests.test - ability to pass in user or null when null global user should be used. the return value should be 1 greater than the previous greatest activity.
- buddylistactivity_buddylist in contrib/
buddylistactivity.module - Implementation of hook_buddylist_api()
- nodeactivity_nodeapi in contrib/
nodeactivity.module - Implementation of hook_nodeapi()
- views_bookmarkactivity_views_bookmark_api in contrib/
views_bookmarkactivity.module - Implementation of hook_views_bookmark_api()
File
- ./
activity.module, line 369 - Activity module: Allow users to see their friends' activity on the site.
Code
function activity_insert($module, $type, $action, $tokens) {
global $user;
$aid = db_next_id('activity');
db_query("INSERT INTO {activity} VALUES (%d, %d, '%s', '%s', '%s', '%s', %d)", $aid, $user->uid, $module, $type, $action, serialize($tokens), time());
}