# TODO SQL Transactions with rollback function if something went wrong in the middle of bulk action $massopsenabled = 0; # 20150305 disabled for 1.0 release until proper checks are done if ($massopsenabled == 1) { // TODO: Log events in a later version. if (Post::val('updateselectedtasks') == "true") { //process quick actions switch (Post::val('bulk_quick_action')) { case 'bulk_take_ownership': Backend::assign_to_me(Post::val('user_id'), Post::val('ids')); break; case 'bulk_start_watching': Backend::add_notification(Post::val('user_id'), Post::val('ids')); break; case 'bulk_stop_watching': Backend::remove_notification(Post::val('user_id'), Post::val('ids')); break; } //Process the tasks. $columns = array(); $values = array(); //determine the tasks properties that have been modified. if (!Post::val('bulk_status') == 0) { array_push($columns, 'item_status'); array_push($values, Post::val('bulk_status')); } if (!Post::val('bulk_percent_complete') == 0) { array_push($columns, 'percent_complete'); array_push($values, Post::val('bulk_percent_complete')); } if (!Post::val('bulk_task_type') == 0) {
function action_remove_notification() { Backend::remove_notification(Req::val('user_id'), Req::val('ids')); return array(SUBMIT_OK, L('notifyremoved')); }
$userId = Flyspray::UserNameToId(Req::val('user_name')); } if (!Backend::add_notification($userId, Req::val('ids'))) { Flyspray::show_error(L('couldnotaddusernotif')); break; } $_SESSION['SUCCESS'] = L('notifyadded'); break; // ################## // removing a notification entry // ################## // ################## // removing a notification entry // ################## case 'remove_notification': Backend::remove_notification(Req::val('user_id'), Req::val('ids')); $_SESSION['SUCCESS'] = L('notifyremoved'); break; // ################## // editing a comment // ################## // ################## // editing a comment // ################## case 'editcomment': if (!($user->perms('edit_comments') || $user->perms('edit_own_comments'))) { break; } $where = ''; $params = array(Post::val('comment_text'), time(), Post::val('comment_id'), $task['task_id']); if ($user->perms('edit_own_comments') && !$user->perms('edit_comments')) {