Refactor configuration loading: Updated multiple public PHP files to require a new bootstrap file for configuration management. Adjusted paths for product configuration to enhance maintainability and consistency across the application.
This commit is contained in:
@@ -3,6 +3,12 @@
|
||||
* Helper functions for HexaHost.de
|
||||
*/
|
||||
|
||||
$configDir = defined('HEXAHOST_CONFIG_DIR')
|
||||
? HEXAHOST_CONFIG_DIR
|
||||
: __DIR__ . '/../config';
|
||||
|
||||
require_once $configDir . '/site-config.php';
|
||||
|
||||
// Sichere Session-Konfiguration
|
||||
if (session_status() === PHP_SESSION_NONE) {
|
||||
// Session-Cookie-Sicherheit
|
||||
@@ -51,6 +57,11 @@ function includeHeader($title = '', $description = '', $page = '', $scripts = []
|
||||
|
||||
$current_page = $page;
|
||||
$additional_scripts = $scripts;
|
||||
|
||||
if (!isset($canonical_url)) {
|
||||
$requestPath = parse_url($_SERVER['REQUEST_URI'] ?? '/', PHP_URL_PATH) ?: '/';
|
||||
$canonical_url = rtrim(getCanonicalBaseUrl(), '/') . $requestPath;
|
||||
}
|
||||
|
||||
include __DIR__ . '/header.php';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user