move paths_installed to shared folder CORE #55

This commit is contained in:
Fernando Ontiveros
2025-04-10 01:56:01 +00:00
parent 0e78dccf0f
commit 3a6a219b07
8 changed files with 775 additions and 657 deletions

View File

@@ -822,16 +822,18 @@ class InstallerModule extends Controller
'USR_LASTNAME' => $adminUsername,
'USR_PASSWORD' => G::encryptHash($adminPassword)
]);
// Write the paths_installed.php file (contains all the information configured so far)
if (!file_exists(FILE_PATHS_INSTALLED)) {
$sh = G::encryptOld(filemtime(PATH_GULLIVER . '/class.g.php'));
$h = G::encrypt($db_host . $sh . $db_username . $sh . $db_password, $sh);
$dbText = "<?php\n";
$dbText .= sprintf(" define('PATH_DATA', '%s');\n", $pathShared);
$dbText .= sprintf(" define('PATH_C', '%s');\n", $pathShared . 'compiled/');
$dbText .= sprintf(" define('PATH_C', '%s');\n", PATH_DATA . 'compiled/');
$dbText .= sprintf(" define('HASH_INSTALLATION', '%s');\n", $h);
$dbText .= sprintf(" define('SYSTEM_HASH', '%s');\n", $sh);
$this->installLog(G::LoadTranslation('ID_CREATING', SYS_LANG, [FILE_PATHS_INSTALLED]));
Bootstrap::verifyPath(PATH_DATA . 'config', true);
file_put_contents(FILE_PATHS_INSTALLED, $dbText);
}