Просмотр исходного кода

[WebApp] Remove placeholder files from web domain root before starting the install process

Robert Zollner 6 лет назад
Родитель
Сommit
049ba1cf45

+ 2 - 0
web/src/app/WebApp/InstallerInterface.php

@@ -6,4 +6,6 @@ namespace Hestia\WebApp;
 interface InstallerInterface
 {
     public function install(array $options = null);
+    public function getDocRoot(string $append_relative_path = null) : string;
+    public function withDatabase() : bool;
 }

+ 2 - 0
web/src/app/WebApp/Installers/BaseSetup.php

@@ -70,6 +70,8 @@ abstract class BaseSetup implements InstallerInterface {
 
     public function install(array $options=null)
     {
+        $this->appcontext->runUser('v-delete-fs-file', [$this->getDocRoot('robots.txt')]);
+        $this->appcontext->runUser('v-delete-fs-file', [$this->getDocRoot('index.html')]);
         return $this->retrieveResources($options);
     }