Commit 72e55192 authored by Martyn Smith's avatar Martyn Smith Committed by Martyn Smith
Browse files

Fixed undefined variable, removed seemingly pointless "delay" stuff from

notifications
parent b20e34e1
......@@ -38,16 +38,16 @@ function activity_occurred($activitytype, $data) {
throw new Exception("Invalid activity type $activitytype");
}
if (!empty($at->delay)) {
$delayed = new StdClass;
$delayed->type = $activitytype;
$delayed->data = serialize($data);
$delayed->ctime = db_format_timestamp(time());
insert_record('activity_queue', $delayed);
}
else {
//if (!empty($at->delay)) {
// $delayed = new StdClass;
// $delayed->type = $activitytype;
// $delayed->data = serialize($data);
// $delayed->ctime = db_format_timestamp(time());
// insert_record('activity_queue', $delayed);
//}
//else {
handle_activity($at, $data);
}
//}
}
/**
......@@ -364,6 +364,7 @@ function handle_activity($activitytype, $data) {
$user->method = 'internal';
}
if ($user->method != 'internal') {
$method = $user->method;
safe_require('notification', $method, 'lib.php', 'require_once');
call_static_method(generate_class_name('notification', $method), 'notify_user', $user, $userdata);
$user->markasread = true; // if we're doing something else, don't generate unread internal ones.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment