Skip to content

Commit

Permalink
behat fails in older versions fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
TamaroWalter committed Sep 7, 2023
1 parent 104a8dc commit 95b665c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion classes/post/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,8 @@ public function moodleoverflow_edit_post($time, $postmessage, $messageformat, $f
}

/**
* // TODO: RETHINK THIS FUNCTION.
* // NOTE: This function replaces the get_post_full() function and is not used until the print and print-related function for
* // printing the discussion and a post are adapted to the new post and discussion class.
* Gets a post with all info ready for moodleoverflow_print_post.
* Most of these joins are just to get the forum id.
*
Expand Down
2 changes: 1 addition & 1 deletion locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ function moodleoverflow_get_post_full($postid) {
if ($CFG->branch >= 311) {
$allnames = \core_user\fields::for_name()->get_sql('u', false, '', '', false)->selects;
} else {
$allnames = get_all_user_name_fields(true, 'u');
$allnames = implode(', ', fields::get_name_fields());
}
$sql = "SELECT p.*, d.moodleoverflow, $allnames, u.email, u.picture, u.imagealt
FROM {moodleoverflow_posts} p
Expand Down

0 comments on commit 95b665c

Please sign in to comment.