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
bba5c8a5
Commit
bba5c8a5
authored
Jun 14, 2010
by
John C Fiala
Browse files
by jcfiala:Various tweaks to link module to pass coder inspection.
parent
115e37c3
Changes
4
Hide whitespace changes
Inline
Side-by-side
link.module
View file @
bba5c8a5
...
...
@@ -64,7 +64,7 @@ function link_field_settings($op, $field) {
$form
[
'validate_url'
]
=
array
(
'#type'
=>
'checkbox'
,
'#title'
=>
t
(
'Validate URL'
),
'#default_value'
=>
isset
(
$field
[
'validate_url'
])
&&
(
$field
[
'validate_url'
]
!==
''
)
?
$field
[
'validate_url'
]
:
true
,
'#default_value'
=>
isset
(
$field
[
'validate_url'
])
&&
(
$field
[
'validate_url'
]
!==
''
)
?
$field
[
'validate_url'
]
:
TRUE
,
'#description'
=>
t
(
'If checked, the URL field will be verified as a valid URL during validation.'
),
);
...
...
tests/link.attribute.test
View file @
bba5c8a5
...
...
@@ -52,13 +52,13 @@ class LinkAttributeCrudTest extends ContentCrudTestCase {
*/
private
function
outputScreenContents
(
$description
,
$basename
)
{
// This is a hack to get a directory that won't be cleaned up by simpletest
$file_dir
=
file_directory_path
()
.
'/../simpletest_output_pages'
;
$file_dir
=
file_directory_path
()
.
'/../simpletest_output_pages'
;
if
(
!
is_dir
(
$file_dir
))
{
mkdir
(
$file_dir
,
0777
,
TRUE
);
}
$output_path
=
"
$file_dir
/
$basename
."
.
$this
->
randomName
(
10
)
.
'.html'
;
$rv
=
file_put_contents
(
$output_path
,
$this
->
drupalGetContent
());
$this
->
pass
(
"
$description
: Contents of result page are "
.
l
(
'here'
,
$output_path
));
$this
->
pass
(
"
$description
: Contents of result page are "
.
l
(
'here'
,
$output_path
));
}
private
function
assertLinkOnNode
(
$field_name
,
$link_value
,
$message
=
''
,
$group
=
'Other'
)
{
...
...
tests/link.crud_browser.test
View file @
bba5c8a5
<?php
//$Id$
// $Id$
/**
* @file
* Testing CRUD API in the browser.
*/
/**
* Testing that users can not input bad URLs or labels
...
...
tests/link.token.test
View file @
bba5c8a5
<?php
//$Id$
// $Id$
/**
* @file
* Contains simpletests making sure token integration works.
*/
/**
* Testing that tokens can be used in link titles
...
...
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