Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ public function getEntries(): array
}

// system support contacts
if (($system_support_url = \ilSystemSupportContactsGUI::getFooterLink()) !== '') {
if (($system_support_url = \ilSystemSupportContactsGUI::getFooterLink()) !== null) {
$system_support_title = \ilSystemSupportContactsGUI::getFooterText();
$entries[] = $this->item_factory
->link(
$this->id_factory->identifier('system_support'),
$system_support_title
)
->withAction($this->buildURI($system_support_url))
->withAction($system_support_url)
->withParent($this->getIdentificationFor(ilFooterStandardGroups::SUPPORT));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*
*********************************************************************/

use ILIAS\Data\URI;

/**
* System support contacts
*
Expand Down Expand Up @@ -93,18 +95,13 @@ public function showContacts()
$this->tpl->printToStdout();
}


/**
* Get footer link
*
* @return string footer link
*/
public static function getFooterLink()
public static function getFooterLink(): null|URI|string
{
global $DIC;

$ilCtrl = $DIC->ctrl();
$ilUser = $DIC->user();
$uri = $DIC->http()->request()->getUri();

$users = ilSystemSupportContacts::getValidSupportContactIds();
if (count($users) > 0) {
Expand All @@ -114,11 +111,12 @@ public static function getFooterLink()
ilSystemSupportContacts::getMailsToAddress()
);
} else {
return $ilCtrl->getLinkTargetByClass("ilsystemsupportcontactsgui", "", "", false, false);
$path = $ilCtrl->getLinkTargetByClass("ilsystemsupportcontactsgui", "", "", false, false);
return new URI($uri->getScheme() . '://' . $uri->getHost() . '/' . $path);
}
}

return "";
return null;
}

/**
Expand Down