original_string: public function deleteRevision($contentId, $revisionId)
      {
          $this->loadModel('Content.ContentRevisions');
          $revision = $this->ContentRevisions->find()
              ->where(['id' => $revisionId, 'content_id' => $contentId])
              ->first();
  
          if ($this->ContentRevisions->delete($revision, ['atomic' => true])) {
              $this->Flash->success(__d('content', 'Revision was successfully removed!'));
          } else {
              $this->Flash->danger(__d('content', 'Unable to remove this revision, please try again.'));
          }
  
          $this->title(__d('content', 'Editing Content Revision'));
          $this->redirect($this->referer());
      }
code: public function deleteRevision($contentId, $revisionId)
      {
          $this->loadModel('Content.ContentRevisions');
          $revision = $this->ContentRevisions->find()
              ->where(['id' => $revisionId, 'content_id' => $contentId])
              ->first();
  
          if ($this->ContentRevisions->delete($revision, ['atomic' => true])) {
              $this->Flash->success(__d('content', 'Revision was successfully removed!'));
          } else {
              $this->Flash->danger(__d('content', 'Unable to remove this revision, please try again.'));
          }
  
          $this->title(__d('content', 'Editing Content Revision'));
          $this->redirect($this->referer());
      }
code_tokens: public function deleteRevision ( $ contentId , $ revisionId ) { $ this -> loadModel ( 'Content.ContentRevisions' ) ; $ revision = $ this -> ContentRevisions -> find ( ) -> where ( [ 'id' => $ revisionId , 'content_id' => $ contentId ] ) -> first ( ) ; if ( $ this -> ContentRevisions -> delete ( $ revision , [ 'atomic' => true ] ) ) { $ this -> Flash -> success ( __d ( 'content' , 'Revision was successfully removed!' ) ) ; } else { $ this -> Flash -> danger ( __d ( 'content' , 'Unable to remove this revision, please try again.' ) ) ; } $ this -> title ( __d ( 'content' , 'Editing Content Revision' ) ) ; $ this -> redirect ( $ this -> referer ( ) ) ; }
docstring: Removes the given revision of the given content.
  
  @param int $contentId Content's ID
  @param int $revisionId Revision's ID
  @return void Redirects to previous page
docstring_tokens: Removes the given revision of the given content .