|
|
@@ -1,8 +1,9 @@ |
|
|
|
<?php |
|
|
|
|
|
|
|
$smf_session_data = []; |
|
|
|
function loadSMFAPI () |
|
|
|
{ |
|
|
|
global $maintenance, $wgSMFPathSSI, $wgSMFPathAPI; |
|
|
|
|
|
|
|
if (!defined("MW_NO_SESSION")) { |
|
|
|
// Fix for SMF's sanitization breaking mediawiki page titles. |
|
|
|
// Let mediawiki do its own security |
|
|
|
|
|
|
@@ -24,12 +25,6 @@ if (!defined("MW_NO_SESSION")) { |
|
|
|
die("Could not load the SMF API"); |
|
|
|
} |
|
|
|
|
|
|
|
// Clear SMF session data before starting MW session |
|
|
|
if (!empty($user_info) && $user_info['id']) { |
|
|
|
$smf_session_data = $_SESSION; |
|
|
|
session_destroy(); |
|
|
|
} |
|
|
|
|
|
|
|
$_GET = $tempGet; |
|
|
|
|
|
|
|
if (!empty($oldMaintenance)) { |
|
|
@@ -37,6 +32,10 @@ if (!defined("MW_NO_SESSION")) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (!defined("MW_NO_SESSION")) { |
|
|
|
loadSMFAPI(); |
|
|
|
} |
|
|
|
|
|
|
|
if(!empty($user_info)) { |
|
|
|
$wgAuthRemoteuserUserName = $user_info['username']; |
|
|
|
|
|
|
@@ -46,6 +45,6 @@ if(!empty($user_info)) { |
|
|
|
]; |
|
|
|
|
|
|
|
$wgAuthRemoteuserUserUrls = [ |
|
|
|
'logout' => $wgSMFPath."/index.php?action=logout;sesc=" . session_id() |
|
|
|
'logout' => $wgSMFURL . "/index.php?action=logout;" . $_SESSION['session_var'] . '=' . $_SESSION['session_value'] |
|
|
|
]; |
|
|
|
} |