original_string: protected function extract()
      {
          $this->destination = GC_DIR_MODULE . "/{$this->module_id}";
  
          if (file_exists($this->destination)) {
  
              $this->tempname = gplcart_file_unique($this->destination . '~');
  
              if (!rename($this->destination, $this->tempname)) {
                  $this->error = $this->translation->text('Failed to rename @old to @new', array(
                      '@old' => $this->destination, '@new' => $this->tempname));
                  return false;
              }
  
              $this->renamed = true;
          }
  
          if ($this->zip->extract(GC_DIR_MODULE)) {
              return true;
          }
  
          $this->error = $this->translation->text('Failed to extract to @name', array('@name' => $this->destination));
          return false;
      }
code: protected function extract()
      {
          $this->destination = GC_DIR_MODULE . "/{$this->module_id}";
  
          if (file_exists($this->destination)) {
  
              $this->tempname = gplcart_file_unique($this->destination . '~');
  
              if (!rename($this->destination, $this->tempname)) {
                  $this->error = $this->translation->text('Failed to rename @old to @new', array(
                      '@old' => $this->destination, '@new' => $this->tempname));
                  return false;
              }
  
              $this->renamed = true;
          }
  
          if ($this->zip->extract(GC_DIR_MODULE)) {
              return true;
          }
  
          $this->error = $this->translation->text('Failed to extract to @name', array('@name' => $this->destination));
          return false;
      }
code_tokens: protected function extract ( ) { $ this -> destination = GC_DIR_MODULE . "/{$this->module_id}" ; if ( file_exists ( $ this -> destination ) ) { $ this -> tempname = gplcart_file_unique ( $ this -> destination . '~' ) ; if ( ! rename ( $ this -> destination , $ this -> tempname ) ) { $ this -> error = $ this -> translation -> text ( 'Failed to rename @old to @new' , array ( '@old' => $ this -> destination , '@new' => $ this -> tempname ) ) ; return false ; } $ this -> renamed = true ; } if ( $ this -> zip -> extract ( GC_DIR_MODULE ) ) { return true ; } $ this -> error = $ this -> translation -> text ( 'Failed to extract to @name' , array ( '@name' => $ this -> destination ) ) ; return false ; }
docstring: Extracts module files to the system directory
  @return boolean
docstring_tokens: Extracts module files to the system directory