function background_process_set_process in Background Process 6
Same name and namespace in other branches
- 8 background_process.module \background_process_set_process()
- 7 background_process.module \background_process_set_process()
Set background process
@global object $user Current logged in user
Parameters
$handle: Handle of background process
$callback: Function of background process
Return value
boolean TRUE if set, FALSE if not
2 calls to background_process_set_process()
File
- ./
background_process.module, line 673
Code
function background_process_set_process($handle, $callback, $uid, $args, $token) {
// Setup parameters
$args = serialize($args);
$callback = serialize($callback);
// Get user
if (!isset($uid)) {
global $user;
$uid = $user->uid;
}
db_query("UPDATE {background_process} SET callback = '%s', args = '%s', uid = %d, token = '%s' WHERE handle = '%s'", $callback, $args, $uid, $token, $handle);
$result = db_affected_rows();
return $result;
}