21 lines
706 B
PHP
21 lines
706 B
PHP
<?php
|
|
|
|
class smImportCsvBackendComponents extends sfComponents {
|
|
|
|
public function executeImport() {
|
|
$this->importType = null;
|
|
|
|
if ($this->getRequest()->getMethod() == sfRequest::POST) {
|
|
|
|
if ($this->hasRequestParameter('import_full'))
|
|
$this->importType = 'full';
|
|
|
|
if($this->importType !== null && $this->getRequest()->getFileName('filename')) {
|
|
$filename = sfConfig::get('sf_cache_dir').'/import_custom.csv';
|
|
$this->getRequest()->moveFile('filename', $filename);
|
|
$this->importFileSize = filesize($filename);
|
|
} else
|
|
$this->importType = null;
|
|
}
|
|
}
|
|
} |