Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
drupal.org
link
Commits
0500ca94
Commit
0500ca94
authored
Feb 28, 2018
by
renatog
Committed by
Renato Gonçalves H
Feb 28, 2018
Browse files
Issue #2948578 by RenatoG: Resolve all items reported by pareview.sh
parent
77147ee1
Changes
3
Hide whitespace changes
Inline
Side-by-side
link.module
View file @
0500ca94
...
...
@@ -1505,8 +1505,8 @@ function link_url_type($text) {
$link_ichars
=
$link_ichars_domain
.
(
string
)
html_entity_decode
(
implode
(
""
,
array
(
// ß.
"ß"
,
)),
ENT_QUOTES
,
'UTF-8'
);
"ß"
,
)),
ENT_QUOTES
,
'UTF-8'
);
$allowed_protocols
=
variable_get
(
'filter_allowed_protocols'
,
array
(
'http'
,
'https'
,
...
...
@@ -1600,14 +1600,14 @@ function link_content_migrate_field_alter(&$field_value, $instance_value) {
$field_value
[
'type'
]
=
'link_field'
;
// Remove settings that are now on the instance.
foreach
(
array
(
'attributes'
,
'display'
,
'url'
,
'title'
,
'title_value'
,
'enable_tokens'
,
'validate_url'
,
)
as
$setting
)
{
'attributes'
,
'display'
,
'url'
,
'title'
,
'title_value'
,
'enable_tokens'
,
'validate_url'
,
)
as
$setting
)
{
unset
(
$field_value
[
'settings'
][
$setting
]);
}
}
...
...
@@ -1622,14 +1622,14 @@ function link_content_migrate_instance_alter(&$instance_value, $field_value) {
if
(
$field_value
[
'type'
]
==
'link'
)
{
// Grab settings that were previously on the field.
foreach
(
array
(
'attributes'
,
'display'
,
'url'
,
'title'
,
'title_value'
,
'enable_tokens'
,
'validate_url'
,
)
as
$setting
)
{
'attributes'
,
'display'
,
'url'
,
'title'
,
'title_value'
,
'enable_tokens'
,
'validate_url'
,
)
as
$setting
)
{
if
(
isset
(
$field_value
[
'settings'
][
$setting
]))
{
$instance_value
[
'settings'
][
$setting
]
=
$field_value
[
'settings'
][
$setting
];
}
...
...
tests/link.validate.test
View file @
0500ca94
...
...
@@ -294,6 +294,7 @@ class LinkValidateTest extends LinkValidateTestCase {
// $this->pass($this->content);.
// @codingStandardsIgnoreLine
$this
->
assertNoText
(
t
(
'The value %value provided for %field is not a valid URL.'
,
array
(
// @codingStandardsIgnoreLine
'%field'
=>
$name
,
'%value'
=>
trim
(
$url
),
)));
...
...
views/link_views_handler_filter_protocol.inc
View file @
0500ca94
...
...
@@ -14,10 +14,9 @@ class link_views_handler_filter_protocol extends views_handler_filter_string {
/**
* Set defaults for the filter options.
*
* @codingStandardsIgnoreEnd
*/
function
option_definition
()
{
public
function
option_definition
()
{
// @codingStandardsIgnoreEnd
$options
=
parent
::
option_definition
();
$options
[
'operator'
]
=
'OR'
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment