diff --git a/link.module b/link.module index 7575759..31449e2 100644 --- a/link.module +++ b/link.module @@ -603,7 +603,7 @@ function _link_sanitize(&$item, $delta, &$field, $instance, &$entity) { $display_url = str_replace('mailto:', '', $url); } elseif ($type === LINK_EXTERNAL) { - $display_url = $item['url']; + $display_url = $item['url']; } elseif ($type == LINK_TEL) { $display_url = str_replace('tel:', '', $url); @@ -948,7 +948,7 @@ function link_field_process($element, $form_state, $complete_form) { if (!$instance) { // The element comes from a custom form, we have to manually create the // $instance settings. - $instance['settings'] = array ( + $instance['settings'] = array( 'title_maxlength' => isset($element['#title_maxlength']) ? $element['#title_maxlength'] : 128, 'title' => isset($element['#title_mode']) ? $element['#title_mode'] : 'optional', 'title_label_use_field_label' => isset($element['#title_label_use_field_label']) ? $element['#title_label_use_field_label'] : FALSE, diff --git a/tests/link.multilingual.test b/tests/link.multilingual.test index 33f1002..2aeec79 100644 --- a/tests/link.multilingual.test +++ b/tests/link.multilingual.test @@ -1,4 +1,5 @@ 'Link language path prefix', @@ -100,40 +107,40 @@ public function testLanguagePrefixedPaths() { // Create test content. $url_tests = array( 1 => array( - 'href' => 'http://dummy.com/' . $this->randomName(), - 'label' => $this->randomName(), - ), + 'href' => 'http://dummy.com/' . $this->randomName(), + 'label' => $this->randomName(), + ), 2 => array( - 'href' => 'node/1', - 'label' => $this->randomName(), - ), + 'href' => 'node/1', + 'label' => $this->randomName(), + ), 3 => array( - 'href' => 'node/1?property=value', - 'label' => $this->randomName(), - 'query' => array('property' => 'value'), - ), + 'href' => 'node/1?property=value', + 'label' => $this->randomName(), + 'query' => array('property' => 'value'), + ), 4 => array( - 'href' => 'node/1#position', - 'label' => $this->randomName(), - 'fragment' => 'position', - ), + 'href' => 'node/1#position', + 'label' => $this->randomName(), + 'fragment' => 'position', + ), 5 => array( - 'href' => 'node/1?property=value2#lower', - 'label' => $this->randomName(), - 'fragment' => 'lower', - 'query' => array('property' => 'value2'), - ), + 'href' => 'node/1?property=value2#lower', + 'label' => $this->randomName(), + 'fragment' => 'lower', + 'query' => array('property' => 'value2'), + ), ); foreach ($url_tests as $index => &$input) { $this->drupalGet('node/add/page'); $edit = array( - 'title' => $input['label'], - $field_name_absolute . '[und][0][title]' => $input['label'], - $field_name_absolute . '[und][0][url]' => $input['href'], - $field_name_relative . '[und][0][title]' => $input['label'], - $field_name_relative . '[und][0][url]' => $input['href'], - ); + 'title' => $input['label'], + $field_name_absolute . '[und][0][title]' => $input['label'], + $field_name_absolute . '[und][0][url]' => $input['href'], + $field_name_relative . '[und][0][title]' => $input['label'], + $field_name_relative . '[und][0][url]' => $input['href'], + ); $this->drupalPost(NULL, $edit, t('Save')); $url = $this->getUrl(); $input['url'] = $url; diff --git a/tests/link.validate.test b/tests/link.validate.test index f6db617..93c69f3 100644 --- a/tests/link.validate.test +++ b/tests/link.validate.test @@ -531,7 +531,10 @@ public function testValidateEmailLinkBad() { $this->assertEqual(FALSE, $valid, 'Make sure just a bad address is correctly failed'); } - function testValidateTelLinks() { + /** + * + */ + public function testValidateTelLinks() { $links = array( 'tel:01', 'tel:123456789012345', @@ -545,7 +548,10 @@ function testValidateTelLinks() { } } - function testValidateTelLinksBad() { + /** + * + */ + public function testValidateTelLinksBad() { $links = array( 'tel:0', 'tel:1234567890123456',