anchor.diff:               (progn ,@body)
                (not-found)))))))
   
  +(defun deactivate-old-events (&aux (now (get-universal-time))
  +                                   (count 0))
  +  (dolist (event *event-index*)
  +    (let* ((id (result-id event))
  +           (data (db id)))
  +      (when (and (getf data :active)
  +                 (< (max (or (getf data :local-end-date) 0)
  +                         (or (getf data :local-time) 0)
  +                         (or (getf data :auto-updated-time) 0))
  +                    (- now +day-in-seconds+)))
  +        (deactivate-event id)
  +        (incf count))))
  +  count)
  +
  +(defun deactivate-event (id)
  +  (modify-db id :auto-updated-time nil
  +                :recurring nil)
  +  (deactivate-inventory-item id))
  +
   (defun eventname-or-id (id &aux (event (db id)))
     (or (getf event :custom-url)
         (write-to-string id)))
  
positive.code:                               :next-url (referer)))
  
               ((post-parameter "really-delete")
                (modify-db id :auto-updated-time nil)
                (deactivate-inventory-item id)
                (flash "Your event has been deactivated!")
                (see-other (or (post-parameter "next") "/home")))
  
  
negative.code:                         (update-recurring-event-time id data event)
                          (unless global-search
                            (push event updated-local-event-list)))
                         ((and (getf data :active)
                               (< (max (or (getf data :local-end-date) 0)
                                       (or (getf data :local-time) 0)
                                       (or (getf data :auto-updated-time) 0))
                                  (- now +day-in-seconds+)))
                          (deactivate-event id)))))))
  
          (setf local-events (populate-calendar (remove-private-items
                                                  (trim-and-update
  