Index: contrib/emvideo/emvideo.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/emfield/contrib/emvideo/Attic/emvideo.install,v
retrieving revision 1.1.2.15
diff -u -r1.1.2.15 emvideo.install
--- contrib/emvideo/emvideo.install 22 Jul 2009 01:37:07 -0000 1.1.2.15
+++ contrib/emvideo/emvideo.install 23 Jul 2009 17:24:41 -0000
@@ -52,7 +52,7 @@
if ($phase == 'install') {
if (drupal_get_installed_schema_version('content') < 6000) {
- drupal_set_message($t("Some updates are still pending. Please return to !update and run the remaining updates.", array('!update' => l($t(), 'update.php', array('query' => 'op=selection')))), 'warning');
+ drupal_set_message($t("Some updates are still pending. Please return to !update and run the remaining updates.", array('!update' => l($t('update.php'), 'update.php', array('query' => 'op=selection')))), 'warning');
$requirements['cck'] = array(
'title' => $t('CCK'),
'description' => $t('Updates for content.module need to be run first.
Please re-run the update script.'),
Index: contrib/emvideo/emvideo.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/emfield/contrib/emvideo/Attic/emvideo.module,v
retrieving revision 1.1.2.16
diff -u -r1.1.2.16 emvideo.module
--- contrib/emvideo/emvideo.module 5 Mar 2009 16:56:36 -0000 1.1.2.16
+++ contrib/emvideo/emvideo.module 23 Jul 2009 17:24:41 -0000
@@ -336,15 +336,18 @@
'#required' => TRUE,
'#description' => t('The height of the thumbnail. It defaults to @height.', array('@height' => $height)),
);
+ // Construct the description, hinting of Embedded Media Thumbnail if it
+ // is not enabled.
+ $default_path = variable_get('emvideo_default_thumbnail_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'));
if (!module_exists('emthumb')) {
- $tn_desc = ' '. t('You may be interested in activating the Embedded Media Thumbnails module as well, which will allow you to specify custom thumbnails on a per-node basis.');
+ $description .= ' '. t('You may be interested in activating the Embedded Media Thumbnails module as well, which will allow you to specify custom thumbnails on a per-node basis.');
}
- $default_path = variable_get('emvideo_default_thumbnail_path', '');
$form['tn']['thumbnail_default_path'] = array(
'#type' => 'textfield',
'#title' => t('Default thumbnail path'),
'#default_value' => empty($widget['thumbnail_default_path']) ? $default_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,
+ '#description' => $description,
);
$form['tn']['thumbnail_link_title'] = array(
'#type' => 'textfield',
Index: contrib/emthumb/emthumb.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/emfield/contrib/emthumb/emthumb.module,v
retrieving revision 1.7.2.24
diff -u -r1.7.2.24 emthumb.module
--- contrib/emthumb/emthumb.module 15 Jul 2009 21:22:25 -0000 1.7.2.24
+++ contrib/emthumb/emthumb.module 23 Jul 2009 17:24:40 -0000
@@ -20,7 +20,7 @@
}
}
else {
- if (!$items[0]['data']['emthumb'] && $items[0]['emthumb']['emthumb']['emthumb']['emthumb']) {
+ if (!isset($items[0]['data']['emthumb']) && isset($items[0]['emthumb']['emthumb']['emthumb']['emthumb'])) {
$items[0]['data']['emthumb'] = $items[0]['emthumb']['emthumb']['emthumb']['emthumb'];
}
unset($items[0]['emthumb']);
@@ -114,7 +114,7 @@
// Attach new files.
$validators = array();
$filename = $source = $fieldname .'_upload';
- if ($file = file_save_upload($filename, $validators, file_create_path($field['widget']['emimport_image_path']), FILE_EXISTS_RENAME)) {
+ if (isset($field['widget']['emimport_image_path']) && $file = file_save_upload($filename, $validators, file_create_path($field['widget']['emimport_image_path']), FILE_EXISTS_RENAME)) {
$file = (array)$file;
if (strpos($file['filemime'], 'image') !== FALSE) {
$file = _emthumb_scale_image($file, $field['widget']['emthumb_max_resolution']);
@@ -138,7 +138,7 @@
// displayed if they are a child of '#type' = form issue
$element[$fieldname .'_upload'] = array(
'#type' => 'file',
- '#description' => $field['widget']['emthumb_description'] ? t('@description', array('@description' => $field['widget']['emthumb_description'])) : t('If you upload a custom thumbnail, then this will be displayed when the @field thumbnail is called for, overriding any automatic thumbnails by custom providers.', array('@field' => $field['widget']['label'])),
+ '#description' => isset($field['widget']['emthumb_description']) ? $field['widget']['emthumb_description'] : t('If you upload a custom thumbnail, then this will be displayed when the @field thumbnail is called for, overriding any automatic thumbnails by custom providers.', array('@field' => $field['widget']['label'])),
'#tree' => FALSE,
'#weight' => 9,
);
@@ -153,11 +153,11 @@
);
// Store the file data object to be carried on.
- $file = $file ? $file : $items[$delta]['data']['emthumb'];
+ $file = isset($file) ? $file : (isset($items[$delta]['data']['emthumb']) ? $items[$delta]['data']['emthumb'] : array());
// If we have no current file, and have been told to store a local thumbnail,
// then fetch it now.
- if (empty($file) && $field['widget']['emthumb_store_local_thumbnail']) { // was variable_get('emthumb_store_local_thumbnail', TRUE)) {
+ if (empty($file) && isset($field['widget']['emthumb_store_local_thumbnail'])) { // was variable_get('emthumb_store_local_thumbnail', TRUE)) {
$item = $items[$delta];
if (empty($item['value'])) {
// @TODO: We need to get the info somehow.
@@ -169,7 +169,7 @@
}
// If we have one, display the current thumbnail and a delete checkbox.
- if ($file['filepath'] && !$file['flags']['delete']) {
+ if (isset($file['filepath']) && !$file['flags']['delete']) {
$element['#title'] = t('Replace');
$element['emthumb'] = array(
'#theme' => 'emthumb_edit_image_row',
@@ -237,7 +237,7 @@
);
}
}
- elseif ($file['filepath'] && $file['flags']['delete']) {
+ elseif (isset($file['filepath']) && $file['flags']['delete']) {
$element['emthumb']['flags']['delete'] = array(
'#type' => 'hidden', // A value type will not persist here, must be hidden.
'#value' => $file['flags']['delete'],
@@ -321,14 +321,18 @@
*/
function emthumb_emfield_widget_extra(&$form, &$form_state, $field, $items, $delta = 0, $module) {
$element = array();
+ // Construct the thumbnail fieldset with the custom label.
+ $emthumb_label = isset($field['widget']['emthumb_label']) ? $field['widget']['emthumb_label'] : (isset($field['widget']['label']) ? t('@field custom thumbnail', array('@field' => $field['widget']['label'])) : t('Custom thumbnail'));
$element['emthumb'] = array(
'#type' => 'fieldset',
- '#title' => $field['widget']['emthumb_label'] ? t('@label', array('@label' => $field['widget']['emthumb_label'])) : t('@field custom thumbnail', array('@field' => $field['widget']['label'])),
- '#weight' => $field['widget']['emthumb_weight'],
+ '#title' => $emthumb_label,
'#collapsible' => TRUE,
'#collapsed' => FALSE,
'#tree' => TRUE,
);
+ if (isset($field['widget']['emthumb_weight'])) {
+ $element['emthumb']['#weight'] = $field['widget']['emthumb_weight'];
+ }
$element['emthumb']['emthumb'] = array(
'#type' => 'emthumb_widget',
'#title' => t('New upload'),
@@ -370,20 +374,20 @@
$form['emthumb']['emthumb_label'] = array(
'#type' => 'textfield',
'#title' => t('Custom thumbnail label'),
- '#default_value' => $widget['emthumb_label'] ? $widget['emthumb_label'] : t('@field custom thumbnail', array('@field' => $widget['label'])),
+ '#default_value' => isset($widget['emthumb_label']) ? $widget['emthumb_label'] : t('@field custom thumbnail', array('@field' => $widget['label'])),
'#description' => t('This label will be displayed when uploading a custom thumbnail.'),
);
$form['emthumb']['emthumb_description'] = array(
'#type' => 'textfield',
'#title' => t('Custom thumbnail description'),
- '#default_value' => $widget['emthumb_description'] ? $widget['emthumb_description'] : t('If you upload a custom thumbnail, then this will be displayed when the @field thumbnail is called for, overriding any automatic thumbnails by custom providers.', array('@field' => $widget['label'])),
+ '#default_value' => isset($widget['emthumb_description']) ? $widget['emthumb_description'] : t('If you upload a custom thumbnail, then this will be displayed when the @field thumbnail is called for, overriding any automatic thumbnails by custom providers.', array('@field' => $widget['label'])),
'#description' => t('This description will be displayed when uploading a custom thumbnail.'),
'#maxlength' => 512,
);
$form['emthumb']['emthumb_max_resolution'] = array(
'#type' => 'textfield',
'#title' => t('Maximum resolution for Images'),
- '#default_value' => $widget['emthumb_max_resolution'] ? $widget['emthumb_max_resolution'] : 0,
+ '#default_value' => isset($widget['emthumb_max_resolution']) ? $widget['emthumb_max_resolution'] : 0,
'#size' => 15,
'#maxlength' => 10,
'#description' =>
@@ -392,20 +396,20 @@
$form['emthumb']['emimport_image_path'] = array(
'#type' => 'textfield',
'#title' => t('Image path'),
- '#default_value' => $widget['emimport_image_path'] ? $widget['emimport_image_path'] : '',
+ '#default_value' => isset($widget['emimport_image_path']) ? $widget['emimport_image_path'] : '',
'#description' => t('Optional subdirectory within the "%dir" directory where images will be stored. Do not include trailing slash.', array('%dir' => variable_get('file_directory_path', 'files'))),
'#after_build' => array('emthumb_form_check_directory'),
);
$form['emthumb']['emthumb_custom_alt'] = array(
'#type' => 'checkbox',
'#title' => t('Enable custom alternate text'),
- '#default_value' => $widget['emthumb_custom_alt'] ? $widget['emthumb_custom_alt'] : 0,
+ '#default_value' => isset($widget['emthumb_custom_alt']) ? $widget['emthumb_custom_alt'] : 0,
'#description' => t('Enable custom alternate text for custom thumbnails. Filename will be used if not checked.'),
);
$form['emthumb']['emthumb_custom_title'] = array(
'#type' => 'checkbox',
'#title' => t('Enable custom title text'),
- '#default_value' => $widget['emthumb_custom_title'] ? $widget['emthumb_custom_title'] : 0,
+ '#default_value' => isset($widget['emthumb_custom_title']) ? $widget['emthumb_custom_title'] : 0,
'#description' => t('Enable custom title text for custom thumbnails. Filename will be used if not checked.'),
);
return $form;
Index: contrib/emvideo/providers/livevideo.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/emfield/contrib/emvideo/providers/Attic/livevideo.inc,v
retrieving revision 1.1.2.10
diff -u -r1.1.2.10 livevideo.inc
--- contrib/emvideo/providers/livevideo.inc 10 May 2009 00:31:21 -0000 1.1.2.10
+++ contrib/emvideo/providers/livevideo.inc 23 Jul 2009 17:24:41 -0000
@@ -47,7 +47,7 @@
$form['livevideo']['api'] = array(
'#type' => 'fieldset',
'#title' => t('Live Video API'),
- '#description' => t('If you wish to be able to display Live Video thumbnails automatically, you will first need to apply for an API Developer Key from the Live Video Developer Profile page. Note that you do not need this key to display Live Video videos themselves.', array('@livevideo' => EMVIDEO_LIVEVIDEO_API_APPLICATION_URL)),
+ '#description' => t('If you wish to be able to display Live Video thumbnails automatically, you will first need to apply for an API Developer Key from the Live Video Developer Profile page. Note that you do not need this key to display Live Video videos themselves.', array('@livevideo' => EMVIDEO_LIVEVIDEO_API_INFO)),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
Index: contrib/emvideo/providers/guba.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/emfield/contrib/emvideo/providers/Attic/guba.inc,v
retrieving revision 1.1.2.7
diff -u -r1.1.2.7 guba.inc
--- contrib/emvideo/providers/guba.inc 10 May 2009 00:31:21 -0000 1.1.2.7
+++ contrib/emvideo/providers/guba.inc 23 Jul 2009 17:24:41 -0000
@@ -17,7 +17,7 @@
'provider' => 'guba',
'name' => t('GUBA'),
'url' => EMVIDEO_GUBA_MAIN_URL,
- 'settings_description' => t('These settings specifically affect videos displayed from GUBA. You can learn more about its API here.', array('@guba' => EMVIDEO_GUBA_MAIN_URL, '@api' => EMVIDEO_GUBA_API_INFO)),
+ 'settings_description' => t('These settings specifically affect videos displayed from GUBA.', array('@guba' => EMVIDEO_GUBA_MAIN_URL)),
'supported_features' => $features,
);
}
@@ -26,7 +26,6 @@
$form['guba']['api'] = array(
'#type' => 'fieldset',
'#title' => t('GUBA API'),
- '#description' => t('If you wish to be able to display GUBA thumbnails automatically, you will first need to apply for an API Developer Key from the GUBA Developer Profile page. Note that you do not need this key to display GUBA videos themselves.', array('@guba' => EMVIDEO_GUBA_API_APPLICATION_URL)),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
Index: contrib/emvideo/providers/veoh.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/emfield/contrib/emvideo/providers/Attic/veoh.inc,v
retrieving revision 1.1.2.7
diff -u -r1.1.2.7 veoh.inc
--- contrib/emvideo/providers/veoh.inc 9 May 2009 19:21:38 -0000 1.1.2.7
+++ contrib/emvideo/providers/veoh.inc 23 Jul 2009 17:24:41 -0000
@@ -30,7 +30,7 @@
$form['veoh']['api'] = array(
'#type' => 'fieldset',
'#title' => t('Veoh API'),
- '#description' => t('If you wish to be able to display Veoh thumbnails automatically, you will first need to apply for an API Developer Key from the Veoh Developer Profile page. Note that you do not need this key to display Veoh videos themselves.', array('@veoh' => EMVIDEO_VEOH_API_APPLICATION_URL)),
+ '#description' => t('If you wish to be able to display Veoh thumbnails automatically, you will first need to apply for an API Developer Key from the Veoh Developer Profile page. Note that you do not need this key to display Veoh videos themselves.', array('@veoh' => EMVIDEO_VEOH_API_INFO)),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
Index: contrib/emimage/emimage.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/emfield/contrib/emimage/Attic/emimage.module,v
retrieving revision 1.1.2.11
diff -u -r1.1.2.11 emimage.module
--- contrib/emimage/emimage.module 29 May 2009 01:59:57 -0000 1.1.2.11
+++ contrib/emimage/emimage.module 23 Jul 2009 17:24:40 -0000
@@ -204,7 +204,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' => is_null($widget['preview_link']) ? $preview_link : $widget['preview_link_link'],
+ '#default_value' => isset($widget['preview_link']) ? $widget['preview_link'] : $preview_link,
);
$width = variable_get('emimage_default_thumbnail_width', EMIMAGE_DEFAULT_THUMBNAIL_WIDTH);
$height = variable_get('emimage_default_thumbnail_height', EMIMAGE_DEFAULT_THUMBNAIL_HEIGHT);
Index: emfield.cck.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/emfield/Attic/emfield.cck.inc,v
retrieving revision 1.1.2.19
diff -u -r1.1.2.19 emfield.cck.inc
--- emfield.cck.inc 17 Jul 2009 13:31:39 -0000 1.1.2.19
+++ emfield.cck.inc 23 Jul 2009 17:24:40 -0000
@@ -161,7 +161,8 @@
// Grab the provider's URL.
$urls[] = l($info['name'], $info['url'], array('target' => '_blank'));
// Allow the module to add any additional elements to the form, based on individual provider needs.
- $additional_element = emfield_include_invoke($module, $provider->name, 'form', $field, $items[$delta]);
+ $item = isset($items[$delta]) ? $items[$delta] : NULL;
+ $additional_element = emfield_include_invoke($module, $provider->name, 'form', $field, $item);
if ($additional_element) {
$additional_form_elements[$provider->name] = $additional_element;
}
Index: contrib/emaudio/emaudio.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/emfield/contrib/emaudio/emaudio.module,v
retrieving revision 1.1.4.20
diff -u -r1.1.4.20 emaudio.module
--- contrib/emaudio/emaudio.module 16 Dec 2008 16:27:58 -0000 1.1.4.20
+++ contrib/emaudio/emaudio.module 23 Jul 2009 17:24:40 -0000
@@ -237,15 +237,18 @@
'#required' => TRUE,
'#description' => t('The height of the thumbnail. It defaults to @height.', array('@height' => $height)),
);
+ // Construct the description of the default path, hinting about the
+ // Embedded Media Thumbnail module if it's not enabled.
+ $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'));
if (!module_exists('emthumb')) {
- $tn_desc = ' '. t('You may be interested in activating the Embedded Media Thumbnails module as well, which will allow you to specify custom thumbnails on a per-node basis.');
+ $description = ' '. t('You may be interested in activating the Embedded Media Thumbnails module as well, which will allow you to specify custom thumbnails on a per-node basis.');
}
- $default_path = variable_get('emaudio_default_thumbnail_path', EMAUDIO_DEFAULT_THUMBNAIL_PATH);
+ $default_path = variable_get('emaudio_default_thumbnail_path', EMAUDIO_DEFAULT_THUMBNAIL_PATH);
$form['tn']['thumbnail_default_path'] = array(
'#type' => 'textfield',
'#title' => t('Default thumbnail path'),
'#default_value' => empty($widget['thumbnail_default_path']) ? $default_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,
+ '#description' => $description,
);
}