parent::initObjectList();
$this->objectList->sqlOrderBy = 'attachment.attachmentID';
- $this->objectList->getConditionBuilder()->add('attachment.isImage = ?', [1]);
}
/**
public function execute() {
parent::execute();
+ /** @var \wcf\data\attachment\Attachment $attachment */
foreach ($this->objectList as $attachment) {
+ $attachment->migrateStorage();
try {
$action = new AttachmentAction([$attachment], 'generateThumbnails');
$action->executeAction();
- $attachment->migrateStorage();
}
catch (SystemException $e) {}
}