first commit

This commit is contained in:
2025-08-02 16:30:27 +02:00
commit 23646bfcee
14851 changed files with 1750626 additions and 0 deletions

31
web/app.php Normal file
View File

@@ -0,0 +1,31 @@
<?php
require_once './include/config.php';
// Avoid "remember me" cookie if request for data files
// TODO: Remove all cookies to prevent any other side effect?
if (str_starts_with($_SERVER['REQUEST_URI'], '/data/')) {
unset($_COOKIE['remember']);
}
require_once $cfg['Path']['web_root'].'app/autoload.php';
if (strpos(trim($_SERVER['REQUEST_URI'], '/'), trim($cfg['Menu']['wpj_toolbar']['admin_url'], '/')) === 0) {
require_once './engine/admin/functions.php';
} else {
require_once './include/functions.php';
require_once __DIR__.'/common.php';
}
use KupShop\KupShopBundle\Util\Compat\SymfonyBridge;
use Symfony\Component\ErrorHandler\ErrorHandler;
use Symfony\Component\Runtime\SymfonyRuntime;
// only non-components shops are using app.php
// when SymfonyRuntime exists then error handler is not being registered until SymfonyRuntime is used
// so hotfix by registering error handler when SymfonyRuntime class exists
if (class_exists(SymfonyRuntime::class)) {
ErrorHandler::register(null, false);
}
SymfonyBridge::handleGlobalRequest();