original_string: public function delete($idSite, $idNote)
      {
          $this->checkSingleIdSite($idSite, $extraMessage = "Note: Cannot delete annotations from multiple sites.");
  
          $annotations = new AnnotationList($idSite);
  
          // check permissions
          $this->checkUserCanModifyOrDelete($idSite, $annotations->get($idSite, $idNote));
  
          // remove the note & save the list
          $annotations->remove($idSite, $idNote);
          $annotations->save($idSite);
      }
code: public function delete($idSite, $idNote)
      {
          $this->checkSingleIdSite($idSite, $extraMessage = "Note: Cannot delete annotations from multiple sites.");
  
          $annotations = new AnnotationList($idSite);
  
          // check permissions
          $this->checkUserCanModifyOrDelete($idSite, $annotations->get($idSite, $idNote));
  
          // remove the note & save the list
          $annotations->remove($idSite, $idNote);
          $annotations->save($idSite);
      }
code_tokens: public function delete ( $ idSite , $ idNote ) { $ this -> checkSingleIdSite ( $ idSite , $ extraMessage = "Note: Cannot delete annotations from multiple sites." ) ; $ annotations = new AnnotationList ( $ idSite ) ; // check permissions $ this -> checkUserCanModifyOrDelete ( $ idSite , $ annotations -> get ( $ idSite , $ idNote ) ) ; // remove the note & save the list $ annotations -> remove ( $ idSite , $ idNote ) ; $ annotations -> save ( $ idSite ) ; }
docstring: Removes an annotation from a site's list of annotations.
  
  If the current user is not allowed to delete the annotation, an exception
  will be thrown. A user can delete a note if:
  - the user has admin access for the site, OR
  - the user has view access, is not the anonymous user and is the user that
  created the note
  
  @param string $idSite The site ID to add the annotation to.
  @param string $idNote The ID of the note to delete.
docstring_tokens: Removes an annotation from a site s list of annotations .