mirror of
https://github.com/silverstripe/silverstripe-installer
synced 2024-10-22 17:05:33 +02:00
BUGFIX: If sapphire hasn't been installed as subdirectory, give error message rather than erroring out with a 500 or a php error
This commit is contained in:
parent
c7b6eab151
commit
d5723f7b0e
@ -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]
|
||||
|
||||
</IfModule>
|
||||
### SILVERSTRIPE END ###
|
||||
|
42
install-sapphiremissing.html
Normal file
42
install-sapphiremissing.html
Normal file
@ -0,0 +1,42 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>The sapphire module is missing</title>
|
||||
<link rel="stylesheet" type="text/css" href="themes/blackcandy/css/layout.css" />
|
||||
<link rel="stylesheet" type="text/css" href="themes/blackcandy/css/typography.css" />
|
||||
<link rel="stylesheet" type="text/css" href="themes/blackcandy/css/form.css" />
|
||||
<link rel="stylesheet" type="text/css" href="sapphire/dev/install/install.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="BgContainer">
|
||||
<div id="Container">
|
||||
<div id="Header">
|
||||
<h1>SilverStripe CMS Installation</h1>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="Navigation"> </div>
|
||||
<div class="clear"><!-- --></div>
|
||||
|
||||
<div id="Layout">
|
||||
<div class="typography">
|
||||
<h1>The sapphire module is missing</h1>
|
||||
<h2>To run the installer, at least the sapphire module and the blackcandy theme are required</h2>
|
||||
|
||||
<p>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</p>
|
||||
|
||||
<p>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</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"><!-- --></div>
|
||||
</div>
|
||||
|
||||
<div id="Footer">
|
||||
<div class="footerTop"><!-- --></div>
|
||||
<p><a href="http://silverstripe.org">SilverStripe Open Source CMS</a> | Copyright © 2008-2011 SilverStripe Limited</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user