Пример #1
0
         // Nothing to do.
         break;
     }
     $validids = array();
     foreach ($_POST['message_id'] as $id) {
         if (is_numeric($id)) {
             if (settype($id, 'int') && $id > 0) {
                 $validids[] = $id;
             }
         }
     }
     if (!count($validids)) {
         // Nothing to do.
         break;
     }
     Notifications::NotificationsHaveBeenRead($validids);
     break;
 case 'task.bulkupdate':
     # TODO check if the user has the right to do each action on each task id he send with the form!
     # TODO check if tasks have open subtasks before closing
     # 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;