mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge pull request #10437 from creative-commoners/pulls/5/default-resource-dir
ENH Set the default resources dir to "_resources"
This commit is contained in:
commit
ae3a0d9c65
@ -25,11 +25,6 @@ class ManifestFileFinder extends FileFinder
|
||||
const TESTS_DIR = 'tests';
|
||||
const VENDOR_DIR = 'vendor';
|
||||
|
||||
/**
|
||||
* @deprecated 4.4.0:5.0.0 Use global `RESOURCES_DIR` instead.
|
||||
*/
|
||||
const RESOURCES_DIR = RESOURCES_DIR;
|
||||
|
||||
protected static $default_options = [
|
||||
'include_themes' => false,
|
||||
'ignore_tests' => true,
|
||||
|
@ -219,7 +219,7 @@ if (!defined('TEMP_FOLDER')) {
|
||||
// Define the resource dir constant that will be use to exposed vendor assets
|
||||
if (!defined('RESOURCES_DIR')) {
|
||||
$project = new SilverStripe\Core\Manifest\Module(BASE_PATH, BASE_PATH);
|
||||
$resourcesDir = $project->getResourcesDir() ?: 'resources';
|
||||
$resourcesDir = $project->getResourcesDir() ?: '_resources';
|
||||
if (preg_match('/^[_\-a-z0-9]+$/i', $resourcesDir ?? '')) {
|
||||
define('RESOURCES_DIR', $resourcesDir);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user