file = WBClass::create('WBVFS_File'); $this->table = WBClass::create('WBDatasource_Table'); } public function reimport($id) { $this->file = $this->file->loadById($id); $mime = $this->file->getMime(WBVFS_File::MIME_MAJOR); if ('unknown' == $mime) { printf('Unkown mime type %s id: %s obscureid: %s mime: %s size: %s
' . "\n" , $this->file->getName() , $this->file->getId() , $this->file->getObscureid() , $this->file->getMime(WBVFS_File::MIME_MAJOR|WBVFS_File::MIME_MINOR) , $this->file->getSize() ); return; } $this->file->reImport(); $url = $this->file->getUrl(); $url = WBString::replaceSuperplaceHolders($url); printf('%s id: %s obscureid: %s mime: %s size: %s
' . "\n" , $url , $this->file->getName() , $this->file->getId() , $this->file->getObscureid() , $this->file->getMime(WBVFS_File::MIME_MAJOR|WBVFS_File::MIME_MINOR) , $this->file->getSize() ); } } $ti = new TestReImport(); $ids = $ti->select(); foreach ($ids as $id) { $ti->reimport($id); break; usleep(500); } $ti->reimport('1'); ?>