Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
23faf5a2
Commit
23faf5a2
authored
Jun 20, 2013
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#1999370
by chertzog, kim.pepper: Use Symfony Request for file module.
parent
0ed76f0d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
core/modules/file/file.install
core/modules/file/file.install
+3
-2
core/modules/file/file.module
core/modules/file/file.module
+2
-1
No files found.
core/modules/file/file.install
View file @
23faf5a2
...
...
@@ -197,8 +197,9 @@ function file_requirements($phase) {
// Check the server's ability to indicate upload progress.
if
(
$phase
==
'runtime'
)
{
$implementation
=
file_progress_implementation
();
$apache
=
strpos
(
$_SERVER
[
'SERVER_SOFTWARE'
],
'Apache'
)
!==
FALSE
;
$fastcgi
=
strpos
(
$_SERVER
[
'SERVER_SOFTWARE'
],
'mod_fastcgi'
)
!==
FALSE
||
strpos
(
$_SERVER
[
"SERVER_SOFTWARE"
],
'mod_fcgi'
)
!==
FALSE
;
$server_software
=
Drupal
::
request
()
->
server
->
get
(
'SERVER_SOFTWARE'
);
$apache
=
strpos
(
$server_software
,
'Apache'
)
!==
FALSE
;
$fastcgi
=
strpos
(
$server_software
,
'mod_fastcgi'
)
!==
FALSE
||
strpos
(
$server_software
,
'mod_fcgi'
)
!==
FALSE
;
$description
=
NULL
;
if
(
!
$apache
)
{
$value
=
t
(
'Not enabled'
);
...
...
core/modules/file/file.module
View file @
23faf5a2
...
...
@@ -736,7 +736,8 @@ function file_ajax_upload() {
$form_parents
=
func_get_args
();
$form_build_id
=
(
string
)
array_pop
(
$form_parents
);
if
(
empty
(
$_POST
[
'form_build_id'
])
||
$form_build_id
!=
$_POST
[
'form_build_id'
])
{
$request
=
\
Drupal
::
request
();
if
(
!
$request
->
request
->
has
(
'form_build_id'
)
||
$form_build_id
!=
$request
->
request
->
get
(
'form_build_id'
))
{
// Invalid request.
drupal_set_message
(
t
(
'An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (@size) that this server supports.'
,
array
(
'@size'
=>
format_size
(
file_upload_max_size
()))),
'error'
);
$response
=
new
AjaxResponse
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment