Skip to content

Commit d581fbb

Browse files
committed
use db-object instead of discussion class instance
1 parent 685ac37 commit d581fbb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

classes/post/post_control.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,8 @@ private function execute_reply(object $form): void {
464464
$event->trigger();
465465

466466
// Subscribe to this thread.
467-
// Please be aware that in future the use of build_db_object() should be replaced with only $this->info->discussion,
468-
// as the subscription class should be refactored with the new way of working with posts.
467+
// LEARNWEB-TODO: Please be aware that in future the use of build_db_object() should be replaced with only
468+
// $this->info->discussion, as the subscription class should be refactored with the new way of working with posts.
469469
subscriptions::moodleoverflow_post_subscription(
470470
$form,
471471
$this->info->moodleoverflow,
@@ -611,9 +611,11 @@ public function build_postform(array $pageparams) {
611611
);
612612

613613
// If the post is anonymous, attachments should have an anonymous author when editing the attachment.
614+
// LEARNWEB-TODO: Please be aware that in future the use of build_db_object() should be replaced with only
615+
// $this->info->discussion, when the new way of working with posts is fully implemented.
614616
if (
615617
$draftitemid && $this->interaction == 'edit' && anonymous::is_post_anonymous(
616-
$this->info->discussion,
618+
$this->info->discussion->get_db_object(),
617619
$this->info->moodleoverflow,
618620
$this->prepost->userid
619621
)

0 commit comments

Comments
 (0)