feature/HOR-3505

Implement creation of default framework folders during PM installation and upgrade.
This commit is contained in:
davidcallizaya
2017-07-28 11:33:56 -04:00
parent de1346aa96
commit 5ccb742b8d
2 changed files with 47 additions and 0 deletions

View File

@@ -199,6 +199,12 @@ class workspaceTools
$this->updatingWebEntryClassicModel($workSpace);
$stop = microtime(true);
CLI::logging("<*> Updating rows in Web Entry table for classic processes took " . ($stop - $start) . " seconds.\n");
$start = microtime(true);
CLI::logging("> Update framework paths...\n");
$this->updatingFrameworkPaths($workSpace);
$stop = microtime(true);
CLI::logging("<*> Update framework paths took " . ($stop - $start) . " seconds.\n");
}
/**
@@ -3898,4 +3904,22 @@ class workspaceTools
CLI::logging(CLI::error("Error:" . "Error updating generated class files for PM Tables, proceed to regenerate manually: " . $e));
}
}
/**
* Updating framework directory structure
*
*/
private function updatingFrameworkPaths($workSpace = SYS_SYS)
{
$paths = [
PATH_DATA.'framework' => 0770,
PATH_DATA.'framework'.DIRECTORY_SEPARATOR.'cache' => 0770,
];
foreach ($paths as $path => $permission) {
if (!file_exists($path)) {
G::mk_dir($path, $permission);
}
CLI::logging(" $path [".(file_exists($path) ? 'OK' : 'MISSING')."]\n");
}
}
}