Commit bba5c8a5 authored by John C Fiala's avatar John C Fiala
Browse files

by jcfiala:Various tweaks to link module to pass coder inspection.

parent 115e37c3
...@@ -64,7 +64,7 @@ function link_field_settings($op, $field) { ...@@ -64,7 +64,7 @@ function link_field_settings($op, $field) {
$form['validate_url'] = array( $form['validate_url'] = array(
'#type' => 'checkbox', '#type' => 'checkbox',
'#title' => t('Validate URL'), '#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.'), '#description' => t('If checked, the URL field will be verified as a valid URL during validation.'),
); );
......
...@@ -52,13 +52,13 @@ class LinkAttributeCrudTest extends ContentCrudTestCase { ...@@ -52,13 +52,13 @@ class LinkAttributeCrudTest extends ContentCrudTestCase {
*/ */
private function outputScreenContents($description, $basename) { private function outputScreenContents($description, $basename) {
// This is a hack to get a directory that won't be cleaned up by simpletest // 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)) { if (!is_dir($file_dir)) {
mkdir($file_dir, 0777, TRUE); mkdir($file_dir, 0777, TRUE);
} }
$output_path = "$file_dir/$basename." . $this->randomName(10) . '.html'; $output_path = "$file_dir/$basename." . $this->randomName(10) . '.html';
$rv = file_put_contents($output_path, $this->drupalGetContent()); $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') { private function assertLinkOnNode($field_name, $link_value, $message = '', $group = 'Other') {
......
<?php <?php
//$Id$ // $Id$
/**
* @file
* Testing CRUD API in the browser.
*/
/** /**
* Testing that users can not input bad URLs or labels * Testing that users can not input bad URLs or labels
......
<?php <?php
//$Id$ // $Id$
/**
* @file
* Contains simpletests making sure token integration works.
*/
/** /**
* Testing that tokens can be used in link titles * Testing that tokens can be used in link titles
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment