예제 #1
0
         $db->Query("DELETE from {attachments} WHERE attachment_id = ?", array($attachment['attachment_id']));
         @unlink(BASEDIR . '/attachments/' . $attachment['file_name']);
         Flyspray::logEvent($attachment['task_id'], 8, $attachment['orig_name']);
     }
     $_SESSION['SUCCESS'] = L('commentdeletedmsg');
     break;
     // ##################
     // adding a reminder
     // ##################
 // ##################
 // adding a reminder
 // ##################
 case 'details.addreminder':
     $how_often = Post::val('timeamount1', 1) * Post::val('timetype1');
     $start_time = Flyspray::strtotime(Post::val('timeamount2', 0));
     $userId = Flyspray::UsernameToId(Post::val('to_user_id'));
     if (!Backend::add_reminder($task['task_id'], Post::val('reminder_message'), $how_often, $start_time, $userId)) {
         Flyspray::show_error(L('usernotexist'));
         break;
     }
     // TODO: Log event in a later version.
     $_SESSION['SUCCESS'] = L('reminderaddedmsg');
     break;
     // ##################
     // removing a reminder
     // ##################
 // ##################
 // removing a reminder
 // ##################
 case 'deletereminder':
     if (!$user->perms('manage_project') || !is_array(Post::val('reminder_id'))) {
예제 #2
0
파일: details.php 프로젝트: negram/flyspray
 function action_addreminder($task)
 {
     global $user, $db, $fs, $proj;
     $how_often = Post::val('timeamount1', 1) * Post::val('timetype1');
     $start_time = Flyspray::strtotime(Post::val('timeamount2', 0));
     $userId = Flyspray::UsernameToId(Post::val('to_user_id'));
     if (!Backend::add_reminder($task['task_id'], Post::val('reminder_message'), $how_often, $start_time, $userId)) {
         return array(ERROR_RECOVER, L('usernotexist'));
     }
     return array(SUBMIT_OK, L('reminderaddedmsg'));
 }