diff -urp .\link.module ..\link_URL_length_fix\link.module
--- .\link.module	Mon Sep 22 14:20:33 2008
+++ ..\link_URL_length_fix\link.module	Tue Mar 17 12:16:04 2009
@@ -13,6 +13,11 @@ define('LINK_EMAIL', 'email');
 define('LINK_DOMAINS', 'aero|arpa|biz|com|cat|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel|mobi|local');
 
 /**
+ * define maximum URL length
+ */
+define('URL_MAX_LENGTH', 2048);
+
+/**
  * Implementation of hook_field_info().
  */
 function link_field_info() {
@@ -139,7 +144,7 @@ function link_field_settings($op, $field
 
     case 'database columns':
       return array(
-        'url' => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE, 'sortable' => TRUE),
+        'url' => array('type' => 'varchar', 'length' => URL_MAX_LENGTH, 'not null' => FALSE, 'sortable' => TRUE),
         'title' => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE, 'sortable' => TRUE),
         'attributes' => array('type' => 'text', 'size' => 'medium', 'not null' => FALSE),
       );
@@ -462,11 +467,12 @@ function link_elements() {
  * The $fields array is in $form['#field_info'][$element['#field_name']].
  */
 function link_process($element, $edit, $form_state, $form) {
+  $url_max_length = sprintf('%d', URL_MAX_LENGTH);
    $field = $form['#field_info'][$element['#field_name']];
    $delta = $element['#delta'];
    $element['url'] = array(
      '#type' => 'textfield',
-     '#maxlength' => '255',
+     '#maxlength' => $url_max_length,
      '#title' => t('URL'),
      '#description' => $element['#description'],
      '#required' => ($delta == 0 && $field['url'] !== 'optional') ? $element['#required'] : FALSE,
Only in .: link_URL_length_fix.patch
