commit 8e7483ab8d9873c916e2cee2608b4df4fc299e46
Author: Assos Assos <assos+forge@centrale-marseille.fr>
Date:   Wed Nov 20 23:24:42 2019 +0100

    Weekly update of contrib modules

diff --git a/drupal7/sites/all/modules/file_entity/admin_views_default/file.admin-content-file.inc b/drupal7/sites/all/modules/file_entity/admin_views_default/file.admin-content-file.inc
index dc2f0de5..bfdad328 100644
--- a/drupal7/sites/all/modules/file_entity/admin_views_default/file.admin-content-file.inc
+++ b/drupal7/sites/all/modules/file_entity/admin_views_default/file.admin-content-file.inc
@@ -21,7 +21,8 @@ $handler->display->display_options['title'] = 'Files';
 $handler->display->display_options['css_class'] = 'admin-views-view';
 $handler->display->display_options['use_ajax'] = TRUE;
 $handler->display->display_options['use_more_always'] = FALSE;
-$handler->display->display_options['access']['type'] = 'menu';
+$handler->display->display_options['access']['type'] = 'perm';
+$handler->display->display_options['access']['perm'] = 'access administration pages';
 $handler->display->display_options['cache']['type'] = 'none';
 $handler->display->display_options['query']['type'] = 'views_query';
 $handler->display->display_options['exposed_form']['type'] = 'basic';
diff --git a/drupal7/sites/all/modules/file_entity/file_entity.info b/drupal7/sites/all/modules/file_entity/file_entity.info
index aa44b587..ae362022 100644
--- a/drupal7/sites/all/modules/file_entity/file_entity.info
+++ b/drupal7/sites/all/modules/file_entity/file_entity.info
@@ -32,8 +32,8 @@ configure = admin/config/media/file-settings
 ; We have to add a fake version so Git checkouts do not fail Media dependencies
 version = 7.x-2.x-dev
 
-; Information added by Drupal.org packaging script on 2019-09-29
-version = "7.x-2.26"
+; Information added by Drupal.org packaging script on 2019-11-20
+version = "7.x-2.27"
 core = "7.x"
 project = "file_entity"
-datestamp = "1569787388"
+datestamp = "1574278088"
diff --git a/drupal7/sites/all/modules/file_entity/file_entity.install b/drupal7/sites/all/modules/file_entity/file_entity.install
index 5f4d14cd..522ed5c3 100644
--- a/drupal7/sites/all/modules/file_entity/file_entity.install
+++ b/drupal7/sites/all/modules/file_entity/file_entity.install
@@ -1095,3 +1095,26 @@ function file_entity_update_7216() {
   // database. It has been removed due to reported problems and is better
   // addressed by adding support for ctools default content to features.
 }
+
+/**
+ * Remove deprecated views_plugin_access_menu plugin.
+ */
+function file_entity_update_7227() {
+  $result = db_query("SELECT vid, id, display_options FROM {views_display}");
+  foreach ($result as $record) {
+    $options = unserialize($record->display_options);
+    if (isset($options['access']) && is_array($options['access']) && isset($options['access']['type']) && $options['access']['type'] === 'menu') {
+      $options['access'] = array(
+        'type' => 'perm',
+        'perm' => 'access administration pages',
+      );
+
+      db_query("UPDATE {views_display} SET display_options = :options WHERE vid = :vid AND id = :id", array(
+        'vid' => $record->vid,
+        'id' => $record->id,
+        'options' => serialize($options),
+      ));
+    }
+  }
+}
+
diff --git a/drupal7/sites/all/modules/file_entity/file_entity.pages.inc b/drupal7/sites/all/modules/file_entity/file_entity.pages.inc
index 56cda6b8..f30f044c 100644
--- a/drupal7/sites/all/modules/file_entity/file_entity.pages.inc
+++ b/drupal7/sites/all/modules/file_entity/file_entity.pages.inc
@@ -1208,23 +1208,66 @@ function file_entity_upload_archive_form_submit($form, &$form_state) {
   if ($archive = file_load($form_state['values']['upload'])) {
     if ($archiver = archiver_get_archiver($archive->uri)) {
       $files = $archiver->listContents();
+      $destination = pathinfo($archive->filename, PATHINFO_FILENAME);
+
+      // Prepare a temporary directory to extract the archive to before saving
+      // it is content.
+      $extract_location = 'temporary://' . $destination;
+      $extract_location = file_destination($extract_location, FILE_EXISTS_RENAME);
+      if (!file_prepare_directory($extract_location, FILE_MODIFY_PERMISSIONS | FILE_CREATE_DIRECTORY)) {
+        throw new Exception(t('Unable to prepar, a temporary directory %dir for extraction.', array('%dir' => $extract_location)));
+      }
 
-      $extract_dir = file_default_scheme() . '://' . pathinfo($archive->filename, PATHINFO_FILENAME);
-      $extract_dir = file_destination($extract_dir, FILE_EXISTS_RENAME);
-      if (!file_prepare_directory($extract_dir, FILE_MODIFY_PERMISSIONS | FILE_CREATE_DIRECTORY)) {
-        throw new Exception(t('Unable to prepare directory %dir for extraction.', array('%dir' => $extract_dir)));
+      // Prepare target directory where files are going to be saved.
+      $target_dir = file_default_scheme() . '://' . $destination;
+      $target_dir = file_destination($target_dir, FILE_EXISTS_RENAME);
+      if (!file_prepare_directory($target_dir, FILE_MODIFY_PERMISSIONS | FILE_CREATE_DIRECTORY)) {
+        throw new Exception(t('Unable to prepar, a directory %dir for extraction.', array('%dir' => $target_dir)));
       }
 
-      $archiver->extract($extract_dir);
+      $archiver->extract($extract_location);
       $pattern = '/' . $form_state['values']['pattern'] . '/';
-      if ($files = file_scan_directory($extract_dir, $pattern)) {
-        foreach ($files as $file) {
+      if ($extracted_files = file_scan_directory($extract_location, $pattern)) {
+        foreach ($extracted_files as $extracted_file) {
+          $file = new stdClass();
+          $file->fid = NULL;
+           $file->uid = $archive->uid;
+          $file->filename = $extracted_file->filename;
+          $file->origname = $extracted_file->filename;
           $file->status = FILE_STATUS_PERMANENT;
-          $file->uid = $archive->uid;
+          $file->filemime = file_get_mimetype($extracted_file->filename);
+
+          // destination uri should match the current file directory hierarchy.
+          $file->uri = $target_dir . str_replace($extract_location, '', $extracted_file->uri);
+
+          // Rename potentially executable files, to help prevent exploits (i.e. will
+          // rename filename.php.foo and filename.php to filename.php.foo.txt and
+          // filename.php.txt, respectively). Don't rename if 'allow_insecure_uploads'
+          // evaluates to TRUE.
+          if (!variable_get('allow_insecure_uploads', 0) && preg_match('/\.(php|pl|py|cgi|asp|js)(\.|$)/i', $file->filename) && (substr($file->filename, -4) != '.txt')) {
+            $file->filemime = 'text/plain';
+            $file->uri .= '.txt';
+            $file->filename .= '.txt';
+          }
+
+          // prepare destination path for the extracted file while keeping the
+          // directory hierarchy of the file.
+          $destination = pathinfo($file->uri, PATHINFO_DIRNAME);
+          if (!file_prepare_directory($destination, FILE_MODIFY_PERMISSIONS | FILE_CREATE_DIRECTORY)) {
+            throw new Exception(t('Unable to prepar, a directory %dir for extraction.', array('%dir' => $destination)));
+          }
+
+          if (!file_unmanaged_move($extracted_file->uri, $file->uri)) {
+            throw new Exception(t('Could not move uploaded file %file to destination %destination.', array('%file' => $extracted_file->filename, '%destination' => $file->uri)));
+            return FALSE;
+          }
+
           file_save($file);
           $form_state['files'][$file->fid] = $file;
         }
       }
+      // Delete extract location
+      file_unmanaged_delete_recursive($extract_location);
       drupal_set_message(t('Extracted %file and added @count new files.', array('%file' => $archive->filename, '@count' => count($files))));
     }
     else {
diff --git a/drupal7/sites/all/modules/file_entity/tests/file_entity_test.info b/drupal7/sites/all/modules/file_entity/tests/file_entity_test.info
index 2784ca7a..923487d8 100644
--- a/drupal7/sites/all/modules/file_entity/tests/file_entity_test.info
+++ b/drupal7/sites/all/modules/file_entity/tests/file_entity_test.info
@@ -5,8 +5,8 @@ core = 7.x
 dependencies[] = file_entity
 hidden = TRUE
 
-; Information added by Drupal.org packaging script on 2019-09-29
-version = "7.x-2.26"
+; Information added by Drupal.org packaging script on 2019-11-20
+version = "7.x-2.27"
 core = "7.x"
 project = "file_entity"
-datestamp = "1569787388"
+datestamp = "1574278088"
diff --git a/drupal7/sites/all/modules/link/CHANGELOG.txt b/drupal7/sites/all/modules/link/CHANGELOG.txt
new file mode 100644
index 00000000..d9fdeba6
--- /dev/null
+++ b/drupal7/sites/all/modules/link/CHANGELOG.txt
@@ -0,0 +1,413 @@
+Link 7.x-1.7, 2019-11-14
+------------------------
+#3094381 by DamienMcKenna: Add a CHANGELOG.txt file.
+#3094370 by DamienMcKenna: Coding standards tidy-up.
+#3094307 by DamienMcKenna: Clean up tests a bit.
+By DamienMcKenna: Added myself to the maintainers list.
+#3041220 by Daniel Korte, nileema.jadhav, Deepak.Sharma, pifagor: False positive
+  in link_validate_url() function with relative URLs with fragments.
+#3038104 by jwilson3, cm0dit, pifagor: Support hashbang (#!) in URLs.
+By drumm: Ensure attributes are not strings.
+#2654246 by SurfinSpirit, moleCuleFFF, recrit, okapi1987@gmail.com, whthat,
+  sdstyles, rajiv.singh, ac, pifagor, dgtlmoon, Chris Matthews, Nishruu: Anchor
+  and Query urls are not supported.
+#2943127 by sean_e_dietrich, kyuubi, Chris Matthews, ShaunLaws, pifagor: Link
+  field with static title always shows even when no url entered.
+#2675568 by pianomansam, Chris Matthews, pifagor: Whether URL and Title entity
+  properties are required is incorrectly determined.
+#2718563 by makbul_khan8, jgalletta, idebr, malcomio, joekers, b.lammers,
+  pifagor: Use link field widget in custom form.
+#1475790 by idebr, quicksketch, donquixote, skessler, jcfiala, stevector, Zach,
+  bk_bigfish, balumahender, jrao, pifagor, jbitdrop, das-peter: Link should not
+  modify $item['url'] on node_view() (causes data loss when combined with
+  Workbench Moderation).
+#949604 by boazr, webadpro, zilverdistel, TheRuslan, GaëlG, barraponto,
+  jhodgdon, diqidoq, jcfiala, Gábor Hojtsy, colan, mErilainen, knalstaaf,
+  mfernea, pifagor: Static link text cannot be translated.
+#1993920 by lwalley, johnnybgoode, Dragan Eror, weri, idebr, Etroid, jcfiala,
+  jsst, alex_optim, diqidoq, dandaman: Allow tel: links.
+#2428185 by das-peter, harsha012, hgoto, recrit, eelkeblok, weseze, nironan,
+  pifagor, Alex Bukach, diqidoq: Language prefix and relative links broken.
+#2974486 by naidim: Title field assumed when it may not exist.
+#2966141 by RenatoG: Add translate in help section.
+#2574331 by RenatoG, tjhart87: Utilize link target action in rules.
+#2653852 by sassafrass, pifagor, NWOM, RenatoG: Token displayed when field is
+  empty.
+#2966082 by RenatoG: Remove unused file for structure.
+#2965798 by RenatoG: Update documentation for requirements.
+#2965735 by RenatoG: Organize style structure. Create css folder for organizer.
+#2965727 by RenatoG: Remove unused / commented code in views/link.views.inc.
+#2295071 by interX, pifagor: Recursion in field formatter with views.
+#2195699 by Dane Powell, pifagor: Generate more creative URLS with
+  devel_generate.
+#2536756 by gareth-davies, pifagor: Unless using the default field formatter,
+  classes are not transformed into an array which causes a fatal error.
+#2916152 by azinck, pifagor: Override title in field formatter.
+#2921141 by chishah92, Ambient.Impact, RenatoG: Use a real ellpsis instead of
+  three dots (...).
+#2945199 by salvis, pifagor: drupal_encode_path() is called twice.
+#2813057 by klausi, pifagor, John Cook: mailto: link with subject parameter and
+  upper case letter does not validate.
+#2952073 by pifagor: Change correct deskription.
+#2930024 by Dylan Donkersgoed, pifagor: file:// links often don't work.
+#2948578 by RenatoG: Resolve all items reported by pareview.sh.
+
+Link 7.x-1.6, 2019-02-20
+------------------------
+Ensure attributes are not strings.
+
+Link 7.x-1.5, 2018-05-13
+------------------------
+#2553705 and #2961210 by billywardrop, pifagor, vinmassaro, alex_optim,
+  alex.mazaltov: Preparation of module version 1.5.
+
+Link 7.x-1.5-beta3, 2018-02-21
+------------------------------
+By pifagor: Fixed test.
+#2945139: options(&$options) deprecated since views2.
+#2945137: Unused variables.
+#2945133: Warning: Method call uses 2 parameters, but method signature uses 1
+  parameters.
+#2945131: Fix coding standards module.
+#2945128: Fix coding standard test parts
+#2901656 and #2210297 by nightwalkr, mfernea: validates that the input on the
+  URL field actually exists as a path alias. Theme_link_formatter_link_default()
+  doesn't work with classes defined in a preprocess function.
+#2216399 by jemond: Provide Formatter to remove http:// or https:// from URL.
+#1836632 by jmart: Double HTML escaping when using plain_title formatter.
+By nileema.jadhav: Modification for bug fixes related to HTML entities in title
+  and no protocol for url display format.
+#2480723 by krystalcode, naidim, rrrob, sumitmadan, Argus, diqidoq, RenatoG,
+  jbitdrop: Avoid warning in diff integration for links without title.
+#2911860 by RenatoG: Fix tests items results.
+By RenatoG: Fix tests.
+#2244041 by alberto56, RenatoG: Undefined index: widget in link.module on line
+  1341.
+#2743401 by RenatoG, MHuebner: Use parent directory in internal url.
+#2897563 by RenatoG: Fix Coding Standards, Best Practices and Insert
+  Documentation in Comments for Tests.
+#2897348 by RenatoG: Update documentation in README file for nre template of
+  Drupal.org.
+#2897332 by RenatoG: Fix all items of Code Review for Link.
+#2166459 by j0rd, mstef: Notice: Undefined index: error_element in
+  link_field_widget_error() (line 328 of link.module).
+
+Link 7.x-1.5-beta2, 2017-07-25
+------------------------------
+#2889683 by Yago Elias, RenatoG: Protocol-less URLs should be cleaned for use.
+#2558497 by joachim, RenatoG: property type for 'url' entity metadata property
+  should not be 'url'.
+#2299657 by RenatoG, egfrith, ChuChuNaKu, idebr, jtsnow, rootwork,
+  kristiaanvandeneynde, GoddamnNoise, Leeteq, jcfiala, Remon, drumm, tobiberlin,
+  brantwynn, klonos, Vacilando, quicksketch, mikeytown2, samuel.mortenson,
+  brice_gato, katjam, kenorb, ultimike, Graber, rv0, othermachines, r0nn1ef,
+  DamienMcKenna, doraf, jmart, reptilex, Berliner-dupe, jp.stacey, JonMcL: Allow
+  any TLD because site admins can never keep up with ICANN.
+#2499165 by jcnventura, RenatoG: Validate all latin accented chars.
+#1295132 by Scyther, RenatoG: Unnecessary variables in link.install.
+#1335424 by claudiu.cristea, RenatoG: Title as a select.
+#2612176 by FluxSauce, pcambra, RenatoG: PHP Fatal error: Class
+  'MigrateFieldHandler' not found.
+#2693731 by Antonnavi, RenatoG: Tokens replaced on "Static title" when "Allow
+  user-entered tokens" not enabled.
+
+Link 7.x-1.5-beta1, 2017-01-14
+------------------------------
+#2140087 by olofjohansson, maximpodorov, mistermoper, RenatoG: Allow '0' as the
+  link title.
+#1418762 by num37, RenatoG, rvilar, jcfiala, randyhook: Provide default title
+  when title is optional.
+#2553705 by Trav84, aguilarm, michaelfavia, reshma.i, RenatoG, roopeshnaik:
+  Static Title does not show up when using 'Optional URL' + 'Static Title' with
+  an empty URL.
+#2323441 by paolomainardi, sumitmadan, SylvainM, brockfanning, rob_johnston,
+  RenatoG, mikeryan: [Patch] Migrate language argument array handling.
+#2299657 by egfrith, RenatoG, ChuChuNaKu, idebr, jtsnow, rootwork,
+  kristiaanvandeneynde, GoddamnNoise, Leeteq, jcfiala, Remon, drumm, tobiberlin,
+  brantwynn, klonos, Vacilando, quicksketch, mikeytown2, samuel.mortenson,
+  brice_gato, katjam, kenorb, ultimike, Graber, rv0, othermachines, r0nn1ef,
+  DamienMcKenna, doraf, jmart, reptilex, jp.stacey, JonMcL: Allow any TLD
+  because site admins can never keep up with ICANN.
+#1909788 by mthomas, jesss, csc4, Kpolymorphic, RenatoG: Add an entity token for
+  the display_url.
+#2650956 by loopduplicate, amitmaity, karsumit94, RenatoG: Code standards are
+  not followed for array modified in 2367069.
+#2299657 by egfrith, RenatoG, ChuChuNaKu, idebr, jtsnow, rootwork,
+  kristiaanvandeneynde, GoddamnNoise, Leeteq, jcfiala, Remon, drumm, tobiberlin,
+  brantwynn, klonos, Vacilando, quicksketch, mikeytown2, samuel.mortenson,
+  brice_gato, katjam, kenorb, ultimike, Graber, rv0, othermachines, r0nn1ef,
+  DamienMcKenna, doraf, jmart, reptilex, Berliner-dupe, jp.stacey, JonMcL,
+  peter-majmesku: Allow any TLD because site admins can never keep up with
+  ICANN.
+#2299657 by egfrith, ChuChuNaKu, RenatoG, idebr, jtsnow, rootwork, Leeteq,
+  kristiaanvandeneynde, GoddamnNoise, tobiberlin, Remon, drumm, jcfiala, klonos,
+  brantwynn, quicksketch, mikeytown2, samuel.mortenson, brice_gato, Vacilando,
+  katjam, kenorb, ultimike, Graber, rv0, DamienMcKenna, doraf, jmart, reptilex,
+  jp.stacey, JonMcL: Allow any TLD because site admins can never keep up with
+  ICANN.
+#2890057 by RenatoG: All content of file commented "link.views.inc" should be
+  use @codingStandardsIgnoreFile tag.
+#2299657 by egfrith, ChuChuNaKu, RenatoG, idebr, jtsnow, Leeteq, GoddamnNoise,
+  tobiberlin, kristiaanvandeneynde, Remon, jcfiala, rootwork, drumm, klonos,
+  brice_gato, quicksketch, brantwynn, mikeytown2, Vacilando, reptilex,
+  samuel.mortenson, DamienMcKenna, ultimike, Graber, rv0, doraf, jp.stacey,
+  kenorb, jmart, JonMcL, katjam: Allow any TLD because site admins can never
+  keep up with ICANN.
+#2890013 by RenatoG: Fix codings standards for Link.
+#2889755 by RenatoG: Fixed Best practice in Drupal.
+#2566443 by ohthehugemanatee, RenatoG: Broken description text when used through
+  Form API.
+#2888582 by RenatoG: Resolved unused variables in install file.
+#2723993 by dhruveshdtripathi, rahul.shinde, jeevanbhushetty, RenatoG: help hook
+  is not there.
+#2578521 by kala4ek, arialvix, soapboxcicero, ervit, RenatoG: Validation error.
+#2888510 by RenatoG: Create tip for token on install.
+#2888480 by RenatoG: Fixed documentation links in new window target "blank".
+#2888461 by RenatoG: Clear variable "link_extra_domains" on uninstall.
+#2843813 by idebr, klausi, michael_wojcik, clemens.tolboom: Fix failing tests
+  due to missing 'administer fields' permission.
+
+Link 7.x-1.4, 2016-01-14
+------------------------
+UPC-99: Apply patch: link-field_link_validate_overrites_langcode-2632728.patch
+#2470377 by rhclayto: Adding a class with underscores, the class gets rendered
+  with hyphens
+#609560 by Boobaa: Provide token for hostname
+#2470968: Add README.txt
+#2247261 by heddn, sumitmadan: URLs are not validated
+#2513706 by rrfegade: Spelling errors in D7
+#2055111 by joelpittet, mikeytown2: skip over re-loading entities for tokens in
+  link field attributes unless there's a token to process.
+#2367069 by jcfiala:Fixed entity_token for link after node_view was called.
+Added setup function to LinkValidateUrlLight to enable link module, which was
+  failing drupal.org qa testbot.
+#2364673 by jcfiala: Replaced drupal_html_class() with
+  drupal_clean_css_identifier() so that link field classes are not forced to
+  lower case.
+Added tests to test entity_token token with link.
+
+Link 7.x-1.3, 2014-10-21
+------------------------
+By jcfiala: Various small fixes to pass coder review.
+#2351223 by Xano: Improve field validation error message.
+#2350253 by genjohnson: Fixed Link with ! (exclamation) in URL query returns
+  "not a valid URL".
+#1483494 by vinmassaro, cord1: Notice: Undefined index: url in _link_process()
+  (line 345 of ../link.module).
+#1955976 by chOP, erikhopp, idebr, d.clarke | Jim Cutler: Added Allow relative
+  paths with validation.
+#2117099 by tim.plunkett: Expose attributes as property info.
+#1930430 by benjifisher: Fixed Migration integration misses title attribute for
+  mutiple-valued link fields.
+#97766 by tanepiper, heddn, timbrandin, droath, alanburke, Digidog: Class
+  attribute field option for each dataset in link widget.
+#1266474 by redndahead, franz, RobLoach, jcfiala, markabur: Use field label as
+  the label for the title field
+#2036645 by lex0r: restricting the explode to 2 items when breaking apart
+  querystrings helps prevent problems with unescaped = characters in the data.
+#2223571 by jcfiala: Included new tld that had been included into the 6.x-2.x
+  branch.
+#1836632 by jcfiala:Removed double-encoding of titles when url not specified in
+  link field.
+#1980736 by Cottser: Allow child elements of the link field to be rendered.
+
+Link 7.x-1.2, 2013-11-24
+------------------------
+#1866632 by mohamadaliakbari,poiu:Adding rtl support to the link field.
+#1928116 by jcfiala: Added field variable to variables for link formatter
+  functions in hook_theme.
+#2141643:Applying changes suggested by coder
+#2043001 by zhuber:Add xxx to list of top level domains.
+#2036115 by Samvel:Validation of link field was not being properly passed
+  through to hook_field_widget_error().
+#1616752 by Taran2L:Period in names of querystring items was being replaced with
+  underscores.
+#2123277 by zhuber:Link devel generate was applying titles to links with no
+  title set.
+#1936784 by jeffam, illmasterc: Ampersands were being escaped in urls.
+#1784862 by aaronbauman: Added dialog switch to code displaying available
+  tokens.
+#1914286 by facine: Fixes Title value in link_field_update_instance undefined
+  error.
+#1918850 by jsacksick: Prevents undefined variable messages in
+  link_i18n_string_list_field_alter().
+
+Link 7.x-1.1, 2013-02-09
+------------------------
+By jcfiala: Fixed broken token tests - setUp on LinkBaseTestClass was broken.
+#949604 by zilverdistel: Added i18n support for the static link text field
+  option.
+#1909314 by Simon Georges: Removing link.install from the link.info files[]
+  array.
+By jcfiala: Removed all places where #markup was being set to a theme function
+  output with #theme.
+#1674284 by sun, jcfiala: Cleaning up the code to Drupal standards, this time
+  with the tests.
+#1674284 by sun, jcfiala: Cleaning up the code to Drupal standards.
+By hass:Fixing a string in the target argument handler to be t-compatible.
+By hackwater: Fixed minor typo which spelled automatically wrong.
+#1458502 by eugene.brit:Fixing Undefined index: target in _link_sanitize()
+#1010850 by benjifisher: Update MigrateFieldHandler to work with migrate-7.x-2.4
+  and later.
+#1889918 by jcfiala,Boobaa: Changed the bad url error message to include the
+  field's label.
+#1179944 by jcfiala, mr.york: Added variable_get calls so that the list of TLD
+  that pass validation can be set by admins.
+#1766150 by jcfiala: Blank urls will no longer be treated the same as links to
+  <front>.
+#1686024 by Alan D.: Added implementation of hook_field_diff_view().
+#1715246 by Haza, jcfiala: Fixed strict warning when loading entity for token
+  use, also fixed problem with the title attribute not being handeld properly.
+#1309768 by jcfiala: Made URL label of url-only link fields invisible instead of
+  removing it, to be 508 compliant.
+#1645640 by barraponto:Fixing <front> links as well as double-printing of
+  querystring.
+By jcfiala: Fixed how possible tokens are displayed when setting up a link field
+  - had been using a variable which was not defined in that scope.
+#43870: Cleaned up and conslidated the link formatter tests so that the tests
+  can run faster.
+#438770: Fixed code to align with tests - handling the 'token type' fetching
+  better and fixing the separate link display to match previous functionality.
+#1047444 by Sweetchuck, jcfiala: Updated how tokens are handled so that the
+  proper token references are used, and not just 'node'.
+#1309658 by jcfiala: Small nudge to the views tokens fix to handle problem with
+  relative links going through url() twice.
+#472766 by mstrelan: Added new formatter to display domain as link.
+#1710578 by jcfiala: Added code to prevent unnecessary = signs in querystrings.
+#1309658 by jcfiala: Rearranged the link code so that the query and fragment are
+  not separated from the url so that views can access them in a token.
+#1290904 by gordon:Moved link processing on save from the hook_field_presave
+  link to the hook_field_insert/update hook to prevent problem with
+  field_attach_update.
+#1525668 by mikeryan: Removed type-hint of $entity in the migrate prepare
+  handler.
+#1599314 by arpieb: Adding spaces, periods, and parenthesis to internal file
+  paths.
+#1368616 by grndlvl: Fix required marker so it shows if title is not displayed.
+#1512954 by jfiala, mikeytown2: Added code to prevent error in
+  theme_link_formatter_link_plain(), improved use of $link_options array in
+  theme functions.
+#1125766 by jcfiala, David Stosik, Eric_A: Provided default value for link
+  targets when link field uses user input for target.
+#1230256 by yched: Fixed D6 migration (cck_migrate()).
+#1218428 by twistor, Digidog: Fixed - Link tests, LinkValidateUrlLight because
+  link validate_url is called but not available.
+#1409980 by luisortizramos, effulgentsia, Digidog: Fixed - Validation error
+  -Invalid URL- is not reported properly. The corresponding form_set_error()
+  calls have been fixed.
+#1441702 by Digidog: Fixed - Rel attribute should have an option to get
+  automaticly turned on/off if link is internal/external.
+#1418674 by rvilar, Digidog: Fixed - Bad variable concatenation in t() function-
+#1321482 by Liam Morland, KarlShea, Summit, Jevedor, Digidog: Fixed -Query
+  string and fragment are removed, resulting in parts of the URL being lost-
+#1066328 by Bevan, jcfiala, dkingofpa, sammys, Digidog: Formatter for use with
+  url() and Views its -output this field as a link- fields (Absolute url
+  formatter added).
+#1429684 by das-pater: Dont unserialize already unserialized attributes in
+  _link_load(). The patch contains condition before unserialize in _link_load(),
+  link_views_handler_argument_target::query() is now compatible to its parent to
+  avoid php strict notices.
+#698438 by tim.plunkett: Added support for Devel Generate
+#1010850 by jcfiala, quartsize, raman2385, Bevan, eporama, das-peter,
+  smithmilner, Digidog: Fixed MigrateFieldHandler to work with Migrate Module.
+
+Link 7.x-1.0, 2011-10-23
+------------------------
+#1318850 by Digidog: Fixed completion of special chars for function
+  link_validate_url() in line 916.
+#1199806 by ss81, jcfiala, Digidog: Fixed fatal error when the link URl is equal
+  to page URL.
+#1307788 Feature request by nmc, tars16, Digidog: Fixed Add custom maxlength to
+  link title text.
+#1217396 by WilliamB,noahb,orakili,Digidog: Fixed options multiple-value &
+  required break input/save and produces error: At least one title or URL must
+  be entered.
+#1036628 by gargoyle,jcfiala,wizonesolutions,Digidog: Fixed to allow more
+  special chars in url validation for use cases like twitter etc. (f.e.: # , ~ )
+#948658 by brenk28, Dave Reid, becw, jcfiala, iMiksu, BTMash, Digidog: Fixed
+  noticeof Undefined index: title in _link_sanitize() - hopefully, finally.
+#1079782 by fago, klausi, drunken monkey, jcfiala, Digidog: Fixed support for
+  hook_entity_property_info() including search API and Rules. @TODO: needs
+  simpletests to be submitted for rc1.
+
+Link 7.x-1.0-beta1, 2011-09-26
+-------------------------------
+#1264208 by lazysoundsystem, Digidog: Fixed recursive serialization of
+  attributes.
+#1218422 by Dave Reid, twistor, Digidog: Fixed tests files: strict warnings
+  about static getInfo and parameters for setUp(), whitespace, and file
+  structure.
+#1038444 by Dave Reid, Digidog: Fixed 3 issues plus #required on title prevents
+  submission. All issues have been fixed with patch of Dave Reid from January.
+  Patch manually retrieved for latest 7.x-1.x by Digidog.
+#1105816 by thekevinday, jcfiala, Digidog: Fixed improper use of db_type by
+  committing patch of thekevinday at comment-5028534.
+#335281 by thePanz, jcfiala, stella, Digidog: committed patch by stella
+  #comment-4929778 for title attribute support.
+#519416 by jcfiala: Added the plain text display of just the link title, which
+  was available in 6.x but had not been added to 7.x yet.
+By jcfiala: Added slight changes to how links are validated to bring them in
+  line withvalid_url().
+#1148864 by jcfiala: Re-enabled the ability to turn off url validation.
+#1063764 by bdragon,jcfiala: Renamed all field formatters to start with 'link_'
+  so they will be unique.
+#1078254 by jcfiala: added a hook_update_n call that copies settings from the
+  field to the instance.
+#1126384 by burki: Started using field_widget_instance to get link field
+  settings in link_field_process, which is more standard than hunting in the
+  for it.
+#1125384 by Rob Loach: Changed url length in link_field_schema to not use the
+  constant which is not always defined.
+#1043348 by jcfiala: Finished updating the formatting code so that querystrings
+  and fragments of urls work as in 6.x-2.x.
+#438770 by jcfiala: Adding test that makes sure the 'plain url' formatter is
+  working properly with the basic case.
+#1043348 by jcfiala: First pass at fixing problems with raw www.example.com urls
+  ending up as index.php?q=www.example.com. Need more testing/fixing with
+  fragments and querystrings - not complete.
+#1056364 by the_phi: Checking that ['settings']['enable_tokens'] exists before
+  the value is compared.
+#1078736 by jcfiala: Added empty handler for hook_link_form_settings to make
+  ield Permissions work.
+
+Link 7.x-1.0-alpha3, 2011-02-07
+-------------------------------
+bug report #1008562 by jcfiala: Looking into URL, as link error caused me to
+  realize that the _link_sanitize was being called in the wrong place - now
+  called on link_field_prepare_view.
+bug report by jcfiala: Fixed error from missing index by changing ['required']
+  to ['required'].
+bug report #1026040 by pcambra: Updated token help to use the updated token
+  module and token display.
+bug report #1033112 by Dave Reid: Removing extra lines from link.info.
+task #970392 by jcfiala: Added content_migrate_field_alter and
+  content_migrate_instance_alter hooks to link.module to help with upgrading
+  from D6 to D7.
+feature request #1012372 by jcfiala: Tried using
+  hook_field_instance_settings_form to allow per-instance settings. Also,
+  re-added a bunch of old tests from 6.x.
+
+Link 7.x-1.0-alpha2, 2010-12-13
+-------------------------------
+task #960062 by jcfiala: Added package of 'fields' to the link.info file.
+task #997270 by jcfiala: Removed content in link.views.inc, and added file
+  references to the link_views_handler files in link.info for better views
+  integration.
+By jcfiala: Added more code to attribute test.
+By jcfiala: Edited the two test files so that simpletests run without error,
+  although they don't test nearly enough.
+bug report #952656 by Dave_Reid: Moved hook_field_schema() to link.install,
+  other small tweaks to remove old references.
+bug report #948628 by brenk28, bec: Fixing setting references in and removing
+  calls to see if token is enabled.
+
+Link 7.x-1.0-alpha1, 2010-12-07
+-------------------------------
+#955214 by alex_b,jcfiala: Fixed problem where a url with a querystring caused
+  fatal errors.
+#956182 by jmiccolis, bec, Bevan: Theme fixing for the theme_link_field
+#696678 by tristanoneil: Link module now showing basic functionality - still not
+  done, but better.
+#696678 by Garrett Albright: Initial attempt at updating Link module to Drupal 7
+  - does not really work but is a start.
+By dropcube: First working copy of the 7.x version.
diff --git a/drupal7/sites/all/modules/link/README.txt b/drupal7/sites/all/modules/link/README.txt
index a258d4dd..ef9c48a2 100644
--- a/drupal7/sites/all/modules/link/README.txt
+++ b/drupal7/sites/all/modules/link/README.txt
@@ -22,19 +22,10 @@ attributes, target attributes, css class attribution, static repeating values,
 input conversion, and many more.
 
 
-
 REQUIREMENTS
 ------------
 
-Project in Drupal 7 requires the following modules:
-
- * Fields API (Fields API is provided already by core)
- * Panels (https://drupal.org/project/panels)
-
-Drupal 8:
-
- * Link is in core now. No installation needed. Yay! Don't forget to activate
-   it. It's deactivated by default.
+No special requirements
 
 
 INSTALLATION
@@ -99,3 +90,4 @@ Current maintainers:
  * Tom Kirkpatrick (mrfelton) - https://www.drupal.org/user/305669
  * Sumit Madan (sumitmadan) - https://www.drupal.org/user/1538790
  * Daniel Kudwien (sun) - https://www.drupal.org/user/54136
+ * Damien McKenna - https://www.drupal.org/u/damienmckenna
diff --git a/drupal7/sites/all/modules/link/link.css b/drupal7/sites/all/modules/link/css/link.css
similarity index 100%
rename from drupal7/sites/all/modules/link/link.css
rename to drupal7/sites/all/modules/link/css/link.css
diff --git a/drupal7/sites/all/modules/link/link-rtl.css b/drupal7/sites/all/modules/link/link-rtl.css
deleted file mode 100644
index 613db5da..00000000
--- a/drupal7/sites/all/modules/link/link-rtl.css
+++ /dev/null
@@ -1,7 +0,0 @@
-.link-field-column {
-  float: right;
-}
-.link-field-column.link-field-url .form-text {
-  direction: ltr;
-  text-align: left;
-}
diff --git a/drupal7/sites/all/modules/link/link.devel_generate.inc b/drupal7/sites/all/modules/link/link.devel_generate.inc
index af0e2d5d..edc10c13 100644
--- a/drupal7/sites/all/modules/link/link.devel_generate.inc
+++ b/drupal7/sites/all/modules/link/link.devel_generate.inc
@@ -21,8 +21,9 @@ function link_devel_generate($object, $field, $instance, $bundle) {
  * Callback for hook_devel_generate().
  */
 function _link_devel_generate($object, $field, $instance, $bundle) {
+  $url = 'http://example.com/' . devel_generate_word(mt_rand(6, 12));
   $link = array(
-    'url' => url('<front>', array('absolute' => TRUE)),
+    'url' => url($url, array('absolute' => TRUE)),
     'attributes' => _link_default_attributes(),
   );
   if ($instance['settings']['title'] != 'none') {
diff --git a/drupal7/sites/all/modules/link/link.info b/drupal7/sites/all/modules/link/link.info
index 351e1782..609379a3 100644
--- a/drupal7/sites/all/modules/link/link.info
+++ b/drupal7/sites/all/modules/link/link.info
@@ -13,13 +13,14 @@ files[] = tests/link.crud_browser.test
 files[] = tests/link.token.test
 files[] = tests/link.entity_token.test
 files[] = tests/link.validate.test
+files[] = tests/link.multilingual.test
 
 ; Views Handlers
 files[] = views/link_views_handler_argument_target.inc
 files[] = views/link_views_handler_filter_protocol.inc
 
-; Information added by Drupal.org packaging script on 2019-02-20
-version = "7.x-1.6"
+; Information added by Drupal.org packaging script on 2019-11-14
+version = "7.x-1.7"
 core = "7.x"
 project = "link"
-datestamp = "1550680687"
+datestamp = "1573731676"
diff --git a/drupal7/sites/all/modules/link/link.install b/drupal7/sites/all/modules/link/link.install
index 8125b699..75a5d72f 100644
--- a/drupal7/sites/all/modules/link/link.install
+++ b/drupal7/sites/all/modules/link/link.install
@@ -12,7 +12,7 @@
  */
 
 /**
- * Implements hook_uninstall().
+ * Implements hook_install().
  */
 function link_install() {
   // Notify the user they may want to install token.
diff --git a/drupal7/sites/all/modules/link/link.module b/drupal7/sites/all/modules/link/link.module
index 8b3094f3..31449e21 100644
--- a/drupal7/sites/all/modules/link/link.module
+++ b/drupal7/sites/all/modules/link/link.module
@@ -8,8 +8,12 @@
 define('LINK_EXTERNAL', 'external');
 define('LINK_INTERNAL', 'internal');
 define('LINK_FRONT', 'front');
+define('LINK_FRAGMENT', 'fragment');
+define('LINK_QUERY', 'query');
 define('LINK_EMAIL', 'email');
+define('LINK_TEL', 'tel');
 define('LINK_NEWS', 'news');
+define('LINK_FILE', 'file');
 define('LINK_TARGET_DEFAULT', 'default');
 define('LINK_TARGET_NEW_WINDOW', '_blank');
 define('LINK_TARGET_TOP', '_top');
@@ -26,9 +30,9 @@ define('LINK_URL_MAX_LENGTH', 2048);
 function link_help($path, $arg) {
   switch ($path) {
     case 'admin/help#link':
-      $output = '<p><strong>About</strong></p>';
-      $output .= '<p>' . 'The link provides a standard custom content field for links. Links can be easily added to any content types and profiles and include advanced validating and different ways of storing internal or external links and URLs. It also supports additional link text title, site wide tokens for titles and title attributes, target attributes, css class attribution, static repeating values, input conversion, and many more.' . '</p>';
-      $output .= '<p>' . '<strong>Requirements / Dependencies</strong>' . '</p>';
+      $output = '<p><strong>' . t('About') . '</strong></p>';
+      $output .= '<p>' . t('The link provides a standard custom content field for links. Links can be easily added to any content types and profiles and include advanced validating and different ways of storing internal or external links and URLs. It also supports additional link text title, site wide tokens for titles and title attributes, target attributes, css class attribution, static repeating values, input conversion, and many more.') . '</p>';
+      $output .= '<p><strong>' . t('Requirements / Dependencies') . '</strong></p>';
       $output .= '<p>' . 'Fields API is provided already by core [no dependencies].' . '</p>';
       $output .= '<p><strong>Configuration</strong></p>';
       $output .= '<p>' . 'Configuration is only slightly more complicated than a text field. Link text titles for URLs can be made required, set as instead of URL, optional (default), or left out entirely. If no link text title is provided, the trimmed version of the complete URL will be displayed. The target attribute should be set to "_blank", "top", or left out completely (checkboxes provide info). The rel=nofollow attribute prevents the link from being followed by certain search engines.' . '</p>';
@@ -195,15 +199,18 @@ function link_field_instance_settings_form($field, $instance) {
     '#size' => 3,
   );
 
+  // Target options. E.g. New window = target="_blank".
   $target_options = array(
     LINK_TARGET_DEFAULT => t('Default (no target attribute)'),
     LINK_TARGET_TOP => t('Open link in window root'),
     LINK_TARGET_NEW_WINDOW => t('Open link in new window'),
     LINK_TARGET_USER => t('Allow the user to choose'),
   );
+
   $form['attributes'] = array(
     '#tree' => TRUE,
   );
+
   $form['attributes']['target'] = array(
     '#type' => 'radios',
     '#title' => t('Link Target'),
@@ -300,6 +307,8 @@ function link_field_load($entity_type, $entities, $field, $instances, $langcode,
   foreach ($entities as $id => $entity) {
     foreach ($items[$id] as $delta => $item) {
       $items[$id][$delta]['attributes'] = _link_load($field, $item, $instances[$id]);
+      $items[$id][$delta]['original_title'] = $item['title'];
+      $items[$id][$delta]['original_url'] = $item['url'];
     }
   }
 }
@@ -525,6 +534,17 @@ function _link_validate(&$item, $delta, $field, $entity, $instance, $langcode, &
  */
 function _link_sanitize(&$item, $delta, &$field, $instance, &$entity) {
   // @codingStandardsIgnoreEnd
+  // As this function can be called multiple times and the item is changed by
+  // reference we need to ensure that there's always the original data to
+  // process otherwise processed data are processed again which might leads to
+  // unexpected results.
+  if (isset($item['_link_sanitized'])) {
+    return;
+  }
+
+  // Store a flag to check in case of a second call.
+  $item['_link_sanitized'] = TRUE;
+
   // Don't try to process empty links.
   if (empty($item['url']) && empty($item['title'])) {
     return;
@@ -561,24 +581,33 @@ function _link_sanitize(&$item, $delta, &$field, $instance, &$entity) {
   if ($type == FALSE && $instance['settings']['validate_url'] === 0) {
     $type = LINK_EXTERNAL;
   }
+  elseif ($type == LINK_FRAGMENT || $type == LINK_QUERY) {
+    // If type is a fragment or query, then use the current URL.
+    $item['url'] = $_GET['q'] . $item['url'];
+  }
   $url = link_cleanup_url($item['url']);
   $url_parts = _link_parse_url($url);
 
   if (!empty($url_parts['url'])) {
-    $item['url'] = url($url_parts['url'],
-      array(
-        'query' => isset($url_parts['query']) ? $url_parts['query'] : NULL,
-        'fragment' => isset($url_parts['fragment']) ? $url_parts['fragment'] : NULL,
-        'absolute' => !empty($instance['settings']['absolute_url']),
-        'html' => TRUE,
-      )
-    );
+    $item = array(
+      'url' => $url_parts['url'],
+      'query' => isset($url_parts['query']) ? $url_parts['query'] : NULL,
+      'fragment' => isset($url_parts['fragment']) ? $url_parts['fragment'] : NULL,
+      'absolute' => !empty($instance['settings']['absolute_url']),
+      'html' => TRUE,
+    ) + $item;
   }
 
   // Create a shortened URL for display.
   if ($type == LINK_EMAIL) {
     $display_url = str_replace('mailto:', '', $url);
   }
+  elseif ($type === LINK_EXTERNAL) {
+    $display_url = $item['url'];
+  }
+  elseif ($type == LINK_TEL) {
+    $display_url = str_replace('tel:', '', $url);
+  }
   else {
     $display_url = url($url_parts['url'],
       array(
@@ -589,7 +618,7 @@ function _link_sanitize(&$item, $delta, &$field, $instance, &$entity) {
     );
   }
   if ($instance['settings']['display']['url_cutoff'] && strlen($display_url) > $instance['settings']['display']['url_cutoff']) {
-    $display_url = substr($display_url, 0, $instance['settings']['display']['url_cutoff']) . "...";
+    $display_url = substr($display_url, 0, $instance['settings']['display']['url_cutoff']) . "…";
   }
   $item['display_url'] = $display_url;
 
@@ -602,7 +631,7 @@ function _link_sanitize(&$item, $delta, &$field, $instance, &$entity) {
     }
   }
   // Use the title defined by the user at the widget level.
-  elseif (drupal_strlen(trim($item['title']))) {
+  elseif (isset($item['title']) && drupal_strlen(trim($item['title']))) {
     $title = $item['title'];
   }
   // Use the static title if a user-defined title is optional and a static title
@@ -702,7 +731,7 @@ function _link_sanitize(&$item, $delta, &$field, $instance, &$entity) {
       else {
         $entity_loaded = $entity;
       }
-      $item['attributes']['title'] = token_replace($item['attributes']['title'], array($entity_token_type => $entity_loaded));
+      $item['attributes']['title'] = token_replace($item['attributes']['title'], array($entity_token_type => $entity_loaded), array('clear' => TRUE));
     }
     $item['attributes']['title'] = filter_xss($item['attributes']['title'], array(
       'b',
@@ -851,7 +880,7 @@ function link_theme() {
  * Formats a link field widget.
  */
 function theme_link_field($vars) {
-  drupal_add_css(drupal_get_path('module', 'link') . '/link.css');
+  drupal_add_css(drupal_get_path('module', 'link') . '/css/link.css');
   $element = $vars['element'];
   // Prefix single value link fields with the name of the field.
   if (empty($element['#field']['multiple'])) {
@@ -916,6 +945,19 @@ function _link_default_attributes() {
  */
 function link_field_process($element, $form_state, $complete_form) {
   $instance = field_widget_instance($element, $form_state);
+  if (!$instance) {
+    // The element comes from a custom form, we have to manually create the
+    // $instance settings.
+    $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,
+      'url' => isset($element['#url']) ? $element['#url'] : 'optional',
+    );
+    if (isset($element['#attributes'])) {
+      $instance['settings']['attributes'] = $element['#attributes'];
+    }
+  }
   $settings = $instance['settings'];
   $element['url'] = array(
     '#type' => 'textfield',
@@ -1017,6 +1059,9 @@ function link_field_formatter_info() {
       'label' => t('Title, as link (default)'),
       'field types' => array('link_field'),
       'multiple values' => FIELD_BEHAVIOR_DEFAULT,
+      'settings' => array(
+        'custom_title' => '',
+      ),
     ),
     'link_title_plain' => array(
       'label' => t('Title, as plain text'),
@@ -1088,6 +1133,14 @@ function link_field_formatter_settings_form($field, $instance, $view_mode, $form
       '#default_value' => $settings['strip_www'],
     );
   }
+  if ($display['type'] == 'link_default') {
+    $element['custom_title'] = array(
+      '#title' => t('Override title'),
+      '#description' => t('Optionally override the title for the link(s).'),
+      '#type' => 'textfield',
+      '#default_value' => $settings['custom_title'],
+    );
+  }
   return $element;
 }
 
@@ -1106,6 +1159,11 @@ function link_field_formatter_settings_summary($field, $instance, $view_mode) {
       return t('Leave www. in domain');
     }
   }
+  if ($display['type'] == 'link_default') {
+    if ($display['settings']['custom_title']) {
+      return t('Title: %title', array('%title' => $display['settings']['custom_title']));
+    }
+  }
   return '';
 }
 
@@ -1115,11 +1173,16 @@ function link_field_formatter_settings_summary($field, $instance, $view_mode) {
 function link_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
   $elements = array();
   foreach ($items as $delta => $item) {
+    if (!empty($display['settings']['custom_title'])) {
+      $item['title'] = $display['settings']['custom_title'];
+    }
     $elements[$delta] = array(
       '#theme' => 'link_formatter_' . $display['type'],
       '#element' => $item,
       '#field' => $instance,
-      '#display' => $display,
+      '#display' => array(
+        'settings' => $display['settings'],
+      ),
     );
   }
   return $elements;
@@ -1138,14 +1201,14 @@ function theme_link_formatter_link_default($vars) {
   }
   // Display a normal link if both title and URL are available.
   if (!empty($vars['element']['title']) && !empty($vars['element']['url'])) {
-    return l($vars['element']['title'], $vars['element']['url'], $link_options);
+    return l($vars['element']['title'], rawurldecode($vars['element']['url']), $link_options);
   }
   // If only a title, display the title.
   elseif (!empty($vars['element']['title'])) {
     return !empty($link_options['html']) ? $vars['element']['title'] : check_plain($vars['element']['title']);
   }
   elseif (!empty($vars['element']['url'])) {
-    return l($vars['element']['title'], $vars['element']['url'], $link_options);
+    return l($vars['element']['title'], rawurldecode($vars['element']['url']), $link_options);
   }
 }
 
@@ -1222,6 +1285,9 @@ function theme_link_formatter_link_title_plain($vars) {
  */
 function theme_link_formatter_link_url($vars) {
   $link_options = $vars['element'];
+  if (isset($link_options['attributes']['class'])) {
+    $link_options['attributes']['class'] = array($link_options['attributes']['class']);
+  }
   unset($link_options['title']);
   unset($link_options['url']);
   return $vars['element']['url'] ? l($vars['element']['display_url'], $vars['element']['url'], $link_options) : '';
@@ -1244,7 +1310,12 @@ function theme_link_formatter_link_label($vars) {
   $link_options = $vars['element'];
   unset($link_options['title']);
   unset($link_options['url']);
-  return $vars['element']['url'] ? l($vars['field']['label'], $vars['element']['url'], $link_options) : '';
+  $label = $vars['field']['label'];
+  if (function_exists('i18n_string_translate')) {
+    $i18n_string_name = "field:{$vars['field']['field_name']}:{$vars['field']['bundle']}:label";
+    $label = i18n_string_translate($i18n_string_name, $label);
+  }
+  return $vars['element']['url'] ? l($label, $vars['element']['url'], $link_options) : '';
 }
 
 /**
@@ -1365,7 +1436,7 @@ function link_validate_url($text, $langcode = NULL) {
   $type = link_url_type($text);
 
   if ($type && ($type == LINK_INTERNAL || $type == LINK_EXTERNAL)) {
-    $flag = valid_url($text, TRUE);
+    $flag = valid_url($text, $type == LINK_EXTERNAL);
     if (!$flag) {
       $normal_path = drupal_get_normal_path($text, $langcode);
       $parsed_link = parse_url($normal_path, PHP_URL_PATH);
@@ -1504,12 +1575,13 @@ function link_url_type($text) {
 
   $link_ichars = $link_ichars_domain . (string) html_entity_decode(implode("", array(
       // ß.
-      "&#x00DF;",
-    )), ENT_QUOTES, 'UTF-8');
+    "&#x00DF;",
+  )), ENT_QUOTES, 'UTF-8');
   $allowed_protocols = variable_get('filter_allowed_protocols', array(
     'http',
     'https',
     'ftp',
+    'file',
     'news',
     'nntp',
     'telnet',
@@ -1518,6 +1590,7 @@ function link_url_type($text) {
     'ssh',
     'sftp',
     'webcal',
+    'tel',
   ));
   $link_domains = _link_domains();
 
@@ -1538,8 +1611,8 @@ function link_url_type($text) {
 
   $directories = "(?:\/[a-z0-9" . $link_ichars . "_\-\.~+%=&,$'#!():;*@\[\]]*)*";
   // Yes, four backslashes == a single backslash.
-  $query = "(?:\/?\?([?a-z0-9" . $link_ichars . "+_|\-\.~\/\\\\%=&,$'!():;*@\[\]{} ]*))";
-  $anchor = "(?:#[a-z0-9" . $link_ichars . "_\-\.~+%=&,$'():;*@\[\]\/\?]*)";
+  $query = "(?:\/?\?([?a-zA-Z0-9" . $link_ichars . "+_|\-\.~\/\\\\%=&,$'!():;*@\[\]{} ]*))";
+  $anchor = "(?:#[a-zA-Z0-9" . $link_ichars . "_\-\.~+%=&,$'():;*@\[\]\/\?!]*)";
 
   // The rest of the path for a standard URL.
   // @codingStandardsIgnoreLine
@@ -1551,6 +1624,9 @@ function link_url_type($text) {
 
   $user = '[a-zA-Z0-9' . $link_ichars . '_\-\.\+\^!#\$%&*+\/\=\?\`\|\{\}~\'\[\]]+';
   $email_pattern = '/^mailto:' . $user . '@' . '(?:' . $domain . '|' . $ipv4 . '|' . $ipv6 . '|localhost)' . $query . '?$/';
+  $tel_pattern = '/^tel:(?:\+[1-9]\d{1,14}|\d{2,15})$/';
+
+  $file_pattern = "/^(?:file:\/\/)" . "(?:\/?[a-z0-9" . $link_ichars . "_\-\.\\\~+%=&,$'#!():;*@\[\]]*)*" . '$/i';
 
   if (strpos($text, '<front>') === 0) {
     return LINK_FRONT;
@@ -1558,9 +1634,31 @@ function link_url_type($text) {
   if (in_array('mailto', $allowed_protocols) && preg_match($email_pattern, $text)) {
     return LINK_EMAIL;
   }
+  if (strpos($text, '#') === 0) {
+    return LINK_FRAGMENT;
+  }
+  if (strpos($text, '?') === 0) {
+    return LINK_QUERY;
+  }
+  if (in_array('tel', $allowed_protocols) && strpos($text, 'tel:') === 0) {
+    if (preg_match($tel_pattern, $text)) {
+      // Based on our tel pattern this is a 'valid' phone number so return tel
+      // type.
+      return LINK_TEL;
+    }
+    else {
+      // Based on our tel pattern this is using the tel protocol, but is not a
+      // 'valid' phone number. If we don't return false here $text will match
+      // LINK_EXTERNAL which is incorrect.
+      return FALSE;
+    }
+  }
   if (in_array('news', $allowed_protocols) && preg_match($news_pattern, $text)) {
     return LINK_NEWS;
   }
+  if (in_array('file', $allowed_protocols) && preg_match($file_pattern, $text, $as)) {
+    return LINK_FILE;
+  }
   if (preg_match($internal_pattern . $end, $text)) {
     return LINK_INTERNAL;
   }
@@ -1599,14 +1697,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]);
     }
   }
@@ -1621,14 +1719,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];
       }
@@ -1677,8 +1775,8 @@ function link_field_property_info_callback(&$info, $entity_type, $field, $instan
   $property['auto creation'] = 'link_field_item_create';
 
   $property['property info'] = link_field_item_property_info();
-  $property['property info']['url']['required'] = !$instance['settings']['url'];
-  $property['property info']['title']['required'] = ($instance['settings']['title'] == 'required');
+  $property['property info']['url']['required'] = $instance['required'] && !$instance['settings']['url'];
+  $property['property info']['title']['required'] = $instance['required'] && ($instance['settings']['title'] == 'required');
   if ($instance['settings']['title'] == 'none') {
     unset($property['property info']['title']);
   }
diff --git a/drupal7/sites/all/modules/link/tests/link.attribute.test b/drupal7/sites/all/modules/link/tests/link.attribute.test
index f66a0e6e..11cae3cb 100644
--- a/drupal7/sites/all/modules/link/tests/link.attribute.test
+++ b/drupal7/sites/all/modules/link/tests/link.attribute.test
@@ -35,11 +35,15 @@ class LinkAttributeCrudTest extends DrupalWebTestCase {
   }
 
   /**
-   * Setup.
+   * {@inheritdoc}
    */
-  public function setup() {
-    parent::setup('field_ui', 'link');
+  public function setUp(array $modules = array()) {
+    $modules[] = 'field_ui';
+    $modules[] = 'link';
+    parent::setUp($modules);
+
     $this->zebra = 0;
+
     // Create and login user.
     $this->web_user = $this->drupalCreateUser(array(
       'administer content types',
@@ -236,7 +240,6 @@ class LinkAttributeCrudTest extends DrupalWebTestCase {
       '@content_type_friendly' => $content_type_friendly,
       '@title' => $node_title,
     )));
-
   }
 
   /**
@@ -332,11 +335,8 @@ class LinkAttributeCrudTest extends DrupalWebTestCase {
 
   /**
    * Formatter URL.
-   *
-   * @codingStandardsIgnoreStart
    */
-  public function testFormatterURL() {
-    // @codingStandardsIgnoreEnd
+  public function testFormatterUrl() {
     $content_type_friendly = $this->randomName(20);
     $content_type_machine = strtolower($this->randomName(10));
 
diff --git a/drupal7/sites/all/modules/link/tests/link.crud.test b/drupal7/sites/all/modules/link/tests/link.crud.test
index 6bc38674..de050b18 100644
--- a/drupal7/sites/all/modules/link/tests/link.crud.test
+++ b/drupal7/sites/all/modules/link/tests/link.crud.test
@@ -25,10 +25,12 @@ class LinkContentCrudTest extends DrupalWebTestCase {
   }
 
   /**
-   * Setup.
+   * {@inheritdoc}
    */
-  public function setUp() {
-    parent::setUp('field_ui', 'link');
+  public function setUp(array $modules = array()) {
+    $modules[] = 'field_ui';
+    $modules[] = 'link';
+    parent::setUp($modules);
   }
 
   /**
@@ -36,11 +38,8 @@ class LinkContentCrudTest extends DrupalWebTestCase {
    *
    * All we're doing here is creating a content type, creating a simple link
    * field on that content type.
-   *
-   * @codingStandardsIgnoreStart
    */
-  public function testLinkCreateFieldAPI() {
-    // @codingStandardsIgnoreEnd
+  public function testLinkCreateFieldApi() {
     $content_type_friendly = $this->randomName(20);
     $content_type_machine = strtolower($this->randomName(10));
 
diff --git a/drupal7/sites/all/modules/link/tests/link.crud_browser.test b/drupal7/sites/all/modules/link/tests/link.crud_browser.test
index dc218573..b5063d1a 100644
--- a/drupal7/sites/all/modules/link/tests/link.crud_browser.test
+++ b/drupal7/sites/all/modules/link/tests/link.crud_browser.test
@@ -8,7 +8,7 @@
 /**
  * Testing that users can not input bad URLs or labels.
  */
-class LinkUITest extends DrupalWebTestcase {
+class LinkUiTest extends DrupalWebTestcase {
 
   /**
    * Link supposed to be good.
@@ -37,10 +37,12 @@ class LinkUITest extends DrupalWebTestcase {
   }
 
   /**
-   * Setup.
+   * {@inheritdoc}
    */
-  public function setUp() {
-    parent::setUp('field_ui', 'link');
+  public function setUp(array $modules = array()) {
+    $modules[] = 'field_ui';
+    $modules[] = 'link';
+    parent::setUp($modules);
   }
 
   /**
@@ -191,7 +193,6 @@ class LinkUITest extends DrupalWebTestcase {
    * title actually displays <strong>.
    */
   public function testStaticLinkCreate() {
-
     $this->web_user = $this->drupalCreateUser(array(
       'administer content types',
       'administer fields',
@@ -248,11 +249,8 @@ class LinkUITest extends DrupalWebTestcase {
    *
    * Testing that if you have the title but no url, the title is not sanitized
    * twice.
-   *
-   * @codingStandardsIgnoreStart
    */
-  public function testCRUDTitleOnlyTitleNoLink() {
-    // @codingStandardsIgnoreEnd
+  public function testCrudTitleOnlyTitleNoLink() {
     $this->web_user = $this->drupalCreateUser(array(
       'administer content types',
       'administer fields',
@@ -309,12 +307,8 @@ class LinkUITest extends DrupalWebTestcase {
    *
    * If we're creating a new field and just hit 'save' on the default options,
    * we want to make sure they are set to the expected results.
-   *
-   * @codingStandardsIgnoreStart
    */
-  public function testCRUDCreateFieldDefaults() {
-    // @codingStandardsIgnoreEnd
-
+  public function testCrudCreateFieldDefaults() {
     $this->web_user = $this->drupalCreateUser(array(
       'administer content types',
       'administer fields',
@@ -361,11 +355,8 @@ class LinkUITest extends DrupalWebTestcase {
    *
    * If we're creating a new field and just hit 'save' on the default options,
    * we want to make sure they are set to the expected results.
-   *
-   * @codingStandardsIgnoreStart
    */
-  public function testCRUDCreateFieldWithClass() {
-    // @codingStandardsIgnoreEnd
+  public function testCrudCreateFieldWithClass() {
     $this->web_user = $this->drupalCreateUser(array(
       'administer content types',
       'administer fields',
@@ -443,11 +434,8 @@ class LinkUITest extends DrupalWebTestcase {
    *
    * If we're creating a new field and just hit 'save' on the default options,
    * we want to make sure they are set to the expected results.
-   *
-   * @codingStandardsIgnoreStart
    */
-  public function testCRUDCreateFieldWithTwoClasses() {
-    // @codingStandardsIgnoreEnd
+  public function testCrudCreateFieldWithTwoClasses() {
     $this->web_user = $this->drupalCreateUser(array(
       'administer content types',
       'administer fields',
diff --git a/drupal7/sites/all/modules/link/tests/link.entity_token.test b/drupal7/sites/all/modules/link/tests/link.entity_token.test
index 6c42655f..e7df239f 100644
--- a/drupal7/sites/all/modules/link/tests/link.entity_token.test
+++ b/drupal7/sites/all/modules/link/tests/link.entity_token.test
@@ -23,10 +23,13 @@ class LinkEntityTokenTest extends LinkBaseTestClass {
   }
 
   /**
-   * Setup.
+   * {@inheritdoc}
    */
-  public function setUp($modules = array()) {
-    parent::setUp(array('token', 'entity', 'entity_token'));
+  public function setUp(array $modules = array()) {
+    $modules[] = 'token';
+    $modules[] = 'entity';
+    $modules[] = 'entity_token';
+    parent::setUp($modules);
   }
 
   /**
diff --git a/drupal7/sites/all/modules/link/tests/link.multilingual.test b/drupal7/sites/all/modules/link/tests/link.multilingual.test
new file mode 100644
index 00000000..2aeec79c
--- /dev/null
+++ b/drupal7/sites/all/modules/link/tests/link.multilingual.test
@@ -0,0 +1,198 @@
+<?php
+
+/**
+ * @file
+ * Tests that exercise the relative / absolute output of the link module.
+ */
+
+/**
+ * Testing that absolute / relative outputs match the expected format.
+ */
+class LinkMultilingualTestCase extends LinkBaseTestClass {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setUp(array $modules = array()) {
+    $this->permissions = array_merge($this->permissions, array(
+      'administer site configuration',
+      'administer languages',
+    ));
+    $modules[] = 'locale';
+    $modules[] = 'locale_test';
+    $modules[] = 'translation';
+    parent::setUp($modules);
+  }
+
+  /**
+   * Enables and configured language related stuff.
+   */
+  public function setUpLanguage() {
+    global $language_url;
+    $this->drupalGet('admin/config/regional/language');
+    // Enable the path prefix for the default language: this way any un-prefixed
+    // URL must have a valid fallback value.
+    $edit = array('prefix' => 'en');
+    $this->drupalPost('admin/config/regional/language/edit/en', $edit, t('Save language'));
+    $language_url->prefix = $language_url->language;
+
+    // Add custom language - as we need more than 1 language to be multilingual.
+    // Code for the language.
+    $langcode = 'xx';
+    // The English name for the language.
+    $name = $this->randomName(16);
+    // The native name for the language.
+    $native = $this->randomName(16);
+    $edit = array(
+      'langcode' => $langcode,
+      'name' => $name,
+      'native' => $native,
+      'prefix' => $langcode,
+      'direction' => '0',
+    );
+    $this->drupalPost('admin/config/regional/language/add', $edit, t('Add custom language'));
+    variable_set('locale_language_negotiation_url_part', LOCALE_LANGUAGE_NEGOTIATION_URL_PREFIX);
+
+    // Enable URL language detection and selection.
+    $edit = array('language[enabled][locale-url]' => 1);
+    $this->drupalPost('admin/config/regional/language/configure', $edit, t('Save settings'));
+    language_negotiation_set(LANGUAGE_TYPE_INTERFACE, array(LOCALE_LANGUAGE_NEGOTIATION_URL));
+
+    // Reset static caching.
+    drupal_static_reset('language_list');
+    drupal_static_reset('locale_url_outbound_alter');
+    drupal_static_reset('locale_language_url_rewrite_url');
+  }
+
+}
+/**
+ *
+ */
+class LinkMultilingualPathTest extends LinkMultilingualTestCase {
+
+  /**
+   *
+   */
+  public static function getInfo() {
+    return array(
+      'name' => 'Link language path prefix',
+      'description' => 'Tests that path properly work with language path prefixes.',
+      'group' => 'Link',
+    );
+  }
+
+  /**
+   * Creates a link field, fills it, then uses a loaded node to test paths.
+   */
+  public function testLanguagePrefixedPaths() {
+    $this->setUpLanguage();
+
+    // Create fields.
+    // Field for absolute urls.
+    $field_name_absolute = $this->createLinkField('page');
+
+    // Field for relative urls.
+    $settings = array(
+      'instance[settings][absolute_url]' => FALSE,
+    );
+    $field_name_relative = $this->createLinkField('page', $settings);
+
+    // Check the node edit form.
+    $this->drupalGet('node/add/page');
+    $this->assertField($field_name_absolute . '[und][0][title]', 'Title absolute found');
+    $this->assertField($field_name_absolute . '[und][0][url]', 'URL absolute found');
+    $this->assertField($field_name_relative . '[und][0][title]', 'Title relative found');
+    $this->assertField($field_name_relative . '[und][0][url]', 'URL relative found');
+
+    // Create test content.
+    $url_tests = array(
+      1 => array(
+        'href' => 'http://dummy.com/' . $this->randomName(),
+        'label' => $this->randomName(),
+      ),
+      2 => array(
+        'href' => 'node/1',
+        'label' => $this->randomName(),
+      ),
+      3 => array(
+        'href' => 'node/1?property=value',
+        'label' => $this->randomName(),
+        'query' => array('property' => 'value'),
+      ),
+      4 => array(
+        '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'),
+      ),
+    );
+    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'],
+      );
+      $this->drupalPost(NULL, $edit, t('Save'));
+      $url = $this->getUrl();
+      $input['url'] = $url;
+    }
+
+    // Change to anonymous user.
+    $this->drupalLogout();
+
+    foreach (array_slice($url_tests, 1, NULL, TRUE) as $index => $input2) {
+      $node = node_load($index);
+      $this->assertNotEqual(NULL, $node, "Do we have a node?");
+      $this->assertEqual($node->nid, $index, "Test that we have a node.");
+      $this->drupalGet('node/' . $index);
+
+      $relative_expected = url('node/1', array('absolute' => FALSE) + $input2);
+      $absolute_expected = url('node/1', array('absolute' => TRUE) + $input2);
+
+      $absolute_result = $this->xpath('//*[contains(@class, "field-name-' . drupal_clean_css_identifier($field_name_absolute) . '")]/div/div/a/@href');
+      $absolute_result = (string) reset($absolute_result);
+      $this->assertEqual($absolute_result, $absolute_expected, "Absolute url output ('" . $absolute_result . "') looks as expected ('" . $absolute_expected . "')");
+
+      $relative_result = $this->xpath('//*[contains(@class, "field-name-' . drupal_clean_css_identifier($field_name_relative) . '")]/div/div/a/@href');
+      $relative_result = (string) reset($relative_result);
+      $this->assertEqual($relative_result, $relative_expected, "Relative url output ('" . $relative_result . "') looks as expected ('" . $relative_expected . "')");
+    }
+
+    // Check if this works with the alias too.
+    // Add a path alias for node 1.
+    $path = array(
+      'source' => 'node/1',
+      'alias' => $url_tests[1]['label'],
+    );
+    path_save($path);
+    // Another iteration over the same nodes - this time they should use the
+    // path alias.
+    foreach (array_slice($url_tests, 1, NULL, TRUE) as $index => $input2) {
+      $node = node_load($index);
+      $this->assertNotEqual(NULL, $node, "Do we have a node?");
+      $this->assertEqual($node->nid, $index, "Test that we have a node.");
+      $this->drupalGet('node/' . $index);
+
+      $relative_expected = url('node/1', array('absolute' => FALSE) + $input2);
+      $absolute_expected = url('node/1', array('absolute' => TRUE) + $input2);
+
+      $absolute_result = $this->xpath('//*[contains(@class, "field-name-' . drupal_clean_css_identifier($field_name_absolute) . '")]/div/div/a/@href');
+      $absolute_result = (string) reset($absolute_result);
+      $this->assertEqual($absolute_result, $absolute_expected, "Absolute alias-url output ('" . $absolute_result . "') looks as expected ('" . $absolute_expected . "')");
+
+      $relative_result = $this->xpath('//*[contains(@class, "field-name-' . drupal_clean_css_identifier($field_name_relative) . '")]/div/div/a/@href');
+      $relative_result = (string) reset($relative_result);
+      $this->assertEqual($relative_result, $relative_expected, "Relative alias-url output ('" . $relative_result . "') looks as expected ('" . $relative_expected . "')");
+    }
+  }
+
+}
diff --git a/drupal7/sites/all/modules/link/tests/link.test b/drupal7/sites/all/modules/link/tests/link.test
index dd9adb49..6c963679 100644
--- a/drupal7/sites/all/modules/link/tests/link.test
+++ b/drupal7/sites/all/modules/link/tests/link.test
@@ -23,11 +23,9 @@ class LinkBaseTestClass extends DrupalWebTestCase {
   );
 
   /**
-   * Setup.
+   * {@inheritdoc}
    */
-  public function setUp() {
-    $modules = func_get_args();
-    $modules = (isset($modules[0]) && is_array($modules[0]) ? $modules[0] : $modules);
+  public function setUp(array $modules = array()) {
     $modules[] = 'field_ui';
     $modules[] = 'link';
     parent::setUp($modules);
diff --git a/drupal7/sites/all/modules/link/tests/link.token.test b/drupal7/sites/all/modules/link/tests/link.token.test
index edbb1df5..f21f5721 100644
--- a/drupal7/sites/all/modules/link/tests/link.token.test
+++ b/drupal7/sites/all/modules/link/tests/link.token.test
@@ -23,10 +23,11 @@ class LinkTokenTest extends LinkBaseTestClass {
   }
 
   /**
-   * Setup.
+   * {@inheritdoc}
    */
-  public function setUp($modules = array()) {
-    parent::setUp(array('token'));
+  public function setUp(array $modules = array()) {
+    $modules[] = 'token';
+    parent::setUp($modules);
   }
 
   /**
@@ -77,7 +78,6 @@ class LinkTokenTest extends LinkBaseTestClass {
    * Creates a node with a link and checks the title value.
    */
   public function testStaticTokenLinkCreate() {
-
     // Create field.
     $name = $this->randomName();
     $settings = array(
@@ -122,7 +122,6 @@ class LinkTokenTest extends LinkBaseTestClass {
    * same.
    */
   public function testStaticTokenLinkCreate2() {
-
     // Create field.
     $name = $this->randomName();
     $settings = array(
@@ -162,8 +161,7 @@ class LinkTokenTest extends LinkBaseTestClass {
    *
    * @codingStandardsIgnoreStart
    */
-  public function _test_Link_With_Title_Attribute_token_url_form() {
-    // @codingStandardsIgnoreEnd
+  public function xTestLinkWithTitleAttributeTokenUrlForm() {
     /* $this->loginWithPermissions($this->permissions);
     $this->acquireContentTypes(1);
     $field_settings = array(
@@ -190,6 +188,7 @@ class LinkTokenTest extends LinkBaseTestClass {
     $this->drupalPost('admin/content/node-type/'. $url_type .'/fields/'. $field['field_name'],
     $edit, t('Save field settings'));
     $this->assertText(t('Saved field @field_name', array('@field_name' => $field['field_name'])));*/
+    // @codingStandardsIgnoreEnd
     $name = $this->randomName();
     $settings = array(
       'instance[settings][attributes][rel]' => 'nofollow',
@@ -232,7 +231,7 @@ class LinkTokenTest extends LinkBaseTestClass {
    *
    * @codingStandardsIgnoreStart
    */
-  public function _test_Link_With_Title_Attribute_token_title_form() {
+  public function xTestLinkWithTitleAttributeTokenTitleForm() {
     // @codingStandardsIgnoreEnd
     $this->loginWithPermissions($this->permissions);
     $this->acquireContentTypes(1);
@@ -290,12 +289,8 @@ class LinkTokenTest extends LinkBaseTestClass {
 
   /**
    * Trying to set the url to contain a token.
-   *
-   * @codingStandardsIgnoreStart
    */
-  public function _testUserTokenLinkCreateInURL() {
-    //@codingStandardsIgnoreEnd
-
+  public function xTestUserTokenLinkCreateInUrl() {
     $this->web_user = $this->drupalCreateUser(array(
       'administer content types',
       'administer fields',
@@ -353,12 +348,8 @@ class LinkTokenTest extends LinkBaseTestClass {
 
   /**
    * Trying to set the url to contain a token.
-   *
-   * @codingStandardsIgnoreStart
    */
-  public function _testUserTokenLinkCreateInURL2() {
-    // @codingStandardsIgnoreEnd
-
+  public function xTestUserTokenLinkCreateInUrl2() {
     $this->web_user = $this->drupalCreateUser(array(
       'administer content types',
       'administer fields',
diff --git a/drupal7/sites/all/modules/link/tests/link.validate.test b/drupal7/sites/all/modules/link/tests/link.validate.test
index addd7d37..1694b496 100644
--- a/drupal7/sites/all/modules/link/tests/link.validate.test
+++ b/drupal7/sites/all/modules/link/tests/link.validate.test
@@ -22,13 +22,9 @@ class LinkValidateTestCase extends LinkBaseTestClass {
   }
 
   /**
-   * Takes a url, and sees if it can validate that the url is valid.
-   *
-   * @codingStandardsIgnoreStart
+   * Takes a URL, sees if it can validate that the URL is valid.
    */
-  protected function link_test_validate_url($url) {
-    // @codingStandardsIgnoreEnd
-
+  protected function linkTestValidateUrl($url) {
     $field_name = $this->createLinkField();
 
     $label = $this->randomName();
@@ -71,21 +67,15 @@ class LinkValidateTest extends LinkValidateTestCase {
 
   /**
    * Validate basic URL.
-   *
-   * @codingStandardsIgnoreStart
    */
-  public function test_link_validate_basic_url() {
-    // @codingStandardsIgnoreEnd
-    $this->link_test_validate_url('http://www.example.com');
+  public function testLinkValidateBasicUrl() {
+    $this->linkTestValidateUrl('http://www.example.com');
   }
 
   /**
    * Test if we're stopped from posting a bad url on default validation.
-   *
-   * @codingStandardsIgnoreStart
    */
-  public function test_link_validate_bad_url_validate_default() {
-    // @codingStandardsIgnoreEnd
+  public function testLinkValidateBadUrlValidateDefault() {
     $this->web_user = $this->drupalCreateUser(array(
       'administer content types',
       'administer fields',
@@ -134,11 +124,8 @@ class LinkValidateTest extends LinkValidateTestCase {
 
   /**
    * Test if we're stopped from posting a bad url with validation on.
-   *
-   * @codingStandardsIgnoreStart
    */
-  public function test_link_validate_bad_url_validate_on() {
-    // @codingStandardsIgnoreEnd
+  public function testLinkValidateBadUrlValidateOn() {
     $this->web_user = $this->drupalCreateUser(array(
       'administer content types',
       'administer fields',
@@ -188,11 +175,8 @@ class LinkValidateTest extends LinkValidateTestCase {
 
   /**
    * Test if we can post a bad url if the validation is expressly turned off.
-   *
-   * @codingStandardsIgnoreStart
    */
-  public function test_link_validate_bad_url_validate_off() {
-    // @codingStandardsIgnoreEnd
+  public function testLinkValidateBadUrlValidateOff() {
     $this->web_user = $this->drupalCreateUser(array(
       'administer content types',
       'administer fields',
@@ -249,11 +233,8 @@ class LinkValidateTest extends LinkValidateTestCase {
    *
    * Test if a bad url can sneak through un-filtered if we play with the
    * validation...
-   *
-   * @codingStandardsIgnoreStart
    */
-  public function x_test_link_validate_switching_between_validation_status() {
-    // @codingStandardsIgnoreEnd
+  public function xTestLinkValidateSwitchingBetweenValidationStatus() {
     $this->acquireContentTypes(1);
     $this->web_user = $this->drupalCreateUser(array(
       'administer content types',
@@ -294,6 +275,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),
     )));
@@ -323,58 +305,43 @@ class LinkValidateTest extends LinkValidateTestCase {
 
   /**
    * Validate that '<front>' is a valid url.
-   *
-   * @codingStandardsIgnoreStart
    */
-  public function test_link_front_url() {
-    // @codingStandardsIgnoreEnd
-    $this->link_test_validate_url('<front>');
+  public function testLinkFrontUrl() {
+    $this->linkTestValidateUrl('<front>');
   }
 
   /**
    * Validate that an internal url would be accepted.
-   *
-   * @codingStandardsIgnoreStart
    */
-  public function test_link_internal_url() {
-    // @codingStandardsIgnoreEnd
+  public function testLinkInternalUrl() {
     // Create the content first.
     $node = $this->drupalCreateNode();
 
     $link = 'node/' . $node->nid;
-    $this->link_test_validate_url($link);
+    $this->linkTestValidateUrl($link);
     $type = link_url_type($link);
     $this->assertEqual(LINK_INTERNAL, $type, 'Test ' . $link . ' is an internal link.');
   }
 
   /**
    * Validate a simple mailto.
-   *
-   * @codingStandardsIgnoreStart
    */
-  public function test_link_mailto() {
-    // @codingStandardsIgnoreEnd
-    $this->link_test_validate_url('mailto:jcfiala@gmail.com');
+  public function testLinkMailto() {
+    $this->linkTestValidateUrl('mailto:jcfiala@gmail.com');
   }
 
   /**
    * Check link external https.
-   *
-   * @codingStandardsIgnoreStart
    */
-  public function test_link_external_https() {
-    // @codingStandardsIgnoreEnd
-    $this->link_test_validate_url('https://www.example.com/');
+  public function testLinkExternalHttps() {
+    $this->linkTestValidateUrl('https://www.example.com/');
   }
 
   /**
    * Check link FTP.
-   *
-   * @codingStandardsIgnoreStart
    */
-  public function test_link_ftp() {
-    // @codingStandardsIgnoreEnd
-    $this->link_test_validate_url('ftp://www.example.com/');
+  public function testLinkFtp() {
+    $this->linkTestValidateUrl('ftp://www.example.com/');
   }
 
 }
@@ -397,22 +364,16 @@ class LinkValidateTestNews extends LinkValidateTestCase {
 
   /**
    * Validate a news link to a message group.
-   *
-   * @codingStandardsIgnoreStart
    */
-  public function test_link_news() {
-    // @codingStandardsIgnoreEnd
-    $this->link_test_validate_url('news:comp.infosystems.www.misc');
+  public function testLinkNews() {
+    $this->linkTestValidateUrl('news:comp.infosystems.www.misc');
   }
 
   /**
    * Validate a news link to a message id.  Said ID copied off of google groups.
-   *
-   * @codingStandardsIgnoreStart
    */
-  public function test_link_news_message() {
-    // @codingStandardsIgnoreEnd
-    $this->link_test_validate_url('news:hj0db8$vrm$1@news.eternal-september.org');
+  public function testLinkNewsMessage() {
+    $this->linkTestValidateUrl('news:hj0db8$vrm$1@news.eternal-september.org');
   }
 
 }
@@ -435,65 +396,47 @@ class LinkValidateSpecificURL extends LinkValidateTestCase {
 
   /**
    * Lets throw in a lot of umlouts for testing!
-   *
-   * @codingStandardsIgnoreStart
    */
-  public function test_umlout_url() {
-    // @codingStandardsIgnoreEnd
-    $this->link_test_validate_url('http://üÜü.exämple.com/nöde');
+  public function testUmloutUrl() {
+    $this->linkTestValidateUrl('http://üÜü.exämple.com/nöde');
   }
 
   /**
    * Check umlout mailto.
-   *
-   * @codingStandardsIgnoreStart
    */
-  public function test_umlout_mailto() {
-    // @codingStandardsIgnoreEnd
-    $this->link_test_validate_url('mailto:Üser@exÅmple.com');
+  public function testUmloutMailto() {
+    $this->linkTestValidateUrl('mailto:Üser@exÅmple.com');
   }
 
   /**
-   * Check german b in url.
-   *
-   * @codingStandardsIgnoreStart
+   * Check German b in URL, aka Eszett.
    */
-  public function test_german_b_url() {
-    // @codingStandardsIgnoreEnd
-    $this->link_test_validate_url('http://www.test.com/ßstuff');
+  public function testGermanEszettUrl() {
+    $this->linkTestValidateUrl('http://www.test.com/ßstuff');
   }
 
   /**
-   * Check Special in url.
-   *
-   * @codingStandardsIgnoreStart
+   * Check Spanish ñ in URL.
    */
-  public function test_special_n_url() {
-    // @codingStandardsIgnoreEnd
-    $this->link_test_validate_url('http://www.testÑñ.com/');
+  public function testSpecialEneUrl() {
+    $this->linkTestValidateUrl('http://www.testÑñ.com/');
   }
 
   /**
-   * Curly Brackets in query.
-   *
-   * @codingStandardsIgnoreStart
+   * Curly brackets in query.
    */
-  public function test_curly_brackets_in_query() {
-    // @codingStandardsIgnoreEnd
-    $this->link_test_validate_url('http://www.healthyteennetwork.org/index.asp?Type=B_PR&SEC={2AE1D600-4FC6-4B4D-8822-F1D5F072ED7B}&DE={235FD1E7-208D-4363-9854-4E6775EB8A4C}');
+  public function testCurlyBracketsInQuery() {
+    $this->linkTestValidateUrl('http://www.healthyteennetwork.org/index.asp?Type=B_PR&SEC={2AE1D600-4FC6-4B4D-8822-F1D5F072ED7B}&DE={235FD1E7-208D-4363-9854-4E6775EB8A4C}');
   }
 
   /**
    * Here, we're testing that a very long url is stored properly in the db.
    *
    * Basically, trying to test http://drupal.org/node/376818
-   *
-   * @codingStandardsIgnoreStart
    */
-  public function testLinkURLFieldIsBig() {
-    // @codingStandardsIgnoreEnd
+  public function testLinkUrlFieldIsBig() {
     $long_url = 'http://th.wikipedia.org/wiki/%E0%B9%82%E0%B8%A3%E0%B8%87%E0%B9%80%E0%B8%A3%E0%B8%B5%E0%B8%A2%E0%B8%99%E0%B9%80%E0%B8%9A%E0%B8%8D%E0%B8%88%E0%B8%A1%E0%B8%A3%E0%B8%B2%E0%B8%8A%E0%B8%B9%E0%B8%97%E0%B8%B4%E0%B8%A8_%E0%B8%99%E0%B8%84%E0%B8%A3%E0%B8%A8%E0%B8%A3%E0%B8%B5%E0%B8%98%E0%B8%A3%E0%B8%A3%E0%B8%A1%E0%B8%A3%E0%B8%B2%E0%B8%8A';
-    $this->link_test_validate_url($long_url);
+    $this->linkTestValidateUrl($long_url);
   }
 
 }
@@ -520,10 +463,11 @@ class LinkValidateUrlLight extends DrupalWebTestCase {
   }
 
   /**
-   * Setup.
+   * {@inheritdoc}
    */
-  public function setUp() {
-    parent::setUp('link');
+  public function setUp(array $modules = array()) {
+    $modules[] = 'link';
+    parent::setUp($modules);
   }
 
   /**
@@ -543,6 +487,9 @@ class LinkValidateUrlLight extends DrupalWebTestCase {
       case LINK_EMAIL:
         return "Email";
 
+      case LINK_TEL:
+        return "Telephone";
+
       case LINK_NEWS:
         return "Newsgroup";
 
@@ -584,6 +531,43 @@ class LinkValidateUrlLight extends DrupalWebTestCase {
     $this->assertEqual(FALSE, $valid, 'Make sure just a bad address is correctly failed');
   }
 
+  /**
+   * Confirm that valid tel: links work as expected.
+   */
+  public function testValidateTelLinks() {
+    $links = array(
+      'tel:01',
+      'tel:123456789012345',
+      'tel:+123456789012345',
+    );
+    foreach ($links as $link) {
+      $type = link_url_type($link);
+      $this->assertEqual(LINK_TEL, $type, 'Test ' . $link . ' is a tel link.');
+      $valid = link_validate_url($link);
+      $this->assertTrue($valid, 'Test ' . $link . ' is valid tel link.');
+    }
+  }
+
+  /**
+   * Confirm that invalid tel: links work as expected.
+   */
+  public function testValidateTelLinksBad() {
+    $links = array(
+      'tel:0',
+      'tel:1234567890123456',
+      'tel:+1',
+      'tel:+0123456789',
+      'tel:+1234567890123456',
+      ':12345678',
+    );
+    foreach ($links as $link) {
+      $type = link_url_type($link);
+      $this->assertFalse($type, 'Test ' . $link . ' is not a tel link.');
+      $valid = link_validate_url($link);
+      $this->assertFalse($valid, 'Test ' . $link . ' is not a valid tel link.');
+    }
+  }
+
   /**
    * Validate Newsgroup Link.
    */
@@ -615,6 +599,7 @@ class LinkValidateUrlLight extends DrupalWebTestCase {
     $tempfile = drupal_tempnam('public://files', 'test');
     $links = array(
       'rss.xml',
+      'foo#bar',
       file_uri_target($tempfile),
       drupal_realpath($tempfile),
     );
diff --git a/drupal7/sites/all/modules/link/views/link.views.inc b/drupal7/sites/all/modules/link/views/link.views.inc
deleted file mode 100644
index 8c080ad1..00000000
--- a/drupal7/sites/all/modules/link/views/link.views.inc
+++ /dev/null
@@ -1,116 +0,0 @@
-<?php
-
-// @codingStandardsIgnoreFile
-
-/**
- * @file
- * Contains functions handling views integration.
- */
-
-/**
- * Implementation of hook_views_handlers().
- */
-/*function link_views_handlers() {
-  return array(
-    'info' => array(
-      'path' => drupal_get_path('module', 'link') .'/views',
-    ),
-    'handlers' => array(
-      'link_views_handler_argument_target' => array(
-        'parent' => 'views_handler_argument',
-      ),
-      'link_views_handler_filter_protocol' => array(
-        'parent' => 'views_handler_filter_string',
-      ),
-    ),
-  );
-}*/
-
-/**
- * Return CCK Views data for the link_field_settings($op == 'views data').
- *
- * @TODO: Is there some way to tell views I have formatters for it?
- */
-/*function link_views_content_field_data($field) {
-  // Build the automatic views data provided for us by CCK.
-  // This creates all the information necessary for the "url" field.
-  $data = content_views_field_views_data($field);
-
-  $db_info = content_database_info($field);
-  $table_alias = content_views_tablename($field);
-  $field_types = _content_field_types();
-
-  // Tweak the automatic views data for the link "url" field.
-  // Set the filter title to "@label URL"
-  $data[$table_alias][$field['field_name'] .'_url']['filter']['title'] = t('@label URL', array('@label' => t($field_types[$field['type']]['label']))) .': '. t($field['widget']['label']);
-  // Remove the argument handling for URLs.
-  unset($data[$table_alias][$field['field_name'] .'_url']['argument']);
-
-  // Build out additional views data for the link "title" field.
-  $data[$table_alias][$field['field_name'] .'_title'] = array(
-    'group' => t('Content'),
-    'title' => t('@label title', array('@label' => t($field_types[$field['type']]['label']))) .': '. t($field['widget']['label']) .' ('. $field['field_name'] .')',
-    'help' =>  $data[$table_alias][$field['field_name'] .'_url']['help'],
-    'argument' => array(
-      'field' => $db_info['columns']['title']['column'],
-      'tablename' => $db_info['table'],
-      'handler' => 'content_handler_argument_string',
-      'click sortable' => TRUE,
-      'name field' => '', // TODO, mimic content.views.inc :)
-      'content_field_name' => $field['field_name'],
-      'allow_empty' => TRUE,
-    ),
-    'filter' => array(
-      'field' => $db_info['columns']['title']['column'],
-      'title' => t('@label title', array('@label' => t($field_types[$field['type']]['label']))),
-      'tablename' => $db_info['table'],
-      'handler' => 'content_handler_filter_string',
-      'additional fields' => array(),
-      'content_field_name' => $field['field_name'],
-      'allow_empty' => TRUE,
-    ),
-    'sort' => array(
-      'field' => $db_info['columns']['title']['column'],
-      'tablename' => $db_info['table'],
-      'handler' => 'content_handler_sort',
-      'content_field_name' => $field['field_name'],
-      'allow_empty' => TRUE,
-    ),
-  );
-
-  // Build out additional Views filter for the link "protocol" pseudo field.
-  // TODO: Add a protocol argument.
-  $data[$table_alias][$field['field_name'] .'_protocol'] = array(
-    'group' => t('Content'),
-    'title' => t('@label protocol', array('@label' => t($field_types[$field['type']]['label']))) .': '. t($field['widget']['label']) .' ('. $field['field_name'] .')',
-    'help' =>  $data[$table_alias][$field['field_name'] .'_url']['help'],
-    'filter' => array(
-      'field' => $db_info['columns']['url']['column'],
-      'title' => t('@label protocol', array('@label' => t($field_types[$field['type']]['label']))),
-      'tablename' => $db_info['table'],
-      'handler' => 'link_views_handler_filter_protocol',
-      'additional fields' => array(),
-      'content_field_name' => $field['field_name'],
-      'allow_empty' => TRUE,
-    ),
-  );
-
-  // Build out additional Views argument for the link "target" pseudo field.
-  // TODO: Add a target filter.
-  $data[$table_alias][$field['field_name'] .'_target'] = array(
-    'group' => t('Content'),
-    'title' => t('@label target', array('@label' => t($field_types[$field['type']]['label']))) .': '. t($field['widget']['label']) .' ('. $field['field_name'] .')',
-    'help' =>  $data[$table_alias][$field['field_name'] .'_url']['help'],
-    'argument' => array(
-      'field' => $db_info['columns']['attributes']['column'],
-      'title' => t('@label target', array('@label' => t($field_types[$field['type']]['label']))) .': '. t($field['widget']['label']) .' ('. $field['field_name'] .')',
-      'tablename' => $db_info['table'],
-      'handler' => 'link_views_handler_argument_target',
-      'additional fields' => array(),
-      'content_field_name' => $field['field_name'],
-      'allow_empty' => TRUE,
-    ),
-  );
-
-  return $data;
-}*/
diff --git a/drupal7/sites/all/modules/link/views/link_views_handler_filter_protocol.inc b/drupal7/sites/all/modules/link/views/link_views_handler_filter_protocol.inc
index ae00c17e..677fee58 100644
--- a/drupal7/sites/all/modules/link/views/link_views_handler_filter_protocol.inc
+++ b/drupal7/sites/all/modules/link/views/link_views_handler_filter_protocol.inc
@@ -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';
