Removing deprecated references and files

This commit is contained in:
Fernando Ontiveros
2025-04-02 00:00:00 +00:00
parent 884e67f883
commit d3bd0fcfbc
117 changed files with 40 additions and 14127 deletions

View File

@@ -2306,11 +2306,6 @@ class WorkspaceTools
CLI::logging("* End converting Output Documents from 'HTML2PDF' to 'TCPDF...(Completed on " . (microtime(true) - $start) . " seconds)\n");
}
CLI::logging("> Start To Verify License Enterprise...\n");
$start = microtime(true);
$workspace->verifyLicenseEnterprise($workspaceName);
CLI::logging("* End To Verify License Enterprise...(" . (microtime(true) - $start) . " seconds)\n");
// Updating generated class files for PM Tables
passthru(PHP_BINARY . ' processmaker regenerate-pmtable-classes ' . $workspaceName);
}
@@ -2457,88 +2452,6 @@ class WorkspaceTools
}
}
public function changeHashPassword($workspace, $response)
{
$this->initPropel(true);
EnterpriseClass::setHashPassword($response);
return true;
}
public function verifyFilesOldEnterprise()
{
$pathBackup = PATH_DATA . 'backups';
if (!file_exists($pathBackup)) {
G::mk_dir($pathBackup, 0777);
}
$pathNewFile = PATH_DATA . 'backups' . PATH_SEP . 'enterpriseBackup';
$pathDirectoryEnterprise = PATH_CORE . 'plugins' . PATH_SEP . 'enterprise';
$pathFileEnterprise = PATH_CORE . 'plugins' . PATH_SEP . 'enterprise.php';
if (!file_exists($pathDirectoryEnterprise) && !file_exists($pathFileEnterprise)) {
CLI::logging(" Without changes... \n");
return true;
}
CLI::logging(" Migrating Enterprise Core version...\n");
if (!file_exists($pathNewFile)) {
CLI::logging(" Creating folder in $pathNewFile\n");
G::mk_dir($pathNewFile, 0777);
}
$shared_stat = stat(PATH_DATA);
if (file_exists($pathDirectoryEnterprise)) {
CLI::logging(" Copying Enterprise Directory to $pathNewFile...\n");
if ($shared_stat !== false) {
WorkspaceTools::dirPerms($pathDirectoryEnterprise, $shared_stat['uid'], $shared_stat['gid'], $shared_stat['mode'] & 0777);
} else {
CLI::logging(CLI::error("Could not get shared folder permissions, workspace permissions couldn't be changed") . "\n");
}
if (G::recursive_copy($pathDirectoryEnterprise, $pathNewFile . PATH_SEP . 'enterprise')) {
CLI::logging(" Removing $pathDirectoryEnterprise...\n");
G::rm_dir($pathDirectoryEnterprise);
} else {
CLI::logging(CLI::error(" Error: Failure to copy from $pathDirectoryEnterprise...\n"));
}
if (file_exists($pathDirectoryEnterprise)) {
CLI::logging(CLI::info(" Remove manually $pathDirectoryEnterprise...\n"));
}
}
if (file_exists($pathFileEnterprise)) {
CLI::logging(" Copying Enterprise.php file to $pathNewFile...\n");
if ($shared_stat !== false) {
WorkspaceTools::dirPerms($pathFileEnterprise, $shared_stat['uid'], $shared_stat['gid'], $shared_stat['mode'] & 0777);
} else {
CLI::logging(CLI::error("Could not get shared folder permissions, workspace permissions couldn't be changed") . "\n");
}
CLI::logging(" Removing $pathFileEnterprise...\n");
copy($pathFileEnterprise, $pathNewFile . PATH_SEP . 'enterprise.php');
G::rm_dir($pathFileEnterprise);
if (file_exists($pathFileEnterprise)) {
CLI::logging(CLI::info(" Remove manually $pathFileEnterprise...\n"));
}
}
}
/**
* @param $workspace
*/
public function verifyLicenseEnterprise($workspace)
{
$this->initPropel(true);
$oCriteria = new Criteria('workflow');
$oCriteria->add(LicenseManagerPeer::LICENSE_STATUS, 'ACTIVE');
$oDataset = LicenseManagerPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
if ($oDataset->next()) {
$row = $oDataset->getRow();
$tr = LicenseManagerPeer::retrieveByPK($row['LICENSE_UID']);
$tr->setLicensePath(PATH_DATA_SITE . basename($row['LICENSE_PATH']));
$tr->setLicenseWorkspace($workspace);
$res = $tr->save();
}
}
/**
* Generate data for table APP_ASSIGN_SELF_SERVICE_VALUE
*
@@ -3294,29 +3207,6 @@ class WorkspaceTools
}
}
/**
* Verify feature
*
* @param string $featureName Feature name
*
* return bool Return true if is valid the feature, false otherwise
*/
public function pmLicensedFeaturesVerifyFeature($featureName)
{
try {
$this->initPropel(true);
$flag = PMLicensedFeatures::getSingleton()->verifyfeature($featureName);
$this->close();
//Return
return $flag;
} catch (Exception $e) {
throw $e;
}
}
/**
* Process files upgrade, store the information in the DB
*