diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-06-11 04:59:26 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-06-11 04:59:26 +0000 |
commit | 3692eee08d7a088cfab165905cd3971e64862880 (patch) | |
tree | 7667cc3b6ea42f4acef51d3276ee69154c3781f1 | |
parent | 0d9a5df18c6ddb3e4d7613da8fb9b156266b396a (diff) | |
download | brdo-3692eee08d7a088cfab165905cd3971e64862880.tar.gz brdo-3692eee08d7a088cfab165905cd3971e64862880.tar.bz2 |
- Patch #288946 by jeffschuler, z.stolar: increase path length to 255.
-rw-r--r-- | modules/path/path.admin.inc | 4 | ||||
-rw-r--r-- | modules/path/path.module | 2 | ||||
-rw-r--r-- | modules/system/system.install | 15 |
3 files changed, 16 insertions, 5 deletions
diff --git a/modules/path/path.admin.inc b/modules/path/path.admin.inc index c135bcd26..a203adca7 100644 --- a/modules/path/path.admin.inc +++ b/modules/path/path.admin.inc @@ -100,7 +100,7 @@ function path_admin_form(&$form_state, $edit = array('src' => '', 'dst' => '', ' '#type' => 'textfield', '#title' => t('Existing system path'), '#default_value' => $edit['src'], - '#maxlength' => 128, + '#maxlength' => 255, '#size' => 45, '#description' => t('Specify the existing path you wish to alias. For example: node/28, forum/1, taxonomy/term/1+2.'), '#field_prefix' => url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q='), @@ -110,7 +110,7 @@ function path_admin_form(&$form_state, $edit = array('src' => '', 'dst' => '', ' '#type' => 'textfield', '#title' => t('Path alias'), '#default_value' => $edit['dst'], - '#maxlength' => 128, + '#maxlength' => 255, '#size' => 45, '#description' => t('Specify an alternative path by which this data can be accessed. For example, type "about" when writing an about page. Use a relative path and don\'t add a trailing slash or the URL alias won\'t work.'), '#field_prefix' => url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q='), diff --git a/modules/path/path.module b/modules/path/path.module index 3edec859a..bac63f1d2 100644 --- a/modules/path/path.module +++ b/modules/path/path.module @@ -237,7 +237,7 @@ function path_form_alter(&$form, $form_state, $form_id) { '#type' => 'textfield', '#title' => t('URL alias'), '#default_value' => $path, - '#maxlength' => 128, + '#maxlength' => 255, '#collapsible' => TRUE, '#collapsed' => TRUE, '#description' => t('Optionally specify an alternative URL by which this node can be accessed. For example, type "about" when writing an about page. Use a relative path and don\'t add a trailing slash or the URL alias won\'t work.'), diff --git a/modules/system/system.install b/modules/system/system.install index ae708d49e..af694203e 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -1320,14 +1320,14 @@ function system_schema() { 'src' => array( 'description' => 'The Drupal path this alias is for; e.g. node/12.', 'type' => 'varchar', - 'length' => 128, + 'length' => 255, 'not null' => TRUE, 'default' => '', ), 'dst' => array( 'description' => 'The alias for this path; e.g. title-of-the-story.', 'type' => 'varchar', - 'length' => 128, + 'length' => 255, 'not null' => TRUE, 'default' => '', ), @@ -3538,6 +3538,17 @@ function system_update_7025() { } /** + * Increase permitted length of url aliases to 255 characters. + * + */ +function system_update_7026() { + $ret = array(); + db_change_field($ret, 'url_alias', 'src', 'src', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE)); + db_change_field($ret, 'url_alias', 'dst', 'dst', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE)); + return $ret; +} + +/** * @} End of "defgroup updates-6.x-to-7.x" * The next series of updates should start at 8000. */ |