Use "null coalescing assignment" operator for $docroot

This commit is contained in:
bergware
2023-10-26 14:00:15 +02:00
parent a671e237a0
commit ceeb125ba9
109 changed files with 726 additions and 743 deletions

View File

@@ -1,7 +1,7 @@
<?PHP
/* Copyright 2005-2023, Lime Technology
* Copyright 2015-2023, Derek Macias, Eric Schultz, Jon Panozzo.
* Copyright 2012-2023, Bergware International.
* Copyright 2015-2021, Derek Macias, Eric Schultz, Jon Panozzo.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,
@@ -12,13 +12,13 @@
*/
?>
<?
$docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
$docroot ??= ($_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp');
require_once "$docroot/webGui/include/Helpers.php";
require_once "$docroot/plugins/dynamix.vm.manager/include/libvirt_helpers.php";
// add translations
$_SERVER['REQUEST_URI'] = 'vms';
require_once "$docroot/webGui/include/Translations.php";
require_once "$docroot/webGui/include/Helpers.php";
require_once "$docroot/plugins/dynamix.vm.manager/include/libvirt_helpers.php";
function requireLibvirt() {
global $lv;