diff --git a/app/controllers/course/wiki.php b/app/controllers/course/wiki.php index 647ab8aa2b60cb2381371c295376961d83086ce2..91e4372743498fc14f920b260c7883754df4545d 100644 --- a/app/controllers/course/wiki.php +++ b/app/controllers/course/wiki.php @@ -128,7 +128,7 @@ class Course_WikiController extends AuthenticatedController ); } - $this->contentbar->setInfo(sprintf( + $this->contentbar->setInfoHTML(sprintf( _('Version %1$s, geändert von %2$s <br> am %3$s'), $this->page->versionnumber, $author, @@ -481,7 +481,7 @@ class Course_WikiController extends AuthenticatedController $this->contentbar = ContentBar::get() ->setTOC(CoreWiki::getTOC($page)) ->setIcon(Icon::create('wiki')) - ->setInfo(_('Zuletzt gespeichert') .': '. '<span class="wiki-last-edited-' . $this->page->id . '"></span>'); + ->setInfoHTML(_('Zuletzt gespeichert') .': '. '<span class="wiki-last-edited-' . $this->page->id . '"></span>'); } public function apply_editing_action(WikiPage $page) @@ -711,7 +711,7 @@ class Course_WikiController extends AuthenticatedController $this->contentbar = ContentBar::get() ->setTOC(CoreWiki::getTOC($version->page)) ->setIcon(Icon::create('wiki')) - ->setInfo(sprintf( + ->setInfoHTML(sprintf( _('Version %1$s vom %2$s'), $version->versionnumber, date('d.m.Y H:i:s', $version['mkdate']) diff --git a/app/controllers/oer/market.php b/app/controllers/oer/market.php index 5a58c97e03f4ad02abed2e5b394bce86515c996c..3f9dc89646b3758419fee5f5ca5193a106b78a59 100644 --- a/app/controllers/oer/market.php +++ b/app/controllers/oer/market.php @@ -330,7 +330,7 @@ class Oer_MarketController extends StudipController $this->contentbar = ContentBar::get() ->setTOC(new TOCItem($this->material['name'])) - ->setInfo(htmlReady($infotext)) + ->setInfoHTML(htmlReady($infotext)) ->setIcon(Icon::create('oer-campus')); } diff --git a/lib/classes/ContentBar.php b/lib/classes/ContentBar.php index 0e6a664dcb0365fc70221cefeb7ac53d291bfc35..47d27ce637ccf7477dee5e729ae2910b8a70c6e5 100644 --- a/lib/classes/ContentBar.php +++ b/lib/classes/ContentBar.php @@ -53,13 +53,24 @@ class ContentBar } /** - * Provide some info text. + * Provide some info text as html. + * * @param string $info * @return ContentBar $this Return current instance for method chaining. + * + * @deprecated since Stud.IP 6.0, use ContentBar::setInfoHTML() instead */ public function setInfo(string $info) { - $this->infoText = $info; + return $this->setInfoHTML($info); + } + + /** + * Provide some info as html. + */ + public function setInfoHTML(string $html): static + { + $this->infoText = $html; return $this; }