|
|
@@ -2342,9 +2342,9 @@ function MakeCommand($command_id,$command,$installer_tmp,$installer_dir) {
|
|
|
return $ins_sh;
|
|
|
}
|
|
|
|
|
|
-function encodePhpFiles($installer_dir, $domains = [], $domainEncodePhpFiles = []) {
|
|
|
+function encodePhpFiles($installer_dir, $domains = "", $domainEncodePhpFiles = []) {
|
|
|
if (empty($installer_dir)) throw new Exception("Install path not found");
|
|
|
- if ($domainEncodePhpFiles and empty($domains)) throw new Exception("Domains not definied");
|
|
|
+ if ($domainEncodePhpFiles and (!$domains)) throw new Exception("Domains not definied");
|
|
|
|
|
|
$phpVersionsForSgencoder = '--phpversion 5.5 --phpversion 5.6';// encode for PHP 5.x (currently supported PHP 5.0-5.6)
|
|
|
|
|
|
@@ -2374,12 +2374,12 @@ function encodePhpFiles($installer_dir, $domains = [], $domainEncodePhpFiles = [
|
|
|
// if (empty($freeEncodePhpFiles)) throw new Exception("No php files to encode");
|
|
|
|
|
|
$cmdTempl = "cd {$installer_dir} && /Applications/SourceGuardian.app/Contents/MacOS/sgencoder {$phpVersionsForSgencoder} -b- ";
|
|
|
- $cmdDomainEncodeDomainsTempl = " --domain " . implode(" --domain ", array_merge($domains, ['localhost']));
|
|
|
+// $cmdDomainEncodeDomainsTempl = " --domain " . implode(" --domain ", array_merge($domains, ['localhost']));
|
|
|
$cmdDomainEncodeFilesTempl = " " . implode(" ", $domainEncodePhpFiles);
|
|
|
$cmdFreeEncodeFilesTempl = " " . implode(" ", $freeEncodePhpFiles);
|
|
|
|
|
|
$cmds = [];
|
|
|
- if ($domainEncodePhpFiles) $cmds['domainEncodePhpFiles'] = $cmdTempl . $cmdDomainEncodeDomainsTempl . $cmdDomainEncodeFilesTempl;
|
|
|
+ if ($domainEncodePhpFiles) $cmds['domainEncodePhpFiles'] = $cmdTempl . $domains . $cmdDomainEncodeFilesTempl;
|
|
|
if ($freeEncodePhpFiles) $cmds['freeEncodePhpFiles'] = $cmdTempl . $cmdFreeEncodeFilesTempl;
|
|
|
|
|
|
$returnValues = [];
|