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
7d41f690
Commit
7d41f690
authored
Jul 07, 2012
by
webchick
Browse files
Issue
#1599618
by droplet, yurtboy: Fixed Remove duplicate array keys.
parent
d3c06f59
Changes
4
Hide whitespace changes
Inline
Side-by-side
core/modules/book/book.module
View file @
7d41f690
...
...
@@ -540,13 +540,12 @@ function _book_add_form_elements(&$form, &$form_state, Node $node) {
'#collapsed'
=>
TRUE
,
'#group'
=>
'additional_settings'
,
'#attributes'
=>
array
(
'class'
=>
array
(
'book-form'
),
'class'
=>
array
(
'book-
outline-
form'
),
),
'#attached'
=>
array
(
'js'
=>
array
(
drupal_get_path
(
'module'
,
'book'
)
.
'/book.js'
),
),
'#tree'
=>
TRUE
,
'#attributes'
=>
array
(
'class'
=>
array
(
'book-outline-form'
)),
);
foreach
(
array
(
'menu_name'
,
'mlid'
,
'nid'
,
'router_path'
,
'has_children'
,
'options'
,
'module'
,
'original_bid'
,
'parent_depth_limit'
)
as
$key
)
{
$form
[
'book'
][
$key
]
=
array
(
...
...
core/modules/file/file.field.inc
View file @
7d41f690
...
...
@@ -587,10 +587,9 @@ function file_field_widget_process($element, &$form_state, $form) {
// Add the description field if enabled.
if
(
!
empty
(
$instance
[
'settings'
][
'description_field'
])
&&
$item
[
'fid'
])
{
$element
[
'description'
]
=
array
(
'#type'
=>
'textfield'
,
'#type'
=>
variable_get
(
'file_description_type'
,
'textfield'
)
,
'#title'
=>
t
(
'Description'
),
'#value'
=>
isset
(
$item
[
'description'
])
?
$item
[
'description'
]
:
''
,
'#type'
=>
variable_get
(
'file_description_type'
,
'textfield'
),
'#maxlength'
=>
variable_get
(
'file_description_length'
,
128
),
'#description'
=>
t
(
'The description may be used as the label of the link to the file.'
),
);
...
...
core/modules/system/lib/Drupal/system/Tests/Batch/PercentagesUnitTest.php
View file @
7d41f690
...
...
@@ -40,8 +40,6 @@ function setUp() {
'33'
=>
array
(
'total'
=>
3
,
'current'
=>
1
),
// 2/3 is closer to 67% than to 66%.
'67'
=>
array
(
'total'
=>
3
,
'current'
=>
2
),
// A full 3/3 should equal 100%.
'100'
=>
array
(
'total'
=>
3
,
'current'
=>
3
),
// 1/199 should round up to 1%.
'1'
=>
array
(
'total'
=>
199
,
'current'
=>
1
),
// 198/199 should round down to 99%.
...
...
core/modules/system/lib/Drupal/system/Tests/Form/FormTest.php
View file @
7d41f690
...
...
@@ -75,7 +75,7 @@ function testRequiredFields() {
$elements
[
'radios'
][
'element'
]
=
array
(
'#title'
=>
$this
->
randomName
(),
'#type'
=>
'radios'
,
'#options'
=>
array
(
''
=>
t
(
'None'
),
$this
->
randomName
(),
$this
->
randomName
(),
$this
->
randomName
()));
$elements
[
'radios'
][
'empty_values'
]
=
$empty_arrays
;
$elements
[
'checkbox'
][
'element'
]
=
array
(
'#title'
=>
$this
->
randomName
(),
'#type'
=>
'checkbox'
,
'#required'
=>
TRUE
,
'#title'
=>
$this
->
randomName
()
);
$elements
[
'checkbox'
][
'element'
]
=
array
(
'#title'
=>
$this
->
randomName
(),
'#type'
=>
'checkbox'
,
'#required'
=>
TRUE
);
$elements
[
'checkbox'
][
'empty_values'
]
=
$empty_checkbox
;
$elements
[
'checkboxes'
][
'element'
]
=
array
(
'#title'
=>
$this
->
randomName
(),
'#type'
=>
'checkboxes'
,
'#options'
=>
array
(
$this
->
randomName
(),
$this
->
randomName
(),
$this
->
randomName
()));
...
...
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