Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
24ac1a1f
Commit
24ac1a1f
authored
18 years ago
by
Dries Buytaert
Browse files
Options
Downloads
Patches
Plain Diff
- Patch
#85257
by RobRoy: fixed default upload restrictions.
parent
845ff1c1
Loading
Loading
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/upload/upload.module
+2
-2
2 additions, 2 deletions
modules/upload/upload.module
with
2 additions
and
2 deletions
modules/upload/upload.module
+
2
−
2
View file @
24ac1a1f
...
@@ -167,7 +167,7 @@ function upload_admin_settings_validate($form_id, $form_values) {
...
@@ -167,7 +167,7 @@ function upload_admin_settings_validate($form_id, $form_values) {
function
upload_admin_settings
()
{
function
upload_admin_settings
()
{
$upload_extensions_default
=
variable_get
(
'upload_extensions_default'
,
'jpg jpeg gif png txt html doc xls pdf ppt pps'
);
$upload_extensions_default
=
variable_get
(
'upload_extensions_default'
,
'jpg jpeg gif png txt html doc xls pdf ppt pps'
);
$upload_uploadsize_default
=
variable_get
(
'upload_uploadsize_default'
,
1
);
$upload_uploadsize_default
=
variable_get
(
'upload_uploadsize_default'
,
1
);
$upload_usersize_default
=
variable_get
(
'upload_usersize_default'
,
1
0
);
$upload_usersize_default
=
variable_get
(
'upload_usersize_default'
,
1
);
$form
[
'settings_general'
]
=
array
(
$form
[
'settings_general'
]
=
array
(
'#type'
=>
'fieldset'
,
'#type'
=>
'fieldset'
,
...
@@ -418,7 +418,7 @@ function _upload_validate(&$node) {
...
@@ -418,7 +418,7 @@ function _upload_validate(&$node) {
foreach
(
$user
->
roles
as
$rid
=>
$name
)
{
foreach
(
$user
->
roles
as
$rid
=>
$name
)
{
$extensions
=
variable_get
(
"upload_extensions_
$rid
"
,
variable_get
(
'upload_extensions_default'
,
'jpg jpeg gif png txt html doc xls pdf ppt pps'
));
$extensions
=
variable_get
(
"upload_extensions_
$rid
"
,
variable_get
(
'upload_extensions_default'
,
'jpg jpeg gif png txt html doc xls pdf ppt pps'
));
$uploadsize
=
variable_get
(
"upload_uploadsize_
$rid
"
,
variable_get
(
'upload_uploadsize_default'
,
1
))
*
1024
*
1024
;
$uploadsize
=
variable_get
(
"upload_uploadsize_
$rid
"
,
variable_get
(
'upload_uploadsize_default'
,
1
))
*
1024
*
1024
;
$usersize
=
variable_get
(
"upload_usersize_
$rid
"
,
variable_get
(
'upload_usersize_default'
,
1
0
))
*
1024
*
1024
;
$usersize
=
variable_get
(
"upload_usersize_
$rid
"
,
variable_get
(
'upload_usersize_default'
,
1
))
*
1024
*
1024
;
$regex
=
'/\.('
.
ereg_replace
(
' +'
,
'|'
,
preg_quote
(
$extensions
))
.
')$/i'
;
$regex
=
'/\.('
.
ereg_replace
(
' +'
,
'|'
,
preg_quote
(
$extensions
))
.
')$/i'
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment