diff --git a/composer.json b/composer.json index 8acdd1779..5a1e47921 100644 --- a/composer.json +++ b/composer.json @@ -64,7 +64,8 @@ }, "expose": [ "client/images", - "client/styles" + "client/styles", + "src/Dev/Install/client" ] }, "autoload": { diff --git a/main.css b/main.css deleted file mode 100644 index f282db8df..000000000 --- a/main.css +++ /dev/null @@ -1,53 +0,0 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.loaded = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ function(module, exports, __webpack_require__) { - - (function webpackMissingModule() { throw new Error("Cannot find module \"—watch\""); }()); - (function webpackMissingModule() { throw new Error("Cannot find module \"—profile\""); }()); - - -/***/ } -/******/ ]); -/*# sourceMappingURL=main.css.map*/ \ No newline at end of file diff --git a/src/Dev/Install/InstallRequirements.php b/src/Dev/Install/InstallRequirements.php index be28fbcf4..896047ca8 100644 --- a/src/Dev/Install/InstallRequirements.php +++ b/src/Dev/Install/InstallRequirements.php @@ -199,7 +199,7 @@ class InstallRequirements )); // Check that we can identify the root folder successfully - $this->requireFile('framework/src/Dev/Install/config-form.html', array( + $this->requireFile('vendor/silverstripe/framework/src/Dev/Install/config-form.html', array( "File permissions", "Does the webserver know where files are stored?", "The webserver isn't letting me identify where files are stored.", @@ -211,9 +211,9 @@ class InstallRequirements "mysite/ directory exists?", '' )); - $this->requireModule('framework', array( + $this->requireModule('vendor/silverstripe/framework', array( "File permissions", - "framework/ directory exists?", + "vendor/silverstripe/framework/ directory exists?", '', )); diff --git a/src/Dev/Install/Installer.php b/src/Dev/Install/Installer.php index e6b374008..26886face 100644 --- a/src/Dev/Install/Installer.php +++ b/src/Dev/Install/Installer.php @@ -34,7 +34,7 @@ class Installer extends InstallRequirements Installing SilverStripe... + href="resources/silverstripe/framework/src/Dev/Install/client/styles/install.css"/> @@ -439,25 +439,26 @@ ErrorDocument 500 /assets/error-500.html $cgiClause # Deny access to vendor, unless you're requesting main.php - RewriteCond %{REQUEST_URI} !^/vendor/silverstripe/framework/main\.php - RewriteRule ^vendor(/|$) - [F,L,NC]s + # Not restricting to the start of the path to support RewriteBase + RewriteCond %{REQUEST_URI} !/vendor/silverstripe/framework/main\.php + RewriteRule ^vendor(/|$) - [F,L,NC] - # Deny access to potentially sensitive files and folders - RewriteRule ^\.env - [F,L,NC] - RewriteRule silverstripe-cache(/|$) - [F,L,NC] - RewriteRule composer\.(json|lock) - [F,L,NC] - RewriteRule (error|silverstripe|debug)\.log - [F,L,NC] + # Deny access to potentially sensitive files and folders + RewriteRule ^\.env - [F,L,NC] + RewriteRule silverstripe-cache(/|$) - [F,L,NC] + RewriteRule composer\.(json|lock) - [F,L,NC] + RewriteRule (error|silverstripe|debug)\.log - [F,L,NC] # Deny access to potentially sensitive files and folders RewriteRule silverstripe-cache(/|$) - [F,L,NC] RewriteRule composer\.(json|lock) - [F,L,NC] # Process through SilverStripe if no file with the requested name exists. - # Pass through the original path as a query parameter, and retain the existing parameters. - # Try finding framework in the vendor folder first - RewriteCond %{REQUEST_URI} ^(.*)$ - RewriteCond %{REQUEST_FILENAME} !-f - RewriteRule .* vendor/silverstripe/framework/main.php?url=%1 [QSA] + # Pass through the original path as a query parameter, and retain the existing parameters. + # Try finding framework in the vendor folder first + RewriteCond %{REQUEST_URI} ^(.*)$ + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule .* vendor/silverstripe/framework/main.php?url=%1 [QSA] TEXT; diff --git a/src/Dev/Install/install5.php b/src/Dev/Install/install5.php index 49479b9e2..a55be3f6e 100755 --- a/src/Dev/Install/install5.php +++ b/src/Dev/Install/install5.php @@ -104,8 +104,8 @@ if ($installFromCli && ($req->hasErrors() || $dbReq->hasErrors())) { exit(1); } -// Path to client resources -$clientPath = (FRAMEWORK_DIR ? FRAMEWORK_DIR . '/' : '') . 'src/Dev/Install/client'; +// Path to client resources (copied through silverstripe/vendor-plugin) +$clientPath = 'resources/silverstripe/framework/src/Dev/Install/client'; // config-form.html vars (placeholder to prevent deletion)