diff --git a/classes/Importer.php b/classes/Importer.php index 99d459344785c404f8bd7b037be4d87e1b8d0224..eb74bc69677017b17fbf4c7863abbdf811d595b0 100644 --- a/classes/Importer.php +++ b/classes/Importer.php @@ -375,6 +375,7 @@ final class Importer private function showInterface(): void { + $import_url = $this->configuration->getConfigValue('conf' , 'basedir') . 'import'; echo <<<HTML <html lang="eng"> <head> @@ -385,9 +386,9 @@ final class Importer You can paste the data obtained from another LODSPeaKr instance here in the box. You can also automatize this import by adding a parameter '?import=URL' to this page. Usually, the URL will be of the for <pre>https://example.com/export</pre> - <form action='" . $this->basedir . "/import' method='post'> - <textarea cols='100' rows='25' name='importtext'></textarea> - <input type='submit' value='Import'/> + <form action="$import_url" method="post"> + <textarea cols="100" rows="25" name="importtext"></textarea> + <input type="submit" value="Import"/> </form> </body> </html> @@ -396,6 +397,7 @@ HTML; private function showFinishing(): void { + $base_dir = $this->configuration->getConfigValue('conf' , 'basedir'); echo <<<HTML <html lang="eng"> <head> @@ -403,7 +405,7 @@ HTML; </head> <body> <h2>Import finished</h2> - Your new application is ready. Please go to the <a href='" . $this->basedir . "'>home page</a>. + Your new application is ready. Please go to the <a href="$base_dir">home page</a>. </body> </html> HTML;