mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ENH Set the default resources dir to "_resources"
This commit is contained in:
parent
37dc0daacc
commit
ee4144fc35
@ -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…
Reference in New Issue
Block a user