Index: contrib/emaudio/emaudio.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/emfield/contrib/emaudio/emaudio.module,v retrieving revision 1.1.4.11 diff -u -r1.1.4.11 emaudio.module --- contrib/emaudio/emaudio.module 16 Jun 2008 00:34:50 -0000 1.1.4.11 +++ contrib/emaudio/emaudio.module 5 Jul 2008 15:44:10 -0000 @@ -172,21 +172,21 @@ $form['audio']['audio_width'] = array( '#type' => 'textfield', '#title' => t('Audio display width'), - '#default_value' => $widget['audio_width'] ? $widget['audio_width'] : $width, + '#default_value' => empty($widget['audio_width']) ? '$width' : $widget['audio_width'], '#required' => true, '#description' => t('The width of the audio. It defaults to @width.', array('@width' => $width)), ); $form['audio']['audio_height'] = array( '#type' => 'textfield', '#title' => t('Audio display height'), - '#default_value' => $widget['audio_height'] ? $widget['audio_height'] : $height, + '#default_value' => empty($widget['audio_height']) ? '$height' : $widget['audio_height'], '#required' => true, '#description' => t('The height of the audio. It defaults to @height.', array('@height' => $height)), ); $form['audio']['audio_autoplay'] = array( '#type' => 'checkbox', '#title' => t('Autoplay'), - '#default_value' => $widget['audio_autoplay'] ? $widget['audio_autoplay'] : false, + '#default_value' => empty($widget['audio_autoplay']) ? 'false' : $widget['audio_autoplay'], '#description' => t('If supported by the provider, checking this box will cause the audio player to automatically begin after it loads when in its full size.'), ); @@ -202,21 +202,21 @@ $form['preview']['preview_width'] = array( '#type' => 'textfield', '#title' => t('Audio preview width'), - '#default_value' => $widget['preview_width'] ? $widget['preview_width'] : variable_get('emaudio_default_preview_width', EMAUDIO_DEFAULT_PREVIEW_WIDTH), + '#default_value' => empty($widget['preview_width']) ? "variable_get('emaudio_default_preview_width', EMAUDIO_DEFAULT_PREVIEW_WIDTH)" : $widget['preview_width'], '#required' => true, '#description' => t('The width of the preview audio. It defaults to @width.', array('@width' => $width)), ); $form['preview']['preview_height'] = array( '#type' => 'textfield', '#title' => t('Audio preview height'), - '#default_value' => $widget['preview_height'] ? $widget['preview_height'] : variable_get('emaudio_default_preview_height', EMAUDIO_DEFAULT_PREVIEW_HEIGHT), + '#default_value' => empty($widget['preview_height']) ? "variable_get('emaudio_default_preview_height', EMAUDIO_DEFAULT_PREVIEW_HEIGHT)" : $widget['preview_height'], '#required' => true, '#description' => t('The height of the preview audio. It defaults to @height.', array('@height' => $height)), ); $form['preview']['preview_autoplay'] = array( '#type' => 'checkbox', '#title' => t('Autoplay'), - '#default_value' => $widget['preview_autoplay'] ? $widget['preview_autoplay'] : false, + '#default_value' => empty($widget['preview_autoplay']) ? 'false' : $widget['preview_autoplay'], '#description' => t('If supported by the provider, checking this box will cause the audio player to automatically begin after it loads when in its preview size.'), ); @@ -232,14 +232,14 @@ $form['tn']['thumbnail_width'] = array( '#type' => 'textfield', '#title' => t('Audio width'), - '#default_value' => $widget['thumbnail_width'] ? $widget['thumbnail_width'] : variable_get('emaudio_default_thumbnail_width', EMAUDIO_DEFAULT_THUMBNAIL_WIDTH), + '#default_value' => empty($widget['thumbnail_width']) ? "variable_get('emaudio_default_thumbnail_width', EMAUDIO_DEFAULT_THUMBNAIL_WIDTH)" : $widget['thumbnail_width'], '#required' => true, '#description' => t('The width of the thumbnail. It defaults to @width.', array('@width' => $width)), ); $form['tn']['thumbnail_height'] = array( '#type' => 'textfield', '#title' => t('Thumbnail height'), - '#default_value' => $widget['thumbnail_height'] ? $widget['thumbnail_height'] : variable_get('emaudio_default_thumbnail_height', EMAUDIO_DEFAULT_THUMBNAIL_HEIGHT), + '#default_value' => empty($widget['thumbnail_height']) ? "variable_get('emaudio_default_thumbnail_height', EMAUDIO_DEFAULT_THUMBNAIL_HEIGHT)" : $widget['thumbnail_height'], '#required' => true, '#description' => t('The height of the thumbnail. It defaults to @height.', array('@height' => $height)), ); @@ -249,7 +249,7 @@ $form['tn']['thumbnail_default_path'] = array( '#type' => 'textfield', '#title' => t('Default thumbnail path'), - '#default_value' => $widget['thumbnail_default_path'] ? $widget['thumbnail_default_path'] : variable_get('emaudio_default_thumbnail_path', ''), + '#default_value' => empty($widget['thumbnail_default_path']) ? "variable_get('emaudio_default_thumbnail_path')" : $widget['thumbnail_default_path'], '#description' => t('Path to a local default thumbnail image for cases when a thumbnail can\'t be found. For example, you might have a default thumbnail at %files.', array('%files' => 'files/thumbnail.png')) . $tn_desc, ); } Index: contrib/image_ncck/image_ncck.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/emfield/contrib/image_ncck/image_ncck.module,v retrieving revision 1.4.4.10 diff -u -r1.4.4.10 image_ncck.module --- contrib/image_ncck/image_ncck.module 16 Jun 2008 00:34:50 -0000 1.4.4.10 +++ contrib/image_ncck/image_ncck.module 5 Jul 2008 15:43:20 -0000 @@ -178,14 +178,14 @@ $form['full']['full_width'] = array( '#type' => 'textfield', '#title' => t('Full size display width'), - '#default_value' => $widget['full_width'] ? $widget['full_width'] : $width, + '#default_value' => $widget['full_width'] ? '$width' : $widget['full_width'], '#required' => true, '#description' => t('The width of the image. It defaults to @width. Set it to 0 if you want to leave the image at its original aspect ratio.', array('@width' => $width)), ); $form['full']['full_height'] = array( '#type' => 'textfield', '#title' => t('Full size display height'), - '#default_value' => $widget['full_height'] ? $widget['full_height'] : $height, + '#default_value' => $widget['full_height'] ? '$height' : $widget['full_height'], '#required' => true, '#description' => t('The height of the image. It defaults to @height. Set it to 0 if you want to leave the image at its original aspect ratio.', array('@height' => $height)), ); @@ -194,7 +194,7 @@ '#title' => t('Full size link'), '#description' => t('Where the image will link when displayed in its full size. \'Content\' links to the content page, \'provider\' links to the provider\'s image page, and \'none\' displays the image with no link.'), '#options' => $link_options, - '#default_value' => $widget['full_link'] ? $widget['full_link'] : variable_get('image_ncck_default_full_link', IMAGE_NCCK_DEFAULT_FULL_LINK), + '#default_value' => $widget['full_link'] ? "variable_get('image_ncck_default_full_link', IMAGE_NCCK_DEFAULT_FULL_LINK)" : $widget['full_link'], ); $width = variable_get('image_ncck_default_preview_width', IMAGE_NCCK_DEFAULT_PREVIEW_WIDTH); @@ -209,14 +209,14 @@ $form['preview']['preview_width'] = array( '#type' => 'textfield', '#title' => t('Image preview width'), - '#default_value' => $widget['preview_width'] ? $widget['preview_width'] : variable_get('image_ncck_default_preview_width', IMAGE_NCCK_DEFAULT_PREVIEW_WIDTH), + '#default_value' => $widget['preview_width'] ? "variable_get('image_ncck_default_preview_width', IMAGE_NCCK_DEFAULT_PREVIEW_WIDTH)" : $widget['preview_width'], '#required' => true, '#description' => t('The width of the image preview. It defaults to @width. Set it to 0 if you want to leave the image at its original aspect ratio.', array('@width' => $width)), ); $form['preview']['preview_height'] = array( '#type' => 'textfield', '#title' => t('Image preview height'), - '#default_value' => $widget['preview_height'] ? $widget['preview_height'] : variable_get('image_ncck_default_preview_height', IMAGE_NCCK_DEFAULT_PREVIEW_HEIGHT), + '#default_value' => $widget['preview_height'] ? "variable_get('image_ncck_default_preview_height', IMAGE_NCCK_DEFAULT_PREVIEW_HEIGHT)" : $widget['preview_height'], '#required' => true, '#description' => t('The height of the image preview. It defaults to @height. Set it to 0 if you want to leave the image at its original aspect ratio.', array('@height' => $height)), ); @@ -225,7 +225,7 @@ '#title' => t('Preview size link'), '#description' => t('Where the image will link when displayed in its preview size. \'Content\' links to the content page, \'provider\' links to the provider\'s image page, and \'none\' displays the image with no link.'), '#options' => $link_options, - '#default_value' => $widget['full_link'] ? $widget['full_link'] : variable_get('image_ncck_default_preview_link', IMAGE_NCCK_DEFAULT_PREVIEW_LINK), + '#default_value' => $widget['full_link'] ? "variable_get('image_ncck_default_preview_link', IMAGE_NCCK_DEFAULT_PREVIEW_LINK)" : $widget['full_link'], ); @@ -248,7 +248,7 @@ $form['tn']['thumbnail_height'] = array( '#type' => 'textfield', '#title' => t('Image thumbnail height'), - '#default_value' => $widget['thumbnail_height'] ? $widget['thumbnail_height'] : variable_get('image_ncck_default_thumbnail_height', IMAGE_NCCK_DEFAULT_THUMBNAIL_HEIGHT), + '#default_value' => empty($widget['thumbnail_height']) ? "variable_get('image_ncck_default_thumbnail_height', IMAGE_NCCK_DEFAULT_THUMBNAIL_HEIGHT)" : $widget['thumbnail_height'], '#required' => true, '#description' => t('The height of the image thumbnail. It defaults to @height. Set it to 0 if you want to leave the image at its original aspect ratio.', array('@height' => $height)), ); @@ -257,7 +257,7 @@ '#title' => t('Image thumbnail link'), '#description' => t('Where the image will link when displayed as a thumbnail. \'Content\' links to the content page, \'provider\' links to the provider\'s image page, and \'none\' displays the image with no link.'), '#options' => $link_options, - '#default_value' => $widget['thumbnail_link'] ? $widget['thumbnail_link'] : variable_get('image_ncck_default_thumbnail_link', IMAGE_NCCK_DEFAULT_THUMBNAIL_LINK), + '#default_value' => $widget['thumbnail_link'] ? "variable_get('image_ncck_default_thumbnail_link', IMAGE_NCCK_DEFAULT_THUMBNAIL_LINK)" : $widget['thumbnail_link'], ); } return $form; Index: contrib/video_cck/video_cck.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/emfield/contrib/video_cck/video_cck.module,v retrieving revision 1.5.4.13 diff -u -r1.5.4.13 video_cck.module --- contrib/video_cck/video_cck.module 23 Jun 2008 15:11:22 -0000 1.5.4.13 +++ contrib/video_cck/video_cck.module 5 Jul 2008 15:42:11 -0000 @@ -227,21 +227,21 @@ $form['video']['video_width'] = array( '#type' => 'textfield', '#title' => t('Video display width'), - '#default_value' => $widget['video_width'] ? $widget['video_width'] : $width, + '#default_value' => $widget['video_width'] ? '$width' : $widget['video_width'], '#required' => true, '#description' => t('The width of the video. It defaults to @width.', array('@width' => $width)), ); $form['video']['video_height'] = array( '#type' => 'textfield', '#title' => t('Video display height'), - '#default_value' => $widget['video_height'] ? $widget['video_height'] : $height, + '#default_value' => empty($widget['video_height']) ? '$height' : $widget['video_height'], '#required' => true, '#description' => t('The height of the video. It defaults to @height.', array('@height' => $height)), ); $form['video']['video_autoplay'] = array( '#type' => 'checkbox', '#title' => t('Autoplay'), - '#default_value' => $widget['video_autoplay'] ? $widget['video_autoplay'] : false, + '#default_value' => empty($widget['video_autoplay']) ? 'false' : $widget['video_autoplay'], '#description' => t('If supported by the provider, checking this box will cause the video to automatically begin after the video loads when in its full size.'), ); @@ -257,21 +257,21 @@ $form['preview']['preview_width'] = array( '#type' => 'textfield', '#title' => t('Video preview width'), - '#default_value' => $widget['preview_width'] ? $widget['preview_width'] : variable_get('video_cck_default_preview_width', VIDEO_CCK_DEFAULT_PREVIEW_WIDTH), + '#default_value' => $widget['preview_width'] ? "variable_get('video_cck_default_preview_width', VIDEO_CCK_DEFAULT_PREVIEW_WIDTH)" : $widget['preview_width'], '#required' => true, '#description' => t('The width of the preview video. It defaults to @width.', array('@width' => $width)), ); $form['preview']['preview_height'] = array( '#type' => 'textfield', '#title' => t('Video preview height'), - '#default_value' => $widget['preview_height'] ? $widget['preview_height'] : variable_get('video_cck_default_preview_height', VIDEO_CCK_DEFAULT_PREVIEW_HEIGHT), + '#default_value' => empty($widget['preview_height']) ? "variable_get('video_cck_default_preview_height', VIDEO_CCK_DEFAULT_PREVIEW_HEIGHT)" : $widget['preview_height'], '#required' => true, '#description' => t('The height of the preview video. It defaults to @height.', array('@height' => $height)), ); $form['preview']['preview_autoplay'] = array( '#type' => 'checkbox', '#title' => t('Autoplay'), - '#default_value' => $widget['preview_autoplay'] ? $widget['preview_autoplay'] : false, + '#default_value' => empty($widget['preview_autoplay']) ? 'false' : $widget['preview_autoplay'], '#description' => t('If supported by the provider, checking this box will cause the video to automatically begin after the video loads when in its preview size.'), ); @@ -287,14 +287,14 @@ $form['tn']['thumbnail_width'] = array( '#type' => 'textfield', '#title' => t('Thumbnail width'), - '#default_value' => $widget['thumbnail_width'] ? $widget['thumbnail_width'] : variable_get('video_cck_default_thumbnail_width', VIDEO_CCK_DEFAULT_THUMBNAIL_WIDTH), + '#default_value' => empty($widget['thumbnail_width']) ? "variable_get('video_cck_default_thumbnail_width', VIDEO_CCK_DEFAULT_THUMBNAIL_WIDTH)" : $widget['thumbnail_width'], '#required' => true, '#description' => t('The width of the thumbnail. It defaults to @width.', array('@width' => $width)), ); $form['tn']['thumbnail_height'] = array( '#type' => 'textfield', '#title' => t('Thumbnail height'), - '#default_value' => $widget['thumbnail_height'] ? $widget['thumbnail_height'] : variable_get('video_cck_default_thumbnail_height', VIDEO_CCK_DEFAULT_THUMBNAIL_HEIGHT), + '#default_value' => empty($widget['thumbnail_height']) ? "variable_get('video_cck_default_thumbnail_height', VIDEO_CCK_DEFAULT_THUMBNAIL_HEIGHT)" : $widget['thumbnail_height'], '#required' => true, '#description' => t('The height of the thumbnail. It defaults to @height.', array('@height' => $height)), ); @@ -304,7 +304,7 @@ $form['tn']['thumbnail_default_path'] = array( '#type' => 'textfield', '#title' => t('Default thumbnail path'), - '#default_value' => $widget['thumbnail_default_path'] ? $widget['thumbnail_default_path'] : variable_get('video_cck_default_thumbnail_path', ''), + '#default_value' => empty($widget['thumbnail_default_path']) ? "variable_get('video_cck_default_thumbnail_path', '')" : $widget['thumbnail_default_path'], '#description' => t('Path to a local default thumbnail image for cases when a thumbnail can\'t be found. For example, you might have a default thumbnail at %files.', array('%files' => 'files/thumbnail.png')) . $tn_desc, ); } Index: emfield.cck.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/emfield/Attic/emfield.cck.inc,v retrieving revision 1.1.2.1 diff -u -r1.1.2.1 emfield.cck.inc --- emfield.cck.inc 23 Jun 2008 15:09:15 -0000 1.1.2.1 +++ emfield.cck.inc 5 Jul 2008 15:06:35 -0000 @@ -108,7 +108,7 @@ $form['provider_list']['providers'] = array( '#type' => 'checkboxes', '#title' => t('Providers'), - '#default_value' => $widget['providers'] ? $widget['providers'] : array(), + '#default_value' => empty($widget['providers']) ? 'array()' : $widget['providers'], '#options' => $options, ); Index: emfield.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/emfield/emfield.module,v retrieving revision 1.12.4.13 diff -u -r1.12.4.13 emfield.module --- emfield.module 23 Jun 2008 15:09:15 -0000 1.12.4.13 +++ emfield.module 5 Jul 2008 13:35:53 -0000 @@ -43,7 +43,10 @@ * Helper function to implement hook_content_is_empty. */ function emfield_emfield_content_is_empty($item, $field) { - return empty($item['value']); + if (empty($item['value'])){ + return TRUE; + } + return FALSE; } /**