mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Don't include web.config in the assets tracked in the File table.
MINOR: Add documentation to File::$allowed_extensions explaining that there are config files to edit in assets/ (from r112961) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114496 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
5dbddba41b
commit
6cec0a083e
@ -98,6 +98,15 @@ class File extends DataObject {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array List of allowed file extensions, enforced through {@link validate()}.
|
* @var array List of allowed file extensions, enforced through {@link validate()}.
|
||||||
|
*
|
||||||
|
* Note: if you modify this, you should also change a configuration file in the assets directory.
|
||||||
|
* Otherwise, the files will be able to be uploaded but they won't be able to be served by the
|
||||||
|
* webserver.
|
||||||
|
*
|
||||||
|
* - If you are running Apahce you will need to change assets/.htaccess
|
||||||
|
* - If you are running IIS you will need to change assets/web.config
|
||||||
|
*
|
||||||
|
* Instructions for the change you need to make are included in a comment in the config file.
|
||||||
*/
|
*/
|
||||||
public static $allowed_extensions = array(
|
public static $allowed_extensions = array(
|
||||||
'','html','htm','xhtml','js','css',
|
'','html','htm','xhtml','js','css',
|
||||||
|
@ -118,7 +118,7 @@ class Folder extends File {
|
|||||||
if(file_exists($baseDir)) {
|
if(file_exists($baseDir)) {
|
||||||
$actualChildren = scandir($baseDir);
|
$actualChildren = scandir($baseDir);
|
||||||
foreach($actualChildren as $actualChild) {
|
foreach($actualChildren as $actualChild) {
|
||||||
if($actualChild[0] == '.' || $actualChild[0] == '_' || substr($actualChild,0,6) == 'Thumbs') {
|
if($actualChild[0] == '.' || $actualChild[0] == '_' || substr($actualChild,0,6) == 'Thumbs' || $actualChild == 'web.config') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user