summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2011-04-28 10:55:37 +0200
committerCarlo Landmeter <clandmeter@gmail.com>2011-04-28 11:18:39 +0200
commit1f28895df8f65b540f0a22f8b520c90523bea167 (patch)
treefc1c68a94c238b5145c8a9acc9380126b50c2280
parentf3d77d909b399154dbb6aac4a2a53a9e11a6694a (diff)
downloadapk_browser-1f28895df8f65b540f0a22f8b520c90523bea167.tar.bz2
apk_browser-1f28895df8f65b540f0a22f8b520c90523bea167.tar.xz
change build date field to date type
-rw-r--r--apk_browser.install13
1 files changed, 7 insertions, 6 deletions
diff --git a/apk_browser.install b/apk_browser.install
index 852e3b1..18dc754 100644
--- a/apk_browser.install
+++ b/apk_browser.install
@@ -32,10 +32,10 @@ function apk_browser_install() {
'field_name' => $name,
'cardinality' => (isset($fvars['cdl'])) ? $fvars['cdl'] : '1',
'type' => (isset($fvars['type'])) ? $fvars['type'] : 'text',
- 'settings' => array(
- 'max_length' => (isset($fvars['length'])) ? $fvars['length'] : '255',
- ),
);
+ if (isset($fvars['settings'])) {
+ $field['settings'] = $fvars['settings'];
+ }
field_create_field($field);
}
// now all instances
@@ -43,7 +43,6 @@ function apk_browser_install() {
$instance = array(
'field_name' => $name,
'label' => $fvars['label'],
- 'type' => 'text',
'entity_type' => 'node',
'bundle' => 'apk',
'widget' => array(
@@ -162,7 +161,7 @@ function _apk_browser_field_vars() {
),
'apk_description' => array(
'label' => $t('Description'),
- 'length' => '1000'
+ 'settings' => array('max_length' => '1000')
),
'apk_url' => array(
'label' => $t('URL'),
@@ -174,7 +173,9 @@ function _apk_browser_field_vars() {
'label' => $t('Origin')
),
'apk_build_time' => array(
- 'label' => $t('Build date')
+ 'label' => $t('Build date'),
+ 'type' => 'datestamp',
+ 'widget' => 'date_text'
),
'apk_commit' => array(
'label' => $t('Commit')