Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
308
Merge Requests
308
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
b6c1c2fb
Commit
b6c1c2fb
authored
Nov 23, 2014
by
alexpott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2353335
by Devin Carlson, Wim Leers, myforgedoteu: module install cannot save FTP settings
parent
ea24dc51
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
core/authorize.php
core/authorize.php
+9
-12
core/modules/system/src/Tests/System/SystemAuthorizeTest.php
core/modules/system/src/Tests/System/SystemAuthorizeTest.php
+3
-0
No files found.
core/authorize.php
View file @
b6c1c2fb
...
...
@@ -76,7 +76,7 @@ function authorize_access_allowed() {
// Initialize the maintenance theme for this administrative script.
drupal_maintenance_theme
();
$
output
=
''
;
$
content
=
[]
;
$show_messages
=
TRUE
;
$response
=
new
Response
();
...
...
@@ -107,11 +107,10 @@ function authorize_access_allowed() {
drupal_set_message
(
$results
[
'page_message'
][
'message'
],
$results
[
'page_message'
][
'type'
]);
}
$
authorize_report
=
array
(
$
content
[
'authorize_report'
]
=
array
(
'#theme'
=>
'authorize_report'
,
'#messages'
=>
$results
[
'messages'
],
);
$output
=
drupal_render_root
(
$authorize_report
);
$links
=
array
();
if
(
is_array
(
$results
[
'tasks'
]))
{
...
...
@@ -124,25 +123,23 @@ function authorize_access_allowed() {
));
}
$
item_list
=
array
(
$
content
[
'next_steps'
]
=
array
(
'#theme'
=>
'item_list'
,
'#items'
=>
$links
,
'#title'
=>
t
(
'Next steps'
),
);
$output
.
=
drupal_render_root
(
$item_list
);
}
// If a batch is running, let it run.
elseif
(
$request
->
query
->
has
(
'batch'
))
{
$
output
=
_batch_page
(
$request
)
;
$
content
=
[
'#markup'
=>
_batch_page
(
$request
)]
;
}
else
{
if
(
empty
(
$_SESSION
[
'authorize_operation'
])
||
empty
(
$_SESSION
[
'authorize_filetransfer_info'
]))
{
$
output
=
t
(
'It appears you have reached this page in error.'
)
;
$
content
=
[
'#markup'
=>
t
(
'It appears you have reached this page in error.'
)]
;
}
elseif
(
!
$batch
=
batch_get
())
{
// We have a batch to process, show the filetransfer form.
$elements
=
\
Drupal
::
formBuilder
()
->
getForm
(
'Drupal\Core\FileTransfer\Form\FileTransferAuthorizeForm'
);
$output
=
drupal_render_root
(
$elements
);
$content
=
\
Drupal
::
formBuilder
()
->
getForm
(
'Drupal\Core\FileTransfer\Form\FileTransferAuthorizeForm'
);
}
}
// We defer the display of messages until all operations are done.
...
...
@@ -152,12 +149,12 @@ function authorize_access_allowed() {
$response
->
setStatusCode
(
403
);
\
Drupal
::
logger
(
'access denied'
)
->
warning
(
'authorize.php'
);
$page_title
=
t
(
'Access denied'
);
$
output
=
t
(
'You are not allowed to access this page.'
)
;
$
content
=
[
'#markup'
=>
t
(
'You are not allowed to access this page.'
)]
;
}
if
(
!
empty
(
$
outpu
t
))
{
if
(
!
empty
(
$
conten
t
))
{
$response
->
headers
->
set
(
'Content-Type'
,
'text/html; charset=utf-8'
);
$response
->
setContent
(
\
Drupal
::
service
(
'bare_html_page_renderer'
)
->
renderBarePage
(
[
'#markup'
=>
$output
]
,
$page_title
,
'maintenance_page'
,
array
(
$response
->
setContent
(
\
Drupal
::
service
(
'bare_html_page_renderer'
)
->
renderBarePage
(
$content
,
$page_title
,
'maintenance_page'
,
array
(
'#show_messages'
=>
$show_messages
,
)));
$response
->
send
();
...
...
core/modules/system/src/Tests/System/SystemAuthorizeTest.php
View file @
b6c1c2fb
...
...
@@ -59,5 +59,8 @@ function testFileTransferHooks() {
$this
->
assertRaw
(
'System Test FileTransfer'
);
// Make sure the settings form callback works.
$this
->
assertText
(
'System Test Username'
);
// Test that \Drupal\Core\Render\BareHtmlPageRenderer adds assets as
// expected to the first page of the authorize.php script.
$this
->
assertRaw
(
'core/misc/states.js'
);
}
}
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