Skip to content

Commit

Permalink
[FIX] 0043629: Failed test: Literaturliste kopieren
Browse files Browse the repository at this point in the history
  • Loading branch information
chfsx committed Jan 28, 2025
1 parent 3598d25 commit 6836064
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ private function handleUpload(): ?\ILIAS\ResourceStorage\Identification\Resource
protected function doCreate(bool $clone_mode = false): void
{
if ($this->upload_service->hasUploads()) {
if(!$this->upload_service->hasBeenProcessed()) {
if (!$this->upload_service->hasBeenProcessed()) {
$this->upload_service->process();
}
$this->setResourceId($this->handleUpload());
Expand Down Expand Up @@ -344,6 +344,16 @@ public function cloneStructure(int $original_id): void
$this->parseFileToDatabase();
$this->setMigrated($original->isMigrated());
$this->doUpdate();

// copy filters

$filters = new ilBiblFieldFilterFactory();
foreach ($filters->getAllForObjectId($original_id) as $filter) {
$cloned_filter = clone $filter;
$cloned_filter->setId(0);
$cloned_filter->setObjectId($this->getId());
$cloned_filter->create();
}
}

/**
Expand Down

0 comments on commit 6836064

Please sign in to comment.