go("SELECT dominio FROM b_enti WHERE attivo = 'S' AND (dominio <> '' OR dominio IS NOT NULL) AND db = 'S'")->fetchAll(PDO::FETCH_ASSOC); if (!empty($enti)) { class User { public $codice = -1; public $gerarchia = -1; public $elaborazioneCoda = true; public $authenticationLevel = 2; public $spidUser = false; public $readOnly = false; public function hasSuperPowers() : Bool { return true; } } $_SESSION["utente"]= new User; if (!defined("__CMDS_JOB_EXEC")) { define("__CMDS_JOB_EXEC", TRUE); } NuovaPiattaformaAppalti::rotateLogs(); foreach($enti as $dbEnte) { alertManager::printCliSuccess("Elaborazioni Tenant: {$dbEnte["dominio"]}"); $ente = new ente(); $ente->excludeConnector = true; if ($ente->init($dbEnte["dominio"])) { $pdo->setConnessioneEnte($ente->codice); $_SESSION["ente"] = $ente; if (! empty($ente->getInfo()["dominio"])) { $_SESSION["config"]["link_sito"] = $config["protocollo"] . $ente->getInfo()["dominio"]; } $_SESSION["config"]["nome_sito"] = $config["nome_sito"] . " - " . $ente->getInfo()["denominazione"]; } $to_include = [ __DIR__ . "/tenant/update_oidc.php", __DIR__ . "/tenant/invia_inviti_programmati.php", __DIR__ . "/tenant/alert_revisioni.php", __DIR__ . "/tenant/check_revisioni.php", __DIR__ . "/tenant/deadline_form.php", __DIR__ . "/tenant/update_hub.php", __DIR__ . "/tenant/update_guue.php", __DIR__ . "/tenant/sync_tuttoverifiche.php", __DIR__ . "/tenant/gestisci_documenti_contratti.php", __DIR__ . "/tenant/integrazioni.php", __DIR__ . "/tenant/remove_old_preservation_zip.php", __DIR__ . "/npa/conferma.php", __DIR__ . "/npa/pubblica.php", __DIR__ . "/npa/autopubblica.php", __DIR__ . "/npa/avviso.php", __DIR__ . "/npa/fvoe.php", __DIR__ . "/tenant/procureplus.php", ]; foreach ($to_include as $path) { try { alertManager::printCliInfo("- Caricamento di {$path}"); require $path; } catch (\Throwable $t) { $alert = <<getMessage()} {$t->getTraceAsString()} ERR; alertManager::printCliAlert($alert); ec_create_ticket("Eccezione in {$path}", $alert, $ente->codice ?? 0); } }; unset($ente); unset($_SESSION["ente"]); } } } ?>