Commit 4f1649c9 authored by John Hwang's avatar John Hwang

Backport HEAD to 4.7

parent cbf4b556
......@@ -159,7 +159,7 @@ function content_update_5() {
}
$field = db_fetch_array($result);
$fields = _content_fields();
$fields = content_fields();
$field = $fields[$field['field_name']];
$field_types = _content_field_types();
$field_type = $field_types[$field['type']];
......
This diff is collapsed.
This diff is collapsed.
......@@ -61,7 +61,7 @@ function nodereference_update_3() {
include_once(drupal_get_path('module', 'content') .'/content.module');
include_once(drupal_get_path('module', 'content') .'/content_admin.inc');
$fields = _content_fields();
$fields = content_fields();
foreach ($fields as $field) {
switch ($field['type']) {
......
......@@ -282,7 +282,7 @@ function nodereference_referenced_by_list($nid, $content_type = '') {
* Retrieve a pipe delimited string of autocomplete suggestions
*/
function nodereference_autocomplete($field_name, $string = '') {
$fields = _content_fields();
$fields = content_fields();
$field = $fields[$field_name];
$matches = array();
......
......@@ -79,7 +79,7 @@ function number_update_4() {
include_once(drupal_get_path('module', 'content') .'/content.module');
include_once(drupal_get_path('module', 'content') .'/content_admin.inc');
$fields = _content_fields();
$fields = content_fields();
foreach ($fields as $field) {
switch ($field['type']) {
......
......@@ -166,6 +166,7 @@ function number_widget($op, &$node, $field, &$node_field) {
'#title' => '',
'#default_value' => $data['value'],
'#required' => ($delta == 0) ? $field['required'] : FALSE,
'#maxlength' => 11,
);
$delta++;
}
......@@ -176,6 +177,7 @@ function number_widget($op, &$node, $field, &$node_field) {
'#title' => '',
'#default_value' => '',
'#required' => ($delta == 0) ? $field['required'] : FALSE,
'#maxlength' => 11,
);
}
}
......@@ -186,6 +188,7 @@ function number_widget($op, &$node, $field, &$node_field) {
'#default_value' => isset($node_field[0]['value']) ? $node_field[0]['value'] : '',
'#required' => $field['required'],
'#description' => $field['widget']['description'],
'#maxlength' => 11,
);
}
return $form;
......
......@@ -88,7 +88,7 @@ function text_update_4() {
include_once(drupal_get_path('module', 'content') .'/content.module');
include_once(drupal_get_path('module', 'content') .'/content_admin.inc');
$fields = _content_fields();
$fields = content_fields();
foreach ($fields as $field) {
switch ($field['type']) {
......
......@@ -61,7 +61,7 @@ function userreference_update_3() {
include_once(drupal_get_path('module', 'content') .'/content.module');
include_once(drupal_get_path('module', 'content') .'/content_admin.inc');
$fields = _content_fields();
$fields = content_fields();
foreach ($fields as $field) {
switch ($field['type']) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment