diff options
-rw-r--r-- | modules/node/node.module | 1 | ||||
-rw-r--r-- | modules/node/node.schema | 4 | ||||
-rw-r--r-- | modules/system/system.install | 11 |
3 files changed, 14 insertions, 2 deletions
diff --git a/modules/node/node.module b/modules/node/node.module index f0dc3aaf1..598a072d3 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -3185,6 +3185,7 @@ function node_content_form($node, $form_state) { '#title' => check_plain($type->title_label), '#required' => TRUE, '#default_value' => $node->title, + '#maxlength' => 255, '#weight' => -5, ); } diff --git a/modules/node/node.schema b/modules/node/node.schema index 752732c5f..aa6d3343c 100644 --- a/modules/node/node.schema +++ b/modules/node/node.schema @@ -8,7 +8,7 @@ function node_schema() { 'vid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'default' => 0), 'type' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''), 'language' => array('type' => 'varchar', 'length' => 12, 'not null' => TRUE, 'default' => ''), - 'title' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), + 'title' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), 'uid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), 'status' => array('type' => 'int', 'not null' => TRUE, 'default' => 1), 'created' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), @@ -72,7 +72,7 @@ function node_schema() { 'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), 'vid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), 'uid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'title' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), + 'title' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), 'body' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), 'teaser' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), 'log' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), diff --git a/modules/system/system.install b/modules/system/system.install index 02ec53c80..10bda38f1 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -3429,6 +3429,17 @@ function system_update_6024() { } /** + * Increase the maximum length of node titles from 128 to 255. + */ +function system_update_6025() { + $ret = array(); + db_update_field($ret, 'node', 'title'); + db_update_field($ret, 'node_revisions', 'title'); + return $ret; +} + + +/** * @} End of "defgroup updates-5.x-to-6.x" * The next series of updates should start at 7000. */ |