Skip to content
Snippets Groups Projects
Commit ac973ac6 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

add new method ContentBar::setInfoHTML() in favor of the now deprecated...

add new method ContentBar::setInfoHTML() in favor of the now deprecated ContentBar::setInfo(), fixes #4380

Closes #4380

Merge request studip/studip!3189
parent 7892fdf5
No related branches found
No related tags found
No related merge requests found
......@@ -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'])
......
......@@ -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'));
}
......
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment