Skip to content

Commit

Permalink
Bugfix: Profile picture is destroyed by format_text so do not use it …
Browse files Browse the repository at this point in the history
…in placeholders_info but only directly where we need it.
  • Loading branch information
bernhard-wunderbyte committed Apr 11, 2024
1 parent e52d925 commit 5f5fac2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 3 additions & 1 deletion classes/booking_option.php
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,9 @@ public function get_text_depending_on_status(booking_answers $bookinganswers, ?i
}
}

return placeholders_info::render_text($text, $this->settings->cmid, $this->settings->id, $userid);
$text = placeholders_info::render_text($text, $this->settings->cmid, $this->settings->id, $userid);

return format_text($text);
}

/**
Expand Down
7 changes: 3 additions & 4 deletions classes/placeholders/placeholders_info.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,17 +143,16 @@ public static function render_text(
$text = str_replace($searchstring, $value, $text);
}
}

return format_text($text);
return $text;
}

/**
* This builds an returns a list of localized placeholders.
* They are stored statically and thus available throughout the ttl.
* @return array
* @return string
* @throws coding_exception
*/
public static function return_list_of_placeholders() {
public static function return_list_of_placeholders(): string {

// If it's already build, we can skip this.
if (empty(self::$localizedplaceholders)) {
Expand Down

0 comments on commit 5f5fac2

Please sign in to comment.