2013-06-26 13:15:43 -04:00
|
|
|
<?php
|
2013-06-26 14:54:37 -04:00
|
|
|
CLI::taskName("hotfix-install");
|
2013-06-26 13:15:43 -04:00
|
|
|
|
|
|
|
|
CLI::taskDescription(<<<EOT
|
2013-06-26 14:54:37 -04:00
|
|
|
Install hotfix to system
|
2013-06-26 13:15:43 -04:00
|
|
|
|
2015-07-20 12:02:33 -04:00
|
|
|
This command installs a hotfix, which updates ProcessMaker in order to add improvements or fix bugs.
|
2013-06-26 13:15:43 -04:00
|
|
|
EOT
|
|
|
|
|
);
|
|
|
|
|
|
2014-03-17 11:54:09 -04:00
|
|
|
CLI::taskRun("runHotfixInstall");
|
2013-06-26 13:15:43 -04:00
|
|
|
|
2013-06-26 14:54:37 -04:00
|
|
|
function runHotfixInstall($command, $args)
|
2013-06-26 13:15:43 -04:00
|
|
|
{
|
2013-06-26 14:54:37 -04:00
|
|
|
CLI::logging("HOTFIX", PATH_DATA . "log" . PATH_SEP . "upgrades.log");
|
|
|
|
|
CLI::logging("Install hotfix to system\n");
|
2013-06-26 13:15:43 -04:00
|
|
|
|
|
|
|
|
$arrayFile = $command;
|
|
|
|
|
|
|
|
|
|
if (count($arrayFile) > 0) {
|
2013-06-26 14:54:37 -04:00
|
|
|
//Install hotfix
|
2013-06-26 13:15:43 -04:00
|
|
|
foreach ($arrayFile as $value) {
|
|
|
|
|
$f = $value;
|
|
|
|
|
|
2017-08-11 14:10:44 -04:00
|
|
|
$result = WorkspaceTools::hotfixInstall($f);
|
2013-06-26 13:15:43 -04:00
|
|
|
|
|
|
|
|
CLI::logging($result["message"] . "\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//Clear server's cache
|
|
|
|
|
CLI::logging("\nClearing cache...\n");
|
|
|
|
|
|
|
|
|
|
if (defined("PATH_C")) {
|
|
|
|
|
G::rm_dir(PATH_C);
|
|
|
|
|
G::mk_dir(PATH_C, 0777);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//Safe upgrade for JavaScript files
|
|
|
|
|
CLI::logging("\nSafe upgrade for files cached by the browser\n\n");
|
|
|
|
|
|
|
|
|
|
G::browserCacheFilesSetUid();
|
|
|
|
|
|
2013-06-26 14:54:37 -04:00
|
|
|
CLI::logging("HOTFIX done\n");
|
2013-06-26 13:15:43 -04:00
|
|
|
} else {
|
2013-06-26 15:24:18 -04:00
|
|
|
CLI::logging("Please specify the hotfix to install\n");
|
2013-06-26 13:15:43 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|