fix initializing
This commit is contained in:
@@ -387,6 +387,10 @@ if (! function_exists('phpb_redirect')) {
|
|||||||
$_SESSION["phpb_flash"] = $flashData;
|
$_SESSION["phpb_flash"] = $flashData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (session_status() === PHP_SESSION_ACTIVE) {
|
||||||
|
session_write_close();
|
||||||
|
}
|
||||||
|
|
||||||
header('Location: ' . $url, true, $statusCode);
|
header('Location: ' . $url, true, $statusCode);
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,17 +3,15 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
<title><?= phpb_trans('auth.title') ?></title>
|
<title><?= phpb_trans("auth.title") ?></title>
|
||||||
|
|
||||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
|
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
|
||||||
<link href="<?= phpb_asset('WebsiteManager.css') ?>" rel="stylesheet">
|
<link href="<?= phpb_asset("WebsiteManager.css") ?>" rel="stylesheet">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div class="container p-4">
|
<div class="container p-4">
|
||||||
<?php
|
<?php require __DIR__ . "/" . $viewFile . ".php"; ?>
|
||||||
require __DIR__ . '/' . $viewFile . '.php';
|
|
||||||
?>
|
|
||||||
|
|
||||||
<footer class="my-5 pt-5 text-muted text-center text-small">
|
<footer class="my-5 pt-5 text-muted text-center text-small">
|
||||||
<p class="mb-1">Powered by <a href="https://github.com/deepDiverPaul/plugi" target="_blank">Plugi Page Builder</a></p>
|
<p class="mb-1">Powered by <a href="https://github.com/deepDiverPaul/plugi" target="_blank">Plugi Page Builder</a></p>
|
||||||
|
|||||||
@@ -236,6 +236,10 @@ class Plugi
|
|||||||
];
|
];
|
||||||
if(!phpb_on_url($module, $parameters[0])) {
|
if(!phpb_on_url($module, $parameters[0])) {
|
||||||
if(!phpb_on_url($module, $parameters[1])) {
|
if(!phpb_on_url($module, $parameters[1])) {
|
||||||
|
$authUrl = phpb_config('auth.url');
|
||||||
|
if ($authUrl !== null && strpos(phpb_current_relative_url(), $authUrl) === 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
phpb_redirect(phpb_url($module, $parameters[0]), [
|
phpb_redirect(phpb_url($module, $parameters[0]), [
|
||||||
'message-type' => 'error',
|
'message-type' => 'error',
|
||||||
'message' => phpb_trans('website-manager.check-database')
|
'message' => phpb_trans('website-manager.check-database')
|
||||||
@@ -359,7 +363,7 @@ class Plugi
|
|||||||
public function handleRequest($action = null)
|
public function handleRequest($action = null)
|
||||||
{
|
{
|
||||||
$route = $route ?? $_GET['route'] ?? null;
|
$route = $route ?? $_GET['route'] ?? null;
|
||||||
$action = $action ?? $_GET['action'] ?? null;
|
$action = $action ?? $_GET['action'] ?? $_POST['action'] ?? null;
|
||||||
if (! phpb_config('auth.use_login') || ! phpb_config('website_manager.use_website_manager')) {
|
if (! phpb_config('auth.use_login') || ! phpb_config('website_manager.use_website_manager')) {
|
||||||
die('The Plugi Authentication module is disabled, but no alternative has been implemented (you are still calling the standard handleRequest() method).<br>'
|
die('The Plugi Authentication module is disabled, but no alternative has been implemented (you are still calling the standard handleRequest() method).<br>'
|
||||||
. 'Implement a piece of code that checks whether the user is logged in. If logged in, call handleAuthenticatedRequest() or else call handlePublicRequest().');
|
. 'Implement a piece of code that checks whether the user is logged in. If logged in, call handleAuthenticatedRequest() or else call handlePublicRequest().');
|
||||||
|
|||||||
Reference in New Issue
Block a user