original_string: private function download()
      {
          $file = (string) gps('file');
  
          try {
              $backups = $this->getBackups();
          } catch (Exception $e) {
          }
  
          if (empty($backups) || !isset($backups[$file])) {
              $this->browser(array(gTxt('rah_backup_can_not_download'), E_ERROR));
              return;
          }
  
          extract($backups[$file]);
  
          @ini_set('zlib.output_compression', 'Off');
          @set_time_limit(0);
          @ignore_user_abort(true);
  
          ob_clean();
          header('Content-Description: File Download');
          header('Content-Type: application/octet-stream');
          header('Content-Disposition: attachment; filename="'.$name.'"; size="'.$size.'"');
          header('Content-Transfer-Encoding: binary');
          header('Expires: 0');
          header('Cache-Control: private');
          header('Content-Length: '.$size);
          ob_flush();
          flush();
  
          if ($f = fopen($path, 'rb')) {
              while(!feof($f) && connection_status() == 0) {
                  echo fread($f, 1024*64);
                  ob_flush();
                  flush();
              }
  
              fclose($f);
          }
  
          exit;
      }
code: private function download()
      {
          $file = (string) gps('file');
  
          try {
              $backups = $this->getBackups();
          } catch (Exception $e) {
          }
  
          if (empty($backups) || !isset($backups[$file])) {
              $this->browser(array(gTxt('rah_backup_can_not_download'), E_ERROR));
              return;
          }
  
          extract($backups[$file]);
  
          @ini_set('zlib.output_compression', 'Off');
          @set_time_limit(0);
          @ignore_user_abort(true);
  
          ob_clean();
          header('Content-Description: File Download');
          header('Content-Type: application/octet-stream');
          header('Content-Disposition: attachment; filename="'.$name.'"; size="'.$size.'"');
          header('Content-Transfer-Encoding: binary');
          header('Expires: 0');
          header('Cache-Control: private');
          header('Content-Length: '.$size);
          ob_flush();
          flush();
  
          if ($f = fopen($path, 'rb')) {
              while(!feof($f) && connection_status() == 0) {
                  echo fread($f, 1024*64);
                  ob_flush();
                  flush();
              }
  
              fclose($f);
          }
  
          exit;
      }
code_tokens: private function download ( ) { $ file = ( string ) gps ( 'file' ) ; try { $ backups = $ this -> getBackups ( ) ; } catch ( Exception $ e ) { } if ( empty ( $ backups ) || ! isset ( $ backups [ $ file ] ) ) { $ this -> browser ( array ( gTxt ( 'rah_backup_can_not_download' ) , E_ERROR ) ) ; return ; } extract ( $ backups [ $ file ] ) ; @ ini_set ( 'zlib.output_compression' , 'Off' ) ; @ set_time_limit ( 0 ) ; @ ignore_user_abort ( true ) ; ob_clean ( ) ; header ( 'Content-Description: File Download' ) ; header ( 'Content-Type: application/octet-stream' ) ; header ( 'Content-Disposition: attachment; filename="' . $ name . '"; size="' . $ size . '"' ) ; header ( 'Content-Transfer-Encoding: binary' ) ; header ( 'Expires: 0' ) ; header ( 'Cache-Control: private' ) ; header ( 'Content-Length: ' . $ size ) ; ob_flush ( ) ; flush ( ) ; if ( $ f = fopen ( $ path , 'rb' ) ) { while ( ! feof ( $ f ) && connection_status ( ) == 0 ) { echo fread ( $ f , 1024 * 64 ) ; ob_flush ( ) ; flush ( ) ; } fclose ( $ f ) ; } exit ; }
docstring: Streams backups for downloading.
docstring_tokens: Streams backups for downloading .