original_string: protected function updateReview()
      {
          $submitted = $this->getSubmitted();
  
          if ($this->review->update($this->data_review['review_id'], $submitted)) {
  
              $message = $this->text('Review has been updated');
  
              if (empty($submitted['status'])) {
                  $message = $this->text('Review has been updated and will be published after approval');
              }
  
              $this->redirect("product/{$this->data_product['product_id']}", $message, 'success');
          }
  
          $this->redirect("product/{$this->data_product['product_id']}");
      }
code: protected function updateReview()
      {
          $submitted = $this->getSubmitted();
  
          if ($this->review->update($this->data_review['review_id'], $submitted)) {
  
              $message = $this->text('Review has been updated');
  
              if (empty($submitted['status'])) {
                  $message = $this->text('Review has been updated and will be published after approval');
              }
  
              $this->redirect("product/{$this->data_product['product_id']}", $message, 'success');
          }
  
          $this->redirect("product/{$this->data_product['product_id']}");
      }
code_tokens: protected function updateReview ( ) { $ submitted = $ this -> getSubmitted ( ) ; if ( $ this -> review -> update ( $ this -> data_review [ 'review_id' ] , $ submitted ) ) { $ message = $ this -> text ( 'Review has been updated' ) ; if ( empty ( $ submitted [ 'status' ] ) ) { $ message = $ this -> text ( 'Review has been updated and will be published after approval' ) ; } $ this -> redirect ( "product/{$this->data_product['product_id']}" , $ message , 'success' ) ; } $ this -> redirect ( "product/{$this->data_product['product_id']}" ) ; }
docstring: Updates a submitted review
docstring_tokens: Updates a submitted review