mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-14 14:18:44 +02:00
Compare commits
3 Commits
feature/88
...
issue/9503
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7fce0cc7af | ||
|
|
8172910c8b | ||
|
|
1222507205 |
@@ -17,7 +17,7 @@
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with iTop. If not, see <http://www.gnu.org/licenses/>
|
||||
|
||||
require_once(APPROOT.'setup/setuppage.class.inc.php');
|
||||
//require_once(APPROOT.'setup/setuppage.class.inc.php');
|
||||
|
||||
/**
|
||||
* Class ModuleInstaller
|
||||
|
||||
@@ -54,10 +54,9 @@ class DataAuditSequencer extends StepSequencer
|
||||
$aSelectedModules = $this->oParams->Get('selected_modules', []);
|
||||
$sSourceDir = $this->oParams->Get('source_dir', 'datamodels/latest');
|
||||
$sExtensionDir = $this->oParams->Get('extensions_dir', 'extensions');
|
||||
$aMiscOptions = $this->oParams->Get('options', []);
|
||||
$aRemovedExtensionCodes = $this->oParams->Get('removed_extensions', []);
|
||||
$bUseSymbolicLinks = $aMiscOptions['symlinks'] ?? false;
|
||||
$sMessage = $bUseSymbolicLinks ? '' : 'Using symbolic links instead of copying data model files (for developers only!)';
|
||||
$bUseSymbolicLinks = $this->oParams->Get('use-symbolic-links', null) === 'on';
|
||||
$sMessage = $bUseSymbolicLinks ? 'Using symbolic links instead of copying data model files (for developers only!)' : '';
|
||||
$this->oRunTimeEnvironment->DoCompile(
|
||||
$aRemovedExtensionCodes,
|
||||
$aSelectedModules,
|
||||
|
||||
@@ -846,14 +846,19 @@ class SetupUtils
|
||||
// Skip
|
||||
continue;
|
||||
}
|
||||
if (is_dir($sSource.'/'.$sFile)) {
|
||||
$sSourcePath = $sSource.'/'.$sFile;
|
||||
$sDestPath = $sDest.'/'.$sFile;
|
||||
if (is_dir($sSourcePath)) {
|
||||
// Recurse
|
||||
self::copydir($sSource.'/'.$sFile, $sDest.'/'.$sFile, $bUseSymbolicLinks);
|
||||
self::copydir($sSourcePath, $sDestPath, $bUseSymbolicLinks);
|
||||
} elseif (is_link($sSourcePath)) {
|
||||
$sLinkPath = readlink($sSourcePath);
|
||||
symlink($sLinkPath, $sDestPath);
|
||||
} else {
|
||||
if ($bUseSymbolicLinks) {
|
||||
symlink($sSource.'/'.$sFile, $sDest.'/'.$sFile);
|
||||
symlink($sSourcePath, $sDestPath);
|
||||
} else {
|
||||
copy($sSource.'/'.$sFile, $sDest.'/'.$sFile);
|
||||
copy($sSourcePath, $sDestPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -862,6 +867,9 @@ class SetupUtils
|
||||
} elseif (is_file($sSource)) {
|
||||
if ($bUseSymbolicLinks) {
|
||||
return symlink($sSource, $sDest);
|
||||
} elseif (is_link($sSource)) {
|
||||
$sLinkPath = readlink($sSource);
|
||||
return symlink($sLinkPath, $sDest);
|
||||
} else {
|
||||
return copy($sSource, $sDest);
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ class WizStepInstallMiscParams extends AbstractWizStepMiscParams
|
||||
$this->oWizard->SaveParameter('application_url', '');
|
||||
$this->oWizard->SaveParameter('graphviz_path', '');
|
||||
$this->oWizard->SaveParameter('sample_data', 'yes');
|
||||
$this->oWizard->SaveParameter('use-symbolic-links', false);
|
||||
return new WizardState(WizStepModulesChoice::class, 'start_install');
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ class WizStepUpgradeMiscParams extends AbstractWizStepMiscParams
|
||||
{
|
||||
$this->oWizard->SaveParameter('application_url', '');
|
||||
$this->oWizard->SaveParameter('graphviz_path', '');
|
||||
$this->oWizard->SaveParameter('use-symbolic-links', MFCompiler::UseSymbolicLinks());
|
||||
$this->oWizard->SaveParameter('use-symbolic-links', false);
|
||||
$this->oWizard->SaveParameter('force-uninstall', false);
|
||||
return new WizardState(WizStepModulesChoice::class, 'start_upgrade');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user