Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
76518e6f
Commit
76518e6f
authored
Jun 15, 2013
by
alexpott
Browse files
Issue
#1998708
by kim.pepper, kmcculloch: Use Symfony Request for block module.
parent
cb07e913
Changes
3
Show whitespace changes
Inline
Side-by-side
core/modules/block/block.module
View file @
76518e6f
...
...
@@ -311,7 +311,7 @@ function _block_get_renderable_region($list = array()) {
// to other users. We therefore exclude user 1 from block caching.
$not_cacheable
=
$GLOBALS
[
'user'
]
->
uid
==
1
||
count
(
module_implements
(
'node_grants'
))
||
!
in_array
(
$_SERVER
[
'REQUEST_METHOD'
],
array
(
'GET'
,
'HEAD'
)
);
!
\
Drupal
::
request
()
->
isMethodSafe
(
);
foreach
(
$list
as
$key
=>
$block
)
{
$settings
=
$block
->
get
(
'settings'
);
...
...
core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockFormController.php
View file @
76518e6f
...
...
@@ -207,9 +207,10 @@ public function save(array $form, array &$form_state) {
*/
public
function
delete
(
array
$form
,
array
&
$form_state
)
{
$destination
=
array
();
if
(
isset
(
$_GET
[
'destination'
]))
{
$query
=
\
Drupal
::
request
()
->
query
;
if
(
!
is_null
(
$query
->
get
(
'destination'
)))
{
$destination
=
drupal_get_destination
();
unset
(
$_GET
[
'destination'
]
);
$query
->
remove
(
'destination'
);
}
$block
=
$this
->
buildEntity
(
$form
,
$form_state
);
$form_state
[
'redirect'
]
=
array
(
'block/'
.
$block
->
id
()
.
'/delete'
,
array
(
'query'
=>
$destination
));
...
...
core/modules/book/book.module
View file @
76518e6f
...
...
@@ -880,9 +880,10 @@ function book_node_prepare(EntityInterface $node) {
if
(
empty
(
$node
->
book
)
&&
(
user_access
(
'add content to books'
)
||
user_access
(
'administer book outlines'
)))
{
$node
->
book
=
array
();
if
(
empty
(
$node
->
nid
)
&&
isset
(
$_GET
[
'parent'
])
&&
is_numeric
(
$_GET
[
'parent'
]))
{
$query
=
\
Drupal
::
request
()
->
query
;
if
(
empty
(
$node
->
nid
)
&&
!
is_null
(
$query
->
get
(
'parent'
))
&&
is_numeric
(
$query
->
get
(
'parent'
)))
{
// Handle "Add child page" links:
$parent
=
book_link_load
(
$
_GET
[
'parent'
]
);
$parent
=
book_link_load
(
$
query
->
get
(
'parent'
)
);
if
(
$parent
&&
$parent
[
'access'
])
{
$node
->
book
[
'bid'
]
=
$parent
[
'bid'
];
...
...
Write
Preview
Supports
Markdown
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