Skip to content

Commit

Permalink
fix php personalurl deprecation error
Browse files Browse the repository at this point in the history
Signed-off-by: Timo <[email protected]>
  • Loading branch information
TimoNotThy committed Mar 13, 2024
1 parent 2ce8c83 commit 1bae64a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"author": "ULYSSIS VZW, by Joachim Vandersmissen",
"url": "https://docs.ulyssis.org/Securing_MediaWiki_using_Centrale_KU_Leuven_Login/",
"description": "This extension replaces the vanilla login mechanics with a KU Leuven Shibboleth login",
"version": "1.3.2",
"version": "1.3.3",
"license-name": "GPL-2.0+",
"type": "other",
"AutoloadNamespaces": {
Expand Down
8 changes: 4 additions & 4 deletions includes/bKULshib.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function check_login() {
}
}

function login_link($returnlink = NULL, $force_ssl = TRUE) {
function login_link($returnlink = "", $force_ssl = TRUE) {
//Voorbeeld loginlink: https://bert.ulyssis.be/Shibboleth.sso/WAYF/kuleuven?target=https%3A%2F%2Fbert.ulyssis.be%2Fshib%2Ftest.php

if( ((isset($this->headers['HTTPS'])) AND ($this->headers['HTTPS'] == "on")) OR ($force_ssl) ) {
Expand All @@ -90,7 +90,7 @@ function login_link($returnlink = NULL, $force_ssl = TRUE) {
$return .= urlencode("http://") . urlencode($_SERVER['HTTP_HOST']);
}

if($returnlink == NULL) {
if($returnlink == "") {
return $return . urlencode($_SERVER['REQUEST_URI']);
}
elseif(strpos($returnlink, "/") === 0) {
Expand All @@ -102,7 +102,7 @@ function login_link($returnlink = NULL, $force_ssl = TRUE) {
}
}

function logout_link($displaylink = NULL, $force_ssl = TRUE) {
function logout_link($displaylink = "", $force_ssl = TRUE) {
//Voorbeeld logoutlink, volwaardige logout bij IdP, geen redirect: https://bert.ulyssis.be/Shibboleth.sso/Logout?return=https%3A%2F%2Fidp.kuleuven.be%2Fidp%2Flogout%3Freturn%3Dhttps%3A%2F%2Fbert.ulyssis.be%2Findex.php

if( ((isset($this->headers['HTTPS'])) AND ($this->headers['HTTPS'] == "on")) OR ($force_ssl) ) {
Expand All @@ -123,7 +123,7 @@ function logout_link($displaylink = NULL, $force_ssl = TRUE) {
$return .= urlencode("http://") . urlencode($_SERVER['HTTP_HOST']);
}

if($displaylink == NULL) {
if($displaylink == "") {
return $return . urlencode($_SERVER['REQUEST_URI']);
}
elseif(strpos($displaylink, "/") === 0) {
Expand Down

0 comments on commit 1bae64a

Please sign in to comment.