Skip to content
Snippets Groups Projects
Commit 690fd51c authored by David Siegfried's avatar David Siegfried Committed by Jan-Hendrik Willms
Browse files

prevent php-warnings, closes #3487

Closes #3487

Merge request studip/studip!2382
parent 72e3a8f5
No related branches found
No related tags found
No related merge requests found
...@@ -96,19 +96,19 @@ class SiteinfoController extends StudipController ...@@ -96,19 +96,19 @@ class SiteinfoController extends StudipController
{ {
$sidebar = Sidebar::get(); $sidebar = Sidebar::get();
if (!$GLOBALS['rubrics_empty']) { if (empty($GLOBALS['rubrics_empty'])) {
$actions = new ActionsWidget(); $actions = new ActionsWidget();
$actions->setTitle(_('Seiten-Aktionen')); $actions->setTitle(_('Seiten-Aktionen'));
if ($this->currentrubric) { if ($this->currentrubric) {
$actions->addLink(_('Neue Seite anlegen'), $actions->addLink(_('Neue Seite anlegen'),
$this->url_for('siteinfo/new/' . $this->currentrubric), Icon::create('add', 'clickable')); $this->url_for('siteinfo/new/' . $this->currentrubric), Icon::create('add'));
} }
if ($this->currentdetail) { if ($this->currentdetail) {
$actions->addLink(_('Seite bearbeiten'), $actions->addLink(_('Seite bearbeiten'),
$this->url_for('siteinfo/edit/' . $this->currentrubric . '/' . $this->currentdetail), Icon::create('edit', 'clickable')); $this->url_for('siteinfo/edit/' . $this->currentrubric . '/' . $this->currentdetail), Icon::create('edit'));
$actions->addLink(_('Seite löschen'), $actions->addLink(_('Seite löschen'),
$this->url_for('siteinfo/delete/' . $this->currentrubric . '/' . $this->currentdetail), Icon::create('trash', 'clickable')); $this->url_for('siteinfo/delete/' . $this->currentrubric . '/' . $this->currentdetail), Icon::create('trash'));
} }
$sidebar->addWidget($actions); $sidebar->addWidget($actions);
...@@ -119,12 +119,12 @@ class SiteinfoController extends StudipController ...@@ -119,12 +119,12 @@ class SiteinfoController extends StudipController
$actions->setTitle(_('Rubrik-Aktionen')); $actions->setTitle(_('Rubrik-Aktionen'));
$actions->addLink(_('Neue Rubrik anlegen'), $actions->addLink(_('Neue Rubrik anlegen'),
$this->url_for('siteinfo/new'), Icon::create('add', 'clickable')); $this->url_for('siteinfo/new'), Icon::create('add'));
if ($this->currentrubric) { if ($this->currentrubric) {
$actions->addLink(_('Rubrik bearbeiten'), $actions->addLink(_('Rubrik bearbeiten'),
$this->url_for('siteinfo/edit/' . $this->currentrubric), Icon::create('edit', 'clickable')); $this->url_for('siteinfo/edit/' . $this->currentrubric), Icon::create('edit'));
$actions->addLink(_('Rubrik löschen'), $actions->addLink(_('Rubrik löschen'),
$this->url_for('siteinfo/delete/' . $this->currentrubric), Icon::create('trash', 'clickable')); $this->url_for('siteinfo/delete/' . $this->currentrubric), Icon::create('trash'));
} }
$sidebar->addWidget($actions); $sidebar->addWidget($actions);
...@@ -144,6 +144,7 @@ class SiteinfoController extends StudipController ...@@ -144,6 +144,7 @@ class SiteinfoController extends StudipController
public function new_action($givenrubric = null) public function new_action($givenrubric = null)
{ {
$this->edit_rubric = false;
if ($givenrubric === null) { if ($givenrubric === null) {
Navigation::addItem('/footer/siteinfo/rubric_new', Navigation::addItem('/footer/siteinfo/rubric_new',
new AutoNavigation(_('Neue Rubrik'), new AutoNavigation(_('Neue Rubrik'),
...@@ -159,6 +160,7 @@ class SiteinfoController extends StudipController ...@@ -159,6 +160,7 @@ class SiteinfoController extends StudipController
public function edit_action($givenrubric = null, $givendetail = null) public function edit_action($givenrubric = null, $givendetail = null)
{ {
$this->edit_rubric = false;
if (is_numeric($givendetail)) { if (is_numeric($givendetail)) {
$this->rubrics = $this->si->get_all_rubrics(); $this->rubrics = $this->si->get_all_rubrics();
$this->rubric_id = $this->si->rubric_for_detail($this->currentdetail); $this->rubric_id = $this->si->rubric_for_detail($this->currentdetail);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment