コード例 #1
0
ファイル: UploadHelper.php プロジェクト: stopsopa/utils
 public function move()
 {
     $paths = $this->_extractHiddenPaths($this->request->request->all());
     foreach ($paths as $path => $file) {
         if (trim($file)) {
             $processor = $this->_getProcessorByPath($path);
             $config = $processor->getConfig();
             $tmp = $config['web'] . $config['dirtmp'] . $file;
             if (file_exists($tmp)) {
                 UtilFilesystem::rename($tmp, $config['web'] . $config['dir'] . $file);
                 UtilFilesystem::removeEmptyDirsToPath(dirname($tmp), $config['web'] . $config['dirtmp']);
             }
         }
     }
 }