original_string: public function importAction()
      {
          $id    = $this->_getIdParam();
          $model = $this->getModel();
  
          $data = $model->loadFirst(array('urlpath' => $id));
  
          if (! ($data && isset($data['fullpath']))) {
              $this->addMessage(sprintf($this->_('File "%s" not found on the server.'), $id));
              return;
          }
  
          $importLoader = $this->loader->getImportLoader();
          $importer = $importLoader->getFileImporter($data['fullpath']);
  
          if (! $importer) {
              $this->addMessage(sprintf($this->_('Automatic import not possible for file "%s".'), $data['relpath']));
              return;
          }
  
          $batch = $importer->getCheckAndImportBatch();
  
          $title = $this->_('Import the file.');
  
          $this->_helper->batchRunner($batch, $title, $this->accesslog);
  
          $this->html->pInfo($this->_('Checks this file for validity and then performs an import.'));
  
          // \MUtil_Echo::track($data);
      }
code: public function importAction()
      {
          $id    = $this->_getIdParam();
          $model = $this->getModel();
  
          $data = $model->loadFirst(array('urlpath' => $id));
  
          if (! ($data && isset($data['fullpath']))) {
              $this->addMessage(sprintf($this->_('File "%s" not found on the server.'), $id));
              return;
          }
  
          $importLoader = $this->loader->getImportLoader();
          $importer = $importLoader->getFileImporter($data['fullpath']);
  
          if (! $importer) {
              $this->addMessage(sprintf($this->_('Automatic import not possible for file "%s".'), $data['relpath']));
              return;
          }
  
          $batch = $importer->getCheckAndImportBatch();
  
          $title = $this->_('Import the file.');
  
          $this->_helper->batchRunner($batch, $title, $this->accesslog);
  
          $this->html->pInfo($this->_('Checks this file for validity and then performs an import.'));
  
          // \MUtil_Echo::track($data);
      }
code_tokens: public function importAction ( ) { $ id = $ this -> _getIdParam ( ) ; $ model = $ this -> getModel ( ) ; $ data = $ model -> loadFirst ( array ( 'urlpath' => $ id ) ) ; if ( ! ( $ data && isset ( $ data [ 'fullpath' ] ) ) ) { $ this -> addMessage ( sprintf ( $ this -> _ ( 'File "%s" not found on the server.' ) , $ id ) ) ; return ; } $ importLoader = $ this -> loader -> getImportLoader ( ) ; $ importer = $ importLoader -> getFileImporter ( $ data [ 'fullpath' ] ) ; if ( ! $ importer ) { $ this -> addMessage ( sprintf ( $ this -> _ ( 'Automatic import not possible for file "%s".' ) , $ data [ 'relpath' ] ) ) ; return ; } $ batch = $ importer -> getCheckAndImportBatch ( ) ; $ title = $ this -> _ ( 'Import the file.' ) ; $ this -> _helper -> batchRunner ( $ batch , $ title , $ this -> accesslog ) ; $ this -> html -> pInfo ( $ this -> _ ( 'Checks this file for validity and then performs an import.' ) ) ; // \MUtil_Echo::track($data); }
docstring: Import the file
docstring_tokens: Import the file