Skip to content

Commit

Permalink
Remove legacy migration for forum
Browse files Browse the repository at this point in the history
  • Loading branch information
iszmais authored and mjansenDatabay committed Aug 12, 2024
1 parent 5bb35d5 commit c92eb1c
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 953 deletions.
12 changes: 1 addition & 11 deletions components/ILIAS/Forum/classes/Files/class.ilFileDataForum.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,12 @@
class ilFileDataForum implements ilFileDataForumInterface
{
private array $posting_cache = [];
private ilFileDataForumInterface $legacy_implementation;
private ilFileDataForumInterface $rc_implementation;

public function __construct(
private int $obj_id = 0,
private int $pos_id = 0
) {
$this->legacy_implementation = new ilFileDataForumLegacyImplementation(
$this->obj_id,
$this->pos_id
);
$this->rc_implementation = new ilFileDataForumRCImplementation(
$this->obj_id,
$this->pos_id
Expand All @@ -55,12 +50,7 @@ private function getCurrentPosting(): ilForumPost

private function getImplementation(): ilFileDataForumInterface
{
$posting = $this->getCurrentPosting();
if ($posting->getRCID() !== ilForumPost::NO_RCID) {
return $this->rc_implementation;
}

return $this->legacy_implementation;
return $this->rc_implementation;
}

public function getObjId(): int
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,12 @@
class ilFileDataForumDrafts implements ilFileDataForumInterface
{
private array $posting_cache = [];
private ilFileDataForumInterface $legacy_implementation;
private ilFileDataForumInterface $rc_implementation;

public function __construct(
private int $obj_id = 0,
private int $draft_id = 0
) {
$this->legacy_implementation = new ilFileDataForumDraftsLegacyImplementation(
$this->obj_id,
$this->draft_id
);
$this->rc_implementation = new ilFileDataForumDraftsRCImplementation(
$this->obj_id,
$this->draft_id
Expand All @@ -55,12 +50,7 @@ private function getCurrentPosting(): ilForumPostDraft

private function getImplementation(): ilFileDataForumInterface
{
$posting = $this->getCurrentPosting();
if ($posting->getRCID() !== ilForumPost::NO_RCID) {
return $this->rc_implementation;
}

return $this->legacy_implementation;
return $this->rc_implementation;
}

public function getObjId(): int
Expand Down
Loading

0 comments on commit c92eb1c

Please sign in to comment.