diff --git a/.htaccess b/.htaccess index bb415e0..e68dccc 100644 --- a/.htaccess +++ b/.htaccess @@ -23,6 +23,11 @@ ErrorDocument 500 /assets/error-500.html RewriteCond %{REQUEST_URI} ^(.*)$ RewriteCond %{REQUEST_FILENAME} !-f - RewriteRule .* sapphire/main.php?url=%1 [QSA,L] + RewriteRule .* sapphire/main.php?url=%1 [QSA] + + RewriteCond %{REQUEST_URI} ^(.*)/sapphire/main.php$ + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule . %1/install.php? [R,L] + ### SILVERSTRIPE END ### diff --git a/install-sapphiremissing.html b/install-sapphiremissing.html new file mode 100644 index 0000000..5f75a04 --- /dev/null +++ b/install-sapphiremissing.html @@ -0,0 +1,42 @@ + + + The sapphire module is missing + + + + + + +
+
+ + + +
+ +
+
+

The sapphire module is missing

+

To run the installer, at least the sapphire module and the blackcandy theme are required

+ +

If you downloaded a pre-packaged zip or tar.gz, something might have gone wrong with the packaging + process. Please try re-downloading, or try an older version

+ +

If you downloaded this from github, you need to install the sapphire and blackcandy code bases + in subdirectories of this directory. You can do this manually, or by running the tools/new-project + script from the command line

+
+
+
+
+ + +
+ + \ No newline at end of file diff --git a/install.php b/install.php index fd5f095..1154621 100644 --- a/install.php +++ b/install.php @@ -9,4 +9,5 @@ ************************************************************************************ ************************************************************************************/ -include('./sapphire/dev/install/install.php'); +if (!file_exists('sapphire') || !file_exists('sapphire/_config.php')) include "install-sapphiremissing.html"; +else include('./sapphire/dev/install/install.php');