|
@@ -150,8 +150,7 @@ jQuery(document).ready(function () {
|
|
|
$idLicence = V::get('licence_id', 0, $_POST, 'int');
|
|
$idLicence = V::get('licence_id', 0, $_POST, 'int');
|
|
|
$appLicenceInfo = $this->getAppLicenceInfo($idLicence);
|
|
$appLicenceInfo = $this->getAppLicenceInfo($idLicence);
|
|
|
$this->validateAppLicenceInfo($appLicenceInfo);
|
|
$this->validateAppLicenceInfo($appLicenceInfo);
|
|
|
- $projects = [ 'bravecare' ]; // TODO: fetch from $appLicenceInfo->projects = [ ... ]
|
|
|
|
|
- $this->gitResetHard($appLicenceInfo->installPath, $projects);
|
|
|
|
|
|
|
+ $this->gitResetHard($appLicenceInfo->installPath, $appLicenceInfo->projects);
|
|
|
flush();
|
|
flush();
|
|
|
$this->_encodeSource($appLicenceInfo->installPath, $appLicenceInfo->domains);
|
|
$this->_encodeSource($appLicenceInfo->installPath, $appLicenceInfo->domains);
|
|
|
flush();
|
|
flush();
|
|
@@ -263,8 +262,7 @@ jQuery(document).ready(function () {
|
|
|
$this->validateAppLicenceInfo($appLicenceInfo);
|
|
$this->validateAppLicenceInfo($appLicenceInfo);
|
|
|
|
|
|
|
|
UI::startContainer();
|
|
UI::startContainer();
|
|
|
- $projects = [ 'bravecare' ]; // TODO: fetch from $appLicenceInfo->projects = [ ... ]
|
|
|
|
|
- $this->gitResetHard($appLicenceInfo->installPath, $projects);
|
|
|
|
|
|
|
+ $this->gitResetHard($appLicenceInfo->installPath, $appLicenceInfo->projects);
|
|
|
UI::endContainer();
|
|
UI::endContainer();
|
|
|
} catch (Exception $e) {
|
|
} catch (Exception $e) {
|
|
|
$this->_endWithException($e);
|
|
$this->_endWithException($e);
|
|
@@ -443,6 +441,14 @@ jQuery(document).ready(function () {
|
|
|
if (empty($appLicenceInfo->domains)) throw new Exception("Domains not found."); // TODO: mv to validate
|
|
if (empty($appLicenceInfo->domains)) throw new Exception("Domains not found."); // TODO: mv to validate
|
|
|
$appLicenceInfo->installFolderExists = file_exists("{$appLicenceInfo->installPath}/SE");
|
|
$appLicenceInfo->installFolderExists = file_exists("{$appLicenceInfo->installPath}/SE");
|
|
|
$appLicenceInfo->installFolderGitExists = file_exists("{$appLicenceInfo->installPath}/.git");
|
|
$appLicenceInfo->installFolderGitExists = file_exists("{$appLicenceInfo->installPath}/.git");
|
|
|
|
|
+
|
|
|
|
|
+ $appLicenceInfo->projects = []; // TODO: get from db
|
|
|
|
|
+ if (79 == $idLicence) { // bravecom.procesy5.pl
|
|
|
|
|
+ $appLicenceInfo->projects = [ 'bravecare' ];
|
|
|
|
|
+ } else if (80 == $idLicence) { // bravecom.yellowgroup.pl
|
|
|
|
|
+ $appLicenceInfo->projects = [ 'bocian' ];
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
return $appLicenceInfo;
|
|
return $appLicenceInfo;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -797,8 +803,9 @@ chmod 600 ~/.ssh/authorized_keys;
|
|
|
$cmds[] = "cd {$installPath} && echo `git show-ref --head|head -1|head -c 8` > SE/VERSION ";
|
|
$cmds[] = "cd {$installPath} && echo `git show-ref --head|head -1|head -c 8` > SE/VERSION ";
|
|
|
// TODO: fetch from DB
|
|
// TODO: fetch from DB
|
|
|
{
|
|
{
|
|
|
- $projectName = "bravecare";
|
|
|
|
|
- $cmds[] = "cd {$installPath} && git submodule update --init SE/projects/{$projectName}";
|
|
|
|
|
|
|
+ foreach ($appLicenceInfo->projects as $projectName) {
|
|
|
|
|
+ $cmds[] = "cd {$installPath} && git submodule update --init SE/projects/{$projectName}";
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
foreach ($cmds as $cmd) {
|
|
foreach ($cmds as $cmd) {
|