diff options
author | Fabio Varesano <fax8@13637.no-reply.drupal.org> | 2006-06-24 17:36:59 +0000 |
---|---|---|
committer | Fabio Varesano <fax8@13637.no-reply.drupal.org> | 2006-06-24 17:36:59 +0000 |
commit | ca54d95de4b11a952a658335ae13cbc75841cc16 (patch) | |
tree | c9ef0fb6c74d3c94c2638a72a65398f8dc50cadb /plugins/video_customfields | |
parent | 31a14e3c82914cfc68a605ecfc0c52a49a2d9c3b (diff) | |
download | video-ca54d95de4b11a952a658335ae13cbc75841cc16.tar.gz video-ca54d95de4b11a952a658335ae13cbc75841cc16.tar.bz2 |
Small change to video_upload prepare to check for permissions
before writing 'A file must be provided'.
Corected a bug which was making impossible to reedit the
custom fileds values after node creation.
Thanks pancapangrawit (http://drupal.org/user/59924)
for pointing this out.
Diffstat (limited to 'plugins/video_customfields')
-rw-r--r-- | plugins/video_customfields/video_customfields.module | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/video_customfields/video_customfields.module b/plugins/video_customfields/video_customfields.module index dc997ea..972bdc1 100644 --- a/plugins/video_customfields/video_customfields.module +++ b/plugins/video_customfields/video_customfields.module @@ -102,12 +102,16 @@ function video_customfields_form_alter($form_id, &$form) { if($form_id == 'video_node_form' && isset($form['video']) && user_access('insert custom fields')) { + //get node object from form + $node = $form['#node']; + $title1 = variable_get('video_customfield1', ''); $title2 = variable_get('video_customfield2', ''); $title3 = variable_get('video_customfield3', ''); $title4 = variable_get('video_customfield4', ''); $title5 = variable_get('video_customfield5', ''); $title6 = variable_get('video_customfield6', ''); + //Only display the custom fields group if atleast one field has a title. if ($title1 . $title2 . $title3 . $title4 . $title5 . $title6 != '') { $form['customfields'] = array('#type' => 'fieldset', '#title' => variable_get('video_customfieldtitle', 'Custom Fields'), '#collapsible' => TRUE, '#collapsed' => variable_get('video_customgroupcollapsed', FALSE), '#weight' => -17); |