Skip to content

Commit 1492c98

Browse files
committed
Enable SSL on “default” if SSL is enabled
Updated version to the last stable version (1.7.6.5 to 1.7.7.1)
1 parent 722149b commit 1492c98

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

web/add/webapp/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
[ 'name'=>'Joomla', 'group'=>'cms', 'enabled'=>false,'version'=>'latest', 'thumbnail'=>'/images/webapps/joomla-thumb.png' ],
3737

3838
[ 'name'=>'Opencart', 'group'=>'ecommerce', 'enabled'=>true, 'version'=>'3.0.3.3', 'thumbnail'=>'/images/webapps/opencart-thumb.png' ],
39-
[ 'name'=>'Prestashop', 'group'=>'ecommerce', 'enabled'=>true, 'version'=>'1.7.6.5', 'thumbnail'=>'/images/webapps/prestashop-thumb.png' ],
39+
[ 'name'=>'Prestashop', 'group'=>'ecommerce', 'enabled'=>true, 'version'=>'1.7.7.1', 'thumbnail'=>'/images/webapps/prestashop-thumb.png' ],
4040

4141
[ 'name'=>'Laravel', 'group'=>'starter', 'enabled'=>true, 'version'=>'7.x', 'thumbnail'=>'/images/webapps/laravel-thumb.png' ],
4242
[ 'name'=>'Symfony', 'group'=>'starter', 'enabled'=>true, 'version'=>'4.3.x', 'thumbnail'=>'/images/webapps/symfony-thumb.png' ],

web/src/app/WebApp/Installers/PrestashopSetup.php

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,23 @@ class PrestashopSetup extends BaseSetup {
1616
],
1717
'database' => true,
1818
'resources' => [
19-
'archive' => [ 'src' => 'https://github.com/PrestaShop/PrestaShop/releases/download/1.7.6.5/prestashop_1.7.6.5.zip' ],
19+
'archive' => [ 'src' => 'https://github.com/PrestaShop/PrestaShop/releases/download/1.7.7.1/prestashop_1.7.7.1.zip' ],
2020
],
2121

2222
];
2323

2424
public function install(array $options=null) : bool
2525
{
2626
parent::install($options);
27-
2827
$this->appcontext->archiveExtract($this->getDocRoot($this->extractsubdir . '/prestashop.zip'), $this->getDocRoot());
29-
28+
//check if ssl is enabled
29+
$this->appcontext->run('v-list-web-domain',[$this -> appcontext->user(),$this -> domain,'json'],$status);
30+
if($status->code !== 0) {
31+
throw new \Exception("Cannot list domain");
32+
}
33+
34+
if ($status -> json == 'no'){ $ssl_enabled = 0; }else{ $ssl_enabled = 1;}
35+
3036
$this->appcontext->runUser('v-run-cli-cmd', [
3137
"/usr/bin/php",
3238
$this->getDocRoot("/install/index_cli.php"),
@@ -37,8 +43,9 @@ public function install(array $options=null) : bool
3743
"--lastname=" . $options['prestashop_account_last_name'],
3844
"--password=" . $options['prestashop_account_password'],
3945
"--email=" . $options['prestashop_account_email'],
40-
"--domain=" . $this->domain], $status);
41-
46+
"--domain=" . $this->domain,
47+
"--ssl=" . $ssl_enabled,], $status);
48+
4249
// remove install folder
4350
$this->appcontext->runUser('v-delete-fs-directory', [$this->getDocRoot("/install")]);
4451
$this->cleanup();

0 commit comments

Comments
 (0)