original_string: public function cancel_request($logreturn=false) {
          global $CFG;
          if (!isset($this)) {
              return;
          }
          $this->process_stage_cleanup(true);
          if ($logreturn) {
              redirect($CFG->wwwroot . '/user/portfoliologs.php');
          }
          redirect($this->caller->get_return_url());
          exit;
      }
code: public function cancel_request($logreturn=false) {
          global $CFG;
          if (!isset($this)) {
              return;
          }
          $this->process_stage_cleanup(true);
          if ($logreturn) {
              redirect($CFG->wwwroot . '/user/portfoliologs.php');
          }
          redirect($this->caller->get_return_url());
          exit;
      }
code_tokens: public function cancel_request ( $ logreturn = false ) { global $ CFG ; if ( ! isset ( $ this ) ) { return ; } $ this -> process_stage_cleanup ( true ) ; if ( $ logreturn ) { redirect ( $ CFG -> wwwroot . '/user/portfoliologs.php' ) ; } redirect ( $ this -> caller -> get_return_url ( ) ) ; exit ; }
docstring: Cancels a potfolio request and cleans up the tempdata
  and redirects the user back to where they started
  
  @param bool $logreturn options to return to porfolio log or caller return page
  @return void
  @uses exit
docstring_tokens: Cancels a potfolio request and cleans up the tempdata and redirects the user back to where they started