fix initializing

This commit is contained in:
2026-11-21 17:33:39 +01:00
parent 267d8004e0
commit 8ddea24272
3 changed files with 12 additions and 6 deletions
+5 -1
View File
@@ -236,6 +236,10 @@ class Plugi
];
if(!phpb_on_url($module, $parameters[0])) {
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]), [
'message-type' => 'error',
'message' => phpb_trans('website-manager.check-database')
@@ -359,7 +363,7 @@ class Plugi
public function handleRequest($action = 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')) {
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().');