From 69c382edfff91fecca60a88caf4cfaca017ac631 Mon Sep 17 00:00:00 2001 From: Chris Gross <gross.364@osu.edu> Date: Tue, 26 Mar 2019 15:47:49 -0400 Subject: [PATCH] 7.x-1.13 Release Candidate 3 --- profiles/wcm_base/CHANGELOG.txt | 7 + .../fieldable_panels_panes/CHANGELOG.txt | 9 + .../fieldable_panels_panes.info | 6 +- .../fieldable_panels_panes.module | 5 +- .../content_types/fieldable_panels_pane.inc | 5 +- .../tests/fpp_with_panels_test.info | 6 +- .../modules/contrib/file_entity/PATCHES.txt | 2 +- .../modules/contrib/file_entity/README.txt | 27 +++ .../contrib/file_entity/file_entity.admin.inc | 28 ++- .../contrib/file_entity/file_entity.api.php | 16 ++ .../contrib/file_entity/file_entity.field.inc | 115 +++++++-- .../contrib/file_entity/file_entity.file.inc | 157 ++++++++++--- .../file_entity/file_entity.file_api.inc | 16 ++ .../file_entity.file_default_displays.inc | 20 ++ .../contrib/file_entity/file_entity.info | 7 +- .../contrib/file_entity/file_entity.install | 24 +- .../contrib/file_entity/file_entity.module | 137 +++++------ .../contrib/file_entity/file_entity.pages.inc | 87 ++++--- .../file_entity/file_entity.pathauto.inc | 5 + .../contrib/file_entity/file_entity.test | 128 ---------- .../contrib/file_entity/file_entity.theme.inc | 47 +++- .../file_entity/file_entity.tokens.inc | 219 +++++++++++++++++- .../plugins/content_types/file_display.inc | 7 +- .../file_entity/tests/file_entity_test.info | 7 +- .../views_handler_field_file_rendered.inc | 5 +- .../panopoly/panopoly_admin/CHANGELOG.txt | 8 + .../panopoly_admin/panopoly_admin.info | 6 +- .../panopoly/panopoly_core/CHANGELOG.txt | 8 + .../panopoly/panopoly_core/panopoly_core.info | 6 +- .../panopoly/panopoly_core/panopoly_core.make | 4 +- .../panopoly/panopoly_magic/CHANGELOG.txt | 8 + .../panopoly_magic/panopoly_magic.info | 6 +- .../panopoly/panopoly_pages/CHANGELOG.txt | 8 + .../panopoly_pages/panopoly_pages.info | 6 +- .../panopoly/panopoly_search/CHANGELOG.txt | 8 + .../panopoly_search/panopoly_search.info | 6 +- .../panopoly/panopoly_test/CHANGELOG.txt | 8 + .../panopoly/panopoly_test/panopoly_test.info | 6 +- .../panopoly/panopoly_theme/CHANGELOG.txt | 8 + .../panopoly_theme/panopoly_theme.info | 6 +- .../panopoly/panopoly_widgets/CHANGELOG.txt | 8 + .../panopoly_widgets/panopoly_widgets.info | 6 +- profiles/wcm_base/wcm_base.make | 22 +- 43 files changed, 879 insertions(+), 351 deletions(-) create mode 100644 profiles/wcm_base/modules/contrib/file_entity/README.txt diff --git a/profiles/wcm_base/CHANGELOG.txt b/profiles/wcm_base/CHANGELOG.txt index 5f210c5f..3f0ff828 100644 --- a/profiles/wcm_base/CHANGELOG.txt +++ b/profiles/wcm_base/CHANGELOG.txt @@ -1,3 +1,10 @@ +WCM Base 7.x-1.13-rc3, 2019-03-26 +--------------------------------- +- WCM Base: + - Updated Fieldable Panels Panes to 1.13. + - Updated File Entity to 2.25 and patched to allow playsinline video attribute. + - Updated Panopoly to 1.64. + WCM Base 7.x-1.13-rc2, 2019-03-20 --------------------------------- - WCM Base: Updated Drupal core to 7.65 per SA-CORE-2019-004. diff --git a/profiles/wcm_base/modules/contrib/fieldable_panels_panes/CHANGELOG.txt b/profiles/wcm_base/modules/contrib/fieldable_panels_panes/CHANGELOG.txt index 04b49a8f..cf9e101c 100644 --- a/profiles/wcm_base/modules/contrib/fieldable_panels_panes/CHANGELOG.txt +++ b/profiles/wcm_base/modules/contrib/fieldable_panels_panes/CHANGELOG.txt @@ -1,3 +1,12 @@ +Fieldable Panels Panes 7.x-1.13, 2019-03-12 +------------------------------------------- +#3039427 by DamienMcKenna: Failure if an FPP can't be loaded in a Panelizer + page. +#3039174 by junaidpv: FPP cause to redirect to non existing path like + "admin/structure/fieldable-panels-panes/article/fields" when taking "Manage + Fields" paths like "admin/structure/types/manage/article/fields". + + Fieldable Panels Panes 7.x-1.12, 2019-03-04 ------------------------------------------- #2826182 by Arrow: Inversed logic for checking if the title should be used. diff --git a/profiles/wcm_base/modules/contrib/fieldable_panels_panes/fieldable_panels_panes.info b/profiles/wcm_base/modules/contrib/fieldable_panels_panes/fieldable_panels_panes.info index c7d11048..83b149b0 100644 --- a/profiles/wcm_base/modules/contrib/fieldable_panels_panes/fieldable_panels_panes.info +++ b/profiles/wcm_base/modules/contrib/fieldable_panels_panes/fieldable_panels_panes.info @@ -71,8 +71,8 @@ files[] = tests/fpp.services.test test_dependencies[] = revisioning files[] = tests/fpp.with_revisioning.test -; Information added by Drupal.org packaging script on 2019-03-04 -version = "7.x-1.12" +; Information added by Drupal.org packaging script on 2019-03-12 +version = "7.x-1.13" core = "7.x" project = "fieldable_panels_panes" -datestamp = "1551731287" +datestamp = "1552402090" diff --git a/profiles/wcm_base/modules/contrib/fieldable_panels_panes/fieldable_panels_panes.module b/profiles/wcm_base/modules/contrib/fieldable_panels_panes/fieldable_panels_panes.module index af5efbac..4e0e41f1 100644 --- a/profiles/wcm_base/modules/contrib/fieldable_panels_panes/fieldable_panels_panes.module +++ b/profiles/wcm_base/modules/contrib/fieldable_panels_panes/fieldable_panels_panes.module @@ -626,8 +626,9 @@ function fieldable_panels_pane_type_load($type) { // Special handling for two legacy paths: // * admin/structure/fieldable-panels-panes/manage/FPPTYPE/fields // * admin/structure/fieldable-panels-panes/manage/FPPTYPE/display - // Redirect these paths as appropriate. - if ($type == 'manage' && (arg(5) == 'fields' || arg(5) == 'display')) { + // Redirect these paths as appropriate. Need to be extra verbose here to + // avoid breaking other paths. + if ($type == 'manage' && arg(0) == 'admin' && arg(1) == 'structure' && arg(2) == 'fieldable-panels-panes' && (arg(5) == 'fields' || arg(5) == 'display')) { drupal_goto('admin/structure/fieldable-panels-panes/' . arg(4) . '/' . arg(5)); } else { diff --git a/profiles/wcm_base/modules/contrib/fieldable_panels_panes/plugins/content_types/fieldable_panels_pane.inc b/profiles/wcm_base/modules/contrib/fieldable_panels_panes/plugins/content_types/fieldable_panels_pane.inc index fc1c37aa..46169e2e 100644 --- a/profiles/wcm_base/modules/contrib/fieldable_panels_panes/plugins/content_types/fieldable_panels_pane.inc +++ b/profiles/wcm_base/modules/contrib/fieldable_panels_panes/plugins/content_types/fieldable_panels_pane.inc @@ -164,8 +164,11 @@ function fieldable_panels_panes_build_content_type_info($bundle, array $ids) { /** * Callback to render our content type. + * + * Note: don't add the 'array' type hint for $panel_args or $context as they + * might be NULL. */ -function fieldable_panels_panes_fieldable_panels_pane_content_type_render($subtype, $conf, array $panel_args = array(), array $context = array()) { +function fieldable_panels_panes_fieldable_panels_pane_content_type_render($subtype, $conf, $panel_args = array(), $context = array()) { $entity = fieldable_panels_panes_load_from_subtype($subtype); if (!empty($entity) && !empty($entity->fpid) && fieldable_panels_panes_access('view', $entity)) { $view_mode = isset($conf['view_mode']) ? $conf['view_mode'] : 'full'; diff --git a/profiles/wcm_base/modules/contrib/fieldable_panels_panes/tests/fpp_with_panels_test.info b/profiles/wcm_base/modules/contrib/fieldable_panels_panes/tests/fpp_with_panels_test.info index 0a961aea..91948db3 100644 --- a/profiles/wcm_base/modules/contrib/fieldable_panels_panes/tests/fpp_with_panels_test.info +++ b/profiles/wcm_base/modules/contrib/fieldable_panels_panes/tests/fpp_with_panels_test.info @@ -9,8 +9,8 @@ dependencies[] = ctools dependencies[] = page_manager dependencies[] = fieldable_panels_panes -; Information added by Drupal.org packaging script on 2019-03-04 -version = "7.x-1.12" +; Information added by Drupal.org packaging script on 2019-03-12 +version = "7.x-1.13" core = "7.x" project = "fieldable_panels_panes" -datestamp = "1551731287" +datestamp = "1552402090" diff --git a/profiles/wcm_base/modules/contrib/file_entity/PATCHES.txt b/profiles/wcm_base/modules/contrib/file_entity/PATCHES.txt index 76bb5747..1228a403 100644 --- a/profiles/wcm_base/modules/contrib/file_entity/PATCHES.txt +++ b/profiles/wcm_base/modules/contrib/file_entity/PATCHES.txt @@ -1,5 +1,5 @@ The following patches have been applied to this project: - http://drupal.org/files/issues/file_entity-file-size-limit-per-file-type-2530656-3.patch -- http://drupal.org/files/issues/use-file_entity_default_file_directory-1997208-33.patch +- http://drupal.org/files/issues/file_entity-playsinline-attribute-video-files-2835631-4.patch This file was automatically generated by Drush Make (http://drupal.org/project/drush). diff --git a/profiles/wcm_base/modules/contrib/file_entity/README.txt b/profiles/wcm_base/modules/contrib/file_entity/README.txt new file mode 100644 index 00000000..fd481adc --- /dev/null +++ b/profiles/wcm_base/modules/contrib/file_entity/README.txt @@ -0,0 +1,27 @@ + +If you want to translate file entities the Drupal 7 entity_translation module needs to be enabled. + +Step 1) download and enable the file_entity module +Step 2) download and enable the entity_translation module +Step 3) enable the locale module and add your additional languages here: +/admin/config/regional/language , be sure to configure language detection as well, I prefer prefix, configure the prefix for all enabled languages. + +Step 4) +go to the /admin/config/regional/entity_translation +page and check off the file entity type underneith "Translatable entity types" +then save, after you have done this, translation options for each enabled language will show up if you also enable the field translation option in the structure of your file entity type for 'managed fields' , so for instance alt field and the title field would be a good thing to enable translatable field option for. + +Step 5) enable field translation on alt and title fields for file entity image type go to : /admin/structure/file-types/manage/image/fields + +Step 6) Once you do this, you will get translation options for the translatable fields that have translatable field option enabled. +so to if you've correctly configured things you'll be able to add the translation in this page here: /file/1/translate + +More translation usage with views: +Translate one file entity alt and title fields + +and then create a view of unformated fields with the article type +add the image field to the view +save the view + +hover your mouse over the image in the default language (most likely english /en) , the default language hover should show the image title in that language +switch language, hover the mouse over the image and this language (in my case French /fr ) the hover should display the image title in french. diff --git a/profiles/wcm_base/modules/contrib/file_entity/file_entity.admin.inc b/profiles/wcm_base/modules/contrib/file_entity/file_entity.admin.inc index 85e8c2e4..8a781a4f 100644 --- a/profiles/wcm_base/modules/contrib/file_entity/file_entity.admin.inc +++ b/profiles/wcm_base/modules/contrib/file_entity/file_entity.admin.inc @@ -385,6 +385,7 @@ function file_entity_admin_files() { foreach ($files as $file) { $file_type = file_type_load($file->type); $account = isset($accounts[$file->uid]) ? $accounts[$file->uid] : NULL; + $total_count = (int) isset($result[$file->fid]->total_count) ? $result[$file->fid]->total_count : 0; $options[$file->fid] = array( 'title' => array( 'data' => array( @@ -397,7 +398,7 @@ function file_entity_admin_files() { 'size' => format_size($file->filesize), 'author' => theme('username', array('account' => $account)), 'timestamp' => format_date($file->timestamp, 'short'), - 'usage' => format_plural((int) $result[$file->fid]->total_count, '1 place', '@count places'), + 'usage' => format_plural($total_count, '1 place', '@count places'), ); // Show a warning for files that do not exist. @@ -611,6 +612,7 @@ function file_entity_list_types_page() { switch ($type->ctools_type) { // Configuration is in code. case 'Default': + case t('Default'): if (!empty($type->disabled)) { $row[] = l(t('enable'), $admin_path . '/enable'); } @@ -621,6 +623,7 @@ function file_entity_list_types_page() { // Configuration is in DB. case 'Normal': + case t('Normal'): if (!empty($type->disabled)) { $status = l(t('enable'), $admin_path . '/enable'); } @@ -632,6 +635,7 @@ function file_entity_list_types_page() { // Configuration is in code, but overridden in DB. case 'Overridden': + case t('Overridden'): if (!empty($type->disabled)) { $row[] = l(t('enable'), $admin_path . '/enable'); } @@ -1104,7 +1108,7 @@ function file_entity_settings_form($form, &$form_state) { '#type' => 'textfield', '#title' => t('Default allowed file extensions'), '#default_value' => variable_get('file_entity_default_allowed_extensions', 'jpg jpeg gif png txt doc docx xls xlsx pdf ppt pptx pps ppsx odt ods odp mp3 mov mp4 m4a m4v mpeg avi ogg oga ogv weba webp webm'), - '#description' => t('Separate extensions with a space or comma and do not include the leading dot.'), + '#description' => t('Separate extensions with a space and do not include the leading dot.'), '#maxlength' => NULL, ); @@ -1165,6 +1169,26 @@ function file_entity_settings_form($form, &$form_state) { '#default_value' => variable_get('file_entity_file_upload_wizard_skip_fields', FALSE), '#description' => t('The field selection step is only available if the file type the file belongs to has any available fields. If this step is skipped, any fields on the file will be left blank.'), ); + $form['file_replace_options'] = array( + '#type' => 'fieldset', + '#title' => t('File replace optons'), + '#collapsible' => TRUE, + '#collapsed' => FALSE, + '#description' => t('Default settings for how to handle file name changes during replace.'), + ); + $form['file_replace_options']['file_entity_file_replace_options_keep_original_filename'] = array( + '#type' => 'checkbox', + '#title' => t('Keep original file name'), + '#default_value' => variable_get('file_entity_file_replace_options_keep_original_filename', FALSE), + '#description' => t('Rename the newly uploaded file to the name of the original file. This action cannot be undone.'), + ); + + $form['file_entity_protect_repeated_render'] = array( + '#type' => 'checkbox', + '#title' => t('Protect against repeat rendering'), + '#default_value' => variable_get('file_entity_protect_repeated_render', TRUE), + '#description' => t('Avoid rendering the same entity more than 20 times. This can be a sign of an image entity getting caught in a recursive render, but it can also be triggered when the same image is rendered more than 20 times, e.g. in an long content list or data feed.'), + ); return system_settings_form($form); } diff --git a/profiles/wcm_base/modules/contrib/file_entity/file_entity.api.php b/profiles/wcm_base/modules/contrib/file_entity/file_entity.api.php index 01c6e881..882edeb9 100644 --- a/profiles/wcm_base/modules/contrib/file_entity/file_entity.api.php +++ b/profiles/wcm_base/modules/contrib/file_entity/file_entity.api.php @@ -405,3 +405,19 @@ function hook_file_metadata_info() { function hook_file_metadata_info_alter() { } + +/** + * Alters skip fields status. + * + * Use this to choose to skip or complete step 4 of the file upload process. + * + * @param bool &$skip_fields + * Set to TRUE to skip the form for editing extra file entity fields. + * @param array $form_state + * State array of the current upload form. + */ +function hook_file_entity_file_upload_skip_fields_alter(&$skip_fields, $form_state) { + if ($form_state['file']->type == 'video') { + $skip_fields = TRUE; + } +} diff --git a/profiles/wcm_base/modules/contrib/file_entity/file_entity.field.inc b/profiles/wcm_base/modules/contrib/file_entity/file_entity.field.inc index 4f7a11b4..703b1de4 100644 --- a/profiles/wcm_base/modules/contrib/file_entity/file_entity.field.inc +++ b/profiles/wcm_base/modules/contrib/file_entity/file_entity.field.inc @@ -34,6 +34,10 @@ function file_entity_field_formatter_info() { 'field types' => array('file'), 'settings' => array( 'controls' => TRUE, + 'controls_list' => array( + 'download' => 'download', + 'remote_playback' => 'remote_playback', + ), 'autoplay' => FALSE, 'loop' => FALSE, 'preload' => '', @@ -49,7 +53,13 @@ function file_entity_field_formatter_info() { 'field types' => array('file'), 'settings' => array( 'controls' => TRUE, + 'controls_list' => array( + 'fullscreen' => 'fullscreen', + 'download' => 'download', + 'remote_playback' => 'remote_playback', + ), 'autoplay' => FALSE, + 'playsinline' => FALSE, 'loop' => FALSE, 'muted' => FALSE, 'width' => NULL, @@ -123,6 +133,16 @@ function file_entity_field_formatter_settings_form($field, $instance, $view_mode '#type' => 'checkbox', '#default_value' => $settings['controls'], ); + $element['controls_list'] = array( + '#title' => t('Controls list'), + '#type' => 'checkboxes', + '#options' => array( + 'download' => t('Download'), + 'remote_playback' => t('Remote playback'), + ), + '#default_value' => $settings['controls_list'], + '#description' => t("Customize native media controls such as the download and remoteplayback buttons. Valid only if above \"Show audio controls\" setting is enabled.<br>Please note that not all browsers support this feature. Only Chrome 58+ and Opera 45+ supports it."), + ); $element['autoplay'] = array( '#title' => t('Autoplay'), '#type' => 'checkbox', @@ -159,11 +179,27 @@ function file_entity_field_formatter_settings_form($field, $instance, $view_mode '#type' => 'checkbox', '#default_value' => $settings['controls'], ); + $element['controls_list'] = array( + '#title' => t('Controls list'), + '#type' => 'checkboxes', + '#options' => array( + 'fullscreen' => t('Fullscreen'), + 'download' => t('Download'), + 'remote_playback' => t('Remote playback'), + ), + '#default_value' => $settings['controls_list'], + '#description' => t("Customize native media controls such as the download, fullscreen and remoteplayback buttons. Valid only if above \"Show video controls\" setting is enabled.<br>Please note that not all browsers support this feature. Only Chrome 58+ and Opera 45+ supports it."), + ); $element['autoplay'] = array( '#title' => t('Autoplay'), '#type' => 'checkbox', '#default_value' => $settings['autoplay'], ); + $element['playsinline'] = array( + '#title' => t('Plays inline'), + '#type' => 'checkbox', + '#default_value' => $settings['playsinline'], + ); $element['loop'] = array( '#title' => t('Loop'), '#type' => 'checkbox', @@ -231,6 +267,17 @@ function file_entity_field_formatter_settings_summary($field, $instance, $view_m elseif ($display['type'] === 'file_audio') { if (isset($settings['controls'])) { $summary[] = t('Controls: %controls', array('%controls' => $settings['controls'] ? 'visible' : 'hidden')); + if (!empty($settings['controls_list'])) { + $controls_list = array(); + foreach ($settings['controls_list'] as $key => $value) { + if ($value) { + $controls_list[] = ucfirst(str_replace('_', ' ', $key)); + } + } + if (!empty($controls_list)) { + $summary[] = t('Controls list: %controls_list', array('%controls_list' => implode(', ', $controls_list))); + } + } } if (isset($settings['autoplay'])) { $summary[] = t('Autoplay: %autoplay', array('%autoplay' => $settings['autoplay'] ? t('yes') : t('no'))); @@ -248,10 +295,24 @@ function file_entity_field_formatter_settings_summary($field, $instance, $view_m elseif ($display['type'] === 'file_video') { if (isset($settings['controls'])) { $summary[] = t('Controls: %controls', array('%controls' => $settings['controls'] ? 'visible' : 'hidden')); + if (!empty($settings['controls_list'])) { + $controls_list = array(); + foreach ($settings['controls_list'] as $key => $value) { + if ($value) { + $controls_list[] = ucfirst(str_replace('_', ' ', $key)); + } + } + if (!empty($controls_list)) { + $summary[] = t('Controls list: %controls_list', array('%controls_list' => implode(', ', $controls_list))); + } + } } if (isset($settings['autoplay'])) { $summary[] = t('Autoplay: %autoplay', array('%autoplay' => $settings['autoplay'] ? t('yes') : t('no'))); } + if (isset($settings['playsinline'])) { + $summary[] = t('Plays inline: %playsinline', array('%playsinline' => $settings['playsinline'] ? t('yes') : t('no'))); + } if (isset($settings['loop'])) { $summary[] = t('Loop: %loop', array('%loop' => $settings['loop'] ? t('yes') : t('no'))); } @@ -294,29 +355,32 @@ function file_entity_field_formatter_view($entity_type, $entity, $field, $instan switch ($display['type']) { case 'file_rendered': foreach ($items as $delta => $item) { - // Protect ourselves from recursive rendering. - static $recursive_render_depth = array(); if (!empty($item)) { - $recursive_render_id = $entity_type . $field['field_name'] . $item['fid']; - if (isset($recursive_render_depth[$recursive_render_id])) { - $recursive_render_depth[$recursive_render_id]++; - } - else { - $recursive_render_depth[$recursive_render_id] = 1; - } + // The repeat-rendering protection may be disabled if necessary. + if (variable_get('file_entity_protect_repeated_render', TRUE)) { + // Protect ourselves from repeated rendering. + static $repeated_render_depth = array(); + $repeated_render_id = $entity_type . $field['field_name'] . $item['fid']; + if (isset($repeated_render_depth[$repeated_render_id])) { + $repeated_render_depth[$repeated_render_id]++; + } + else { + $repeated_render_depth[$repeated_render_id] = 1; + } - if ($recursive_render_depth[$recursive_render_id] > 20) { - watchdog( - 'file_entity', - 'Recursive rendering detected when rendering entity %entity_type: %entity_id, using the %field_name field. Aborting rendering.', - array( - '%entity_type' => 'file', - '%entity_id' => $item['fid'], - '%field_name' => $field['field_name'], - ), - WATCHDOG_ERROR - ); - return $element; + if ($repeated_render_depth[$repeated_render_id] > 20) { + watchdog( + 'file_entity', + 'Repeated rendering detected when rendering entity %entity_type: %entity_id, using the %field_name field. Aborting rendering.', + array( + '%entity_type' => 'file', + '%entity_id' => $item['fid'], + '%field_name' => $field['field_name'], + ), + WATCHDOG_ERROR + ); + return $element; + } } $file = file_load($item['fid']); @@ -356,6 +420,12 @@ function file_entity_field_formatter_view($entity_type, $entity, $field, $instan $items = array_filter($items); foreach ($items as $delta => $item) { if (!empty($item['fid']) && ($file = file_load($item['fid'])) && file_entity_access('download', $file)) { + if (isset($item['display'])) { + $file->display = $item['display']; + } + if (isset($item['description'])) { + $file->description = $item['description']; + } $element[$delta] = array( '#theme' => 'file_entity_download_link', '#file' => $file, @@ -391,6 +461,7 @@ function file_entity_field_formatter_view($entity_type, $entity, $field, $instan '#theme' => 'file_entity_file_audio', '#files' => $sources, '#controls' => $settings['controls'], + '#controls_list' => $settings['controls_list'], '#autoplay' => $settings['autoplay'], '#loop' => $settings['loop'], '#preload' => $settings['preload'], @@ -424,7 +495,9 @@ function file_entity_field_formatter_view($entity_type, $entity, $field, $instan '#theme' => 'file_entity_file_video', '#files' => $sources, '#controls' => $settings['controls'], + '#controls_list' => $settings['controls_list'], '#autoplay' => $settings['autoplay'], + '#playsinline' => $settings['playsinline'], '#loop' => $settings['loop'], '#muted' => $settings['muted'], '#width' => $settings['width'], diff --git a/profiles/wcm_base/modules/contrib/file_entity/file_entity.file.inc b/profiles/wcm_base/modules/contrib/file_entity/file_entity.file.inc index ef505b4d..4949f4b6 100644 --- a/profiles/wcm_base/modules/contrib/file_entity/file_entity.file.inc +++ b/profiles/wcm_base/modules/contrib/file_entity/file_entity.file.inc @@ -116,14 +116,24 @@ function file_entity_file_update($file) { _file_entity_update_image_field_dimensions($file); } - // Flush image style derivatives whenever an image is updated. - image_path_flush($file->uri); + // Flush image style derivatives whenever an image is replaced. + if (empty($file->file_entity_skip_image_flush) && file_entity_has_file_changed($file)) { + image_path_flush($file->uri); + } } // Clear any related field caches. file_entity_invalidate_field_caches($file); } +/** + * Returns whether the file has changed + */ +function file_entity_has_file_changed($file) { + return empty($file->is_new) || empty($file->original) || $file->filesize != $file->original->filesize || $file->uri != $file->original->uri; +} + + /** * Implements hook_file_delete(). */ @@ -150,16 +160,12 @@ function file_entity_file_delete($file) { * Implements hook_file_mimetype_mapping_alter(). */ function file_entity_file_mimetype_mapping_alter(&$mapping) { - // Add support for mka and mkv. - // @todo Remove when http://drupal.org/node/1443070 is fixed in core. - $new_mappings['mka'] = 'audio/x-matroska'; - $new_mappings['mkv'] = 'video/x-matroska'; + // For info on adding new mime-types to core: http://drupal.org/node/1443070. - // Add support for weba, webm, and webp. - // @todo Remove when http://drupal.org/node/1443070 is fixed in core. - $new_mappings['weba'] = 'audio/webm'; - $new_mappings['webm'] = 'video/webm'; - $new_mappings['webp'] = 'image/webp'; + // @todo. Remove after fixing this in core http://drupal.org/node/2912875. + // Add support for autocad drawings. + $new_mappings['dwg'] = 'application/acad'; + // For info on adding new mime-types to file_entity: drupal.org/node/2900830. foreach ($new_mappings as $extension => $mime_type) { if (!in_array($mime_type, $mapping['mimetypes'])) { @@ -178,48 +184,129 @@ function file_entity_file_mimetype_mapping_alter(&$mapping) { */ function file_entity_file_load($files) { // Add alt and title text to images. + file_entity_set_title_alt_properties($files); + + // Add metadata to each file. + foreach ($files as $file) { + $file->metadata = array(); + } + $results = db_query("SELECT * FROM {file_metadata} WHERE fid IN (:fids)", array(':fids' => array_keys($files))); + + foreach ($results as $result) { + $name = $result->name; + + // image.module required height and width to be properties of the file. + if ($name == 'height' || $name == 'width') { + $files[$result->fid]->$name = unserialize($result->value); + } + + $files[$result->fid]->metadata[$name] = unserialize($result->value); + } +} + +/** + * Implements hook_entitycache_ENTITY_TYPE_load(). + */ +function file_entity_entitycache_file_load($files) { + // Integrates with entitycache - ensures the alt and title text on images is + // localized. + file_entity_set_title_alt_properties($files); +} + +/** + * Implements hook_entity_load(). + */ +function file_entity_entity_load($entities, $entity_type) { + file_entity_set_title_alt_properties_on_file_fields($entities, $entity_type); +} + +/** + * Sets the title / alt properties on file fields attached to entities. + * + * Files attached to a file or image field can be stored in the field cache or + * entity cache for whichever entity that the field is attached to. Because + * $file->alt and $file->title are set in file_entity_file_load() based on the + * current page language, they will go into the cache with that language as + * well. To ensure that the correct language is used when the entity is later + * loaded and displayed in a different language, the alt and title properties + * can be set again using this function. + * + * @param array $entities + * An array of entity objects of the same type. + * @param string $entity_type + * The type of entity. + * + * @see file_entity_entity_load() + * @see file_entity_entitycache_load() + */ +function file_entity_set_title_alt_properties_on_file_fields($entities, $entity_type) { + foreach ($entities as $entity) { + list(, , $bundle) = entity_extract_ids($entity_type, $entity); + foreach (field_info_instances($entity_type, $bundle) as $instance) { + if (!empty($entity->{$instance['field_name']})) { + foreach ($entity->{$instance['field_name']} as &$items) { + foreach ($items as &$item) { + // We need to detect any field items that passed through + // file_field_load(), whether they are files, images, or something + // else. There is no direct way to do that, but checking for a few + // expected file properties on the field item should be sufficient. + if (is_array($item) && !empty($item['fid']) && isset($item['uri']) && isset($item['filename'])) { + $file = (object) $item; + file_entity_set_title_alt_properties(array($file)); + $item = (array) $file; + } + } + } + } + } + } +} + +/** + * Set the title / alt properties of file objects. + * + * @param array $files + * List of file entities. + * @param stdClass $language + * (optional) A language object to use for translating the title and alt + * properties. Defaults to the language of the current request. + */ +function file_entity_set_title_alt_properties($files, $language = NULL) { + if (!isset($language)) { + $language = $GLOBALS['language']; + } + $alt = variable_get('file_entity_alt', '[file:field_file_image_alt_text]'); $title = variable_get('file_entity_title', '[file:field_file_image_title_text]'); $replace_options = array( 'clear' => TRUE, 'sanitize' => FALSE, + 'language' => $language, ); foreach ($files as $file) { - $file->metadata = array(); - // Load alt and title text from fields. if (!empty($alt)) { $output = token_replace($alt, array('file' => $file), $replace_options); - // @todo Remove once https://www.drupal.org/node/1713164 is fixed. - // There is currently no way to get the raw alt text returned from the - // token so we revert the encoding done during tokenization. - $file->alt = decode_entities($output); + if (!empty($output)) { + // @todo Remove once https://www.drupal.org/node/1713164 is fixed. + // There is currently no way to get the raw alt text returned from the + // token so we revert the encoding done during tokenization. + $file->alt = decode_entities($output); + } } if (!empty($title)) { $output = token_replace($title, array('file' => $file), $replace_options); - // @todo Remove once https://www.drupal.org/node/1713164 is fixed. - // There is currently no way to get the raw title text returned from the - // token so we revert the encoding done during tokenization. - $file->title = decode_entities($output); - } - } - - // Load and unserialize metadata. - $results = db_query("SELECT * FROM {file_metadata} WHERE fid IN (:fids)", array(':fids' => array_keys($files))); - - foreach ($results as $result) { - $name = $result->name; - - // image.module required height and width to be properties of the file. - if ($name == 'height' || $name == 'width') { - $files[$result->fid]->$name = unserialize($result->value); + if (!empty($output)) { + // @todo Remove once https://www.drupal.org/node/1713164 is fixed. + // There is currently no way to get the raw title text returned from the + // token so we revert the encoding done during tokenization. + $file->title = decode_entities($output); + } } - - $files[$result->fid]->metadata[$name] = unserialize($result->value); } } diff --git a/profiles/wcm_base/modules/contrib/file_entity/file_entity.file_api.inc b/profiles/wcm_base/modules/contrib/file_entity/file_entity.file_api.inc index 39d643c0..ae9e06da 100644 --- a/profiles/wcm_base/modules/contrib/file_entity/file_entity.file_api.inc +++ b/profiles/wcm_base/modules/contrib/file_entity/file_entity.file_api.inc @@ -241,6 +241,22 @@ function file_view_file($file, $displays = 'full', $langcode = NULL) { drupal_alter('file_displays', $displays, $file, $view_mode); _file_sort_array_by_weight($displays); + // Since $file->alt and $file->title were set in file_entity_file_load() + // (which is a language-agnostic hook) they will not be in the correct + // language if the file is being displayed in a language other than the + // default one. Set them again here, using the correct language. This must + // run after hook_file_displays_alter() since the Media module sets + // $file->alt and $file->title again during that hook. + if ($langcode != $GLOBALS['language_content']->language) { + $languages = language_list(); + if (isset($languages[$langcode])) { + if (!function_exists('file_entity_set_title_alt_properties')) { + module_load_include('file.inc', 'file_entity'); + } + file_entity_set_title_alt_properties(array($file), $languages[$langcode]); + } + } + // Attempt to display the file with each of the possible displays. Stop after // the first successful one. See file_displays() for details. $element = NULL; diff --git a/profiles/wcm_base/modules/contrib/file_entity/file_entity.file_default_displays.inc b/profiles/wcm_base/modules/contrib/file_entity/file_entity.file_default_displays.inc index ccf2376a..b46db8b8 100644 --- a/profiles/wcm_base/modules/contrib/file_entity/file_entity.file_default_displays.inc +++ b/profiles/wcm_base/modules/contrib/file_entity/file_entity.file_default_displays.inc @@ -18,6 +18,10 @@ function file_entity_file_default_displays() { $file_display->status = TRUE; $file_display->settings = array( 'controls' => 1, + 'controls_list' => array( + 'download' => 'download', + 'remote_playback' => 'remote_playback', + ), 'autoplay' => 0, 'loop' => 0, 'multiple_file_behavior' => 'tags', @@ -39,6 +43,10 @@ function file_entity_file_default_displays() { $file_display->status = TRUE; $file_display->settings = array( 'controls' => 1, + 'controls_list' => array( + 'download' => 'download', + 'remote_playback' => 'remote_playback', + ), 'autoplay' => 0, 'loop' => 0, 'multiple_file_behavior' => 'tags', @@ -139,7 +147,13 @@ function file_entity_file_default_displays() { $file_display->status = TRUE; $file_display->settings = array( 'controls' => 1, + 'controls_list' => array( + 'fullscreen' => 'fullscreen', + 'download' => 'download', + 'remote_playback' => 'remote_playback', + ), 'autoplay' => 0, + 'playsinline' => 0, 'loop' => 0, 'width' => '', 'height' => '', @@ -162,7 +176,13 @@ function file_entity_file_default_displays() { $file_display->status = TRUE; $file_display->settings = array( 'controls' => 1, + 'controls_list' => array( + 'fullscreen' => 'fullscreen', + 'download' => 'download', + 'remote_playback' => 'remote_playback', + ), 'autoplay' => 0, + 'playsinline' => 0, 'loop' => 0, 'width' => '', 'height' => '', diff --git a/profiles/wcm_base/modules/contrib/file_entity/file_entity.info b/profiles/wcm_base/modules/contrib/file_entity/file_entity.info index 347861b6..924d0d15 100644 --- a/profiles/wcm_base/modules/contrib/file_entity/file_entity.info +++ b/profiles/wcm_base/modules/contrib/file_entity/file_entity.info @@ -32,9 +32,8 @@ configure = admin/config/media/file-settings ; We have to add a fake version so Git checkouts do not fail Media dependencies version = 7.x-2.x-dev -; Information added by Drupal.org packaging script on 2017-08-10 -version = "7.x-2.4" +; Information added by Drupal.org packaging script on 2018-11-09 +version = "7.x-2.25" core = "7.x" project = "file_entity" -datestamp = "1502334549" - +datestamp = "1541794687" diff --git a/profiles/wcm_base/modules/contrib/file_entity/file_entity.install b/profiles/wcm_base/modules/contrib/file_entity/file_entity.install index 526d043c..5f4d14cd 100644 --- a/profiles/wcm_base/modules/contrib/file_entity/file_entity.install +++ b/profiles/wcm_base/modules/contrib/file_entity/file_entity.install @@ -167,7 +167,6 @@ function file_entity_schema_alter(&$schema) { $schema['file_managed']['indexes']['file_type'] = array('type'); } - /** * Implements hook_install(). */ @@ -246,9 +245,13 @@ function file_entity_uninstall() { variable_del('file_entity_file_upload_wizard_skip_file_type'); variable_del('file_entity_file_upload_wizard_skip_scheme'); variable_del('file_entity_file_upload_wizard_skip_fields'); + variable_del('file_entity_protect_repeated_render'); // Remove any items from the file type queue if still there. DrupalQueue::get('file_entity_type_determine')->deleteQueue(); + + cache_clear_all('entity_info', 'cache', TRUE); + cache_clear_all('schema', 'cache', TRUE); } /** @@ -312,7 +315,11 @@ function file_entity_update_7001() { if (!empty($display)) { db_merge('file_display') ->key(array( - 'name' => implode('__', array($file_type, $view_mode, $formatter_name)), + 'name' => implode('__', array( + $file_type, + $view_mode, + $formatter_name, + )), )) ->fields(array( 'status' => isset($display['status']) ? $display['status'] : 0, @@ -333,7 +340,8 @@ function file_entity_update_7001() { /** * Empty update function to trigger a theme registry rebuild. */ -function file_entity_update_7100() { } +function file_entity_update_7100() { +} /** * Update all files with empty types to use the first part of filemime. @@ -542,7 +550,6 @@ function file_entity_update_7203() { } } - /** * Add title and alt text to image file types. */ @@ -819,7 +826,11 @@ function file_entity_update_7207() { * Add expanded file type permissions to roles with existing file permissions. */ function file_entity_update_7208() { - foreach (array('edit own files', 'edit any files', 'delete own files', 'delete any files', 'download own files', 'download any files') as $old_permission) { + foreach (array( + 'edit own files', 'edit any files', + 'delete own files', 'delete any files', + 'download own files', 'download any files', + ) as $old_permission) { $roles = user_roles(FALSE, $old_permission); foreach ($roles as $rid => $name) { @@ -1001,10 +1012,11 @@ function file_entity_update_7212(&$sandbox) { 'value' => serialize((int) $result->{$key}), ); } - $sandbox['progress'] += count($results); $sandbox['current_fid'] = $result->fid; } + $sandbox['progress'] += count($results); + if (!empty($values)) { $query = db_insert('file_metadata'); $query->fields(array('fid', 'name', 'value')); diff --git a/profiles/wcm_base/modules/contrib/file_entity/file_entity.module b/profiles/wcm_base/modules/contrib/file_entity/file_entity.module index ada703f0..b1fe0f72 100644 --- a/profiles/wcm_base/modules/contrib/file_entity/file_entity.module +++ b/profiles/wcm_base/modules/contrib/file_entity/file_entity.module @@ -894,6 +894,10 @@ function file_entity_theme() { 'variables' => array( 'files' => array(), 'controls' => TRUE, + 'controls_list' => array( + 'download' => 'download', + 'remote_playback' => 'remote_playback', + ), 'autoplay' => FALSE, 'loop' => FALSE, 'preload' => NULL, @@ -904,7 +908,13 @@ function file_entity_theme() { 'variables' => array( 'files' => array(), 'controls' => TRUE, + 'controls_list' => array( + 'fullscreen' => 'fullscreen', + 'download' => 'download', + 'remote_playback' => 'remote_playback', + ), 'autoplay' => FALSE, + 'playsinline' => FALSE, 'loop' => FALSE, 'muted' => FALSE, 'width' => NULL, @@ -1678,12 +1688,15 @@ function file_entity_access($op, $file = NULL, $account = NULL) { // $file may be either an object or a file type. Since file types cannot be // an integer, use either fid or type as the static cache id. $cache_id = NULL; - if (!empty($file->id)) { - $cache_id = $file->id; + if (is_object($file) && !empty($file->fid)) { + $cache_id = $file->fid; } - elseif (is_string($file) && $op == 'create') { + elseif ($op == 'create' && is_string($file)) { $cache_id = $file; } + elseif ($op == 'create' && is_object($file) && !empty($file->type)) { + $cache_id = $file->type; + } else { $cache_id = drupal_hash_base64(serialize($file)); } @@ -1746,6 +1759,12 @@ function file_entity_access($op, $file = NULL, $account = NULL) { * Implements hook_file_entity_access(). */ function file_entity_file_entity_access($op, $file, $account) { + // If the op is "create," all that's needed is to check the create permission. + if ($op == 'create') { + if (user_access('create files')) { + return FILE_ENTITY_ACCESS_ALLOW; + } + } // If the file URI is invalid, deny access. if (is_object($file) && isset($file->uri) && !file_valid_uri($file->uri)) { if(isset($file->is_new) && $file->is_new == true && user_access('create files')) { @@ -1754,12 +1773,6 @@ function file_entity_file_entity_access($op, $file, $account) { return FILE_ENTITY_ACCESS_DENY; } - if ($op == 'create') { - if (user_access('create files')) { - return FILE_ENTITY_ACCESS_ALLOW; - } - } - if (!empty($file)) { $type = is_string($file) ? $file : $file->type; @@ -1806,7 +1819,7 @@ function file_entity_query_file_access_alter(QueryAlterableInterface $query) { * access conditions are added for field values belonging to files only. */ function file_entity_query_entity_field_access_alter(QueryAlterableInterface $query) { - _file_entity_query_file_entity_access_alter($query, 'entity'); + //_file_entity_query_file_entity_access_alter($query, 'entity'); } /** @@ -1832,14 +1845,18 @@ function _file_entity_query_file_entity_access_alter($query, $type) { return; } - $tables = $query->getTables(); - $base_table = $query->getMetaData('base_table'); - // Do not use the base table for general entity queries unless this is - // querying the file_managed table directly. - if ($base_table && $type == 'entity' && $base_table != 'file_managed') { - $base_table = ''; + // A conflict with og_query_og_membership_alter() causes a fatal error + // if both hooks alter the query. + if (module_exists('og') && $query->hasTag('og_membership')) { + foreach($query->getMetaData('entity_field_query')->fields as $field) { + if (og_is_group_audience_field($field['field_name'])) { + return; + } + } } + $tables = $query->getTables(); + $base_table = $query->getMetaData('base_table'); // If no base table is specified explicitly, search for one. if (!$base_table) { $fallback = ''; @@ -1871,10 +1888,6 @@ function _file_entity_query_file_entity_access_alter($query, $type) { $fallback = $table; } } - elseif (isset($schema['fields']['entity_id']) && isset($schema['fields']['entity_type']) && isset($schema['fields']['deleted']) && isset($schema['fields']['delta'])) { - // The table is a field data table, use it as fallback. - $base_table = $table; - } } } } @@ -1885,11 +1898,6 @@ function _file_entity_query_file_entity_access_alter($query, $type) { $base_table = $fallback; } else { - // Ignore this query as it was a general field query and no - // relationships were found to the file_managed table. - if ($type == 'entity') { - return; - } throw new Exception(t('Query tagged for file access but there is no fid. Add foreign keys to file_managed.fid in schema to fix.')); } } @@ -1952,36 +1960,33 @@ function _file_entity_query_file_entity_access_alter($query, $type) { } } - // If there is no subquery conditions, the query is likely for file usage. - // Or user can only access public files. - // If there are subquery conditions then add them to the subquery. - if ($subquery_conditions->count() >= 1) { + if ($subquery_conditions->count()) { $subquery->condition($subquery_conditions); - } - $field = 'fid'; - // Now handle entities. - if ($type == 'entity') { - // Set a common alias for entities. - $base_alias = $falias; - $field = ($falias == 'file_managed' ? 'fid' : 'entity_id'); - } - $subquery->where("$falias.$field = fm_access.fid"); + $field = 'fid'; + // Now handle entities. + if ($type == 'entity') { + // Set a common alias for entities. + $base_alias = $falias; + $field = 'entity_id'; + } + $subquery->where("$falias.$field = fm_access.fid"); - // For an entity query, attach the subquery to entity conditions. - if ($type == 'entity') { - $file_conditions->exists($subquery); - } - // Otherwise attach it to the node query itself. - elseif ($table == 'file_managed') { - // Fix for https://drupal.org/node/2073085 - $db_or = db_or(); - $db_or->exists($subquery); - $db_or->isNull($falias . '.' . $field); - $query->condition($db_or); - } - else { - $query->exists($subquery); + // For an entity query, attach the subquery to entity conditions. + if ($type == 'entity') { + $file_conditions->exists($subquery); + } + // Otherwise attach it to the node query itself. + elseif ($table == 'file_managed') { + // Fix for https://drupal.org/node/2073085 + $db_or = db_or(); + $db_or->exists($subquery); + $db_or->isNull($falias . '.' . $field); + $query->condition($db_or); + } + else { + $query->exists($subquery); + } } } } @@ -1989,19 +1994,14 @@ function _file_entity_query_file_entity_access_alter($query, $type) { if ($type == 'entity' && $file_conditions->count()) { // All the file access conditions are only for field values belonging to // files. - if ($base_alias !== 'file_managed') { - $file_conditions->condition("$base_alias.entity_type", 'file'); - $or = db_or(); - $or->condition($file_conditions); - // If the field value belongs to a non-file entity type then this function - // does not do anything with it. - $or->condition("$base_alias.entity_type", 'file', '<>'); - // Add the compiled set of rules to the query. - $query->condition($or); - } - else { - $query->condition($file_conditions); - } + $file_conditions->condition("$base_alias.entity_type", 'file'); + $or = db_or(); + $or->condition($file_conditions); + // If the field value belongs to a non-file entity type then this function + // does not do anything with it. + $or->condition("$base_alias.entity_type", 'file', '<>'); + // Add the compiled set of rules to the query. + $query->condition($or); } } @@ -2137,7 +2137,9 @@ function file_entity_file_default_types() { 'label' => t('Document'), 'description' => t('A <em>Document</em> file is written information.'), 'mimetypes' => array( + 'text/html', 'text/plain', + 'application/acad', 'application/msword', 'application/vnd.ms-excel', 'application/pdf', @@ -2333,6 +2335,11 @@ function pathauto_file_update_alias(stdClass $file, $op, array $options = array( return; } + // Skip processing if pathauto_entity module is enabled. + if (module_exists('pathauto_entity')) { + return; + } + module_load_include('inc', 'pathauto'); $uri = entity_uri('file', $file); pathauto_create_alias('file', $op, $uri['path'], array('file' => $file), $file->type, $options['language']); diff --git a/profiles/wcm_base/modules/contrib/file_entity/file_entity.pages.inc b/profiles/wcm_base/modules/contrib/file_entity/file_entity.pages.inc index 488b37fd..8158e6e1 100644 --- a/profiles/wcm_base/modules/contrib/file_entity/file_entity.pages.inc +++ b/profiles/wcm_base/modules/contrib/file_entity/file_entity.pages.inc @@ -35,12 +35,10 @@ function file_entity_download_page($file) { if (!is_file($file->uri)) { return MENU_NOT_FOUND; } - // @todo Remove this once drupal_basename is fixed for PHP versions greater - // than '5.3.29'. - $basename_function = version_compare(PHP_VERSION,'5.3.29','>') ? 'basename' : 'drupal_basename'; + // @todo Why basename? Why not drupal_basename which was working up until recently. $headers = array( 'Content-Type' => mime_header_encode($file->filemime), - 'Content-Disposition' => 'attachment; filename="' . mime_header_encode($basename_function($file->uri)) . '"', + 'Content-Disposition' => 'attachment; filename="' . mime_header_encode(basename($file->uri)) . '"', 'Content-Length' => $file->filesize, 'Content-Transfer-Encoding' => 'binary', 'Pragma' => 'no-cache', @@ -90,7 +88,7 @@ function file_entity_add_upload($form, &$form_state, $options = array()) { 'enabledPlugins' => array(), 'schemes' => array(), 'max_filesize' => '', - 'uri_scheme' => 'public', + 'uri_scheme' => file_default_scheme(), 'plugins' => '' ); @@ -321,6 +319,8 @@ function file_entity_add_upload_step_fields($form, &$form_state, array $options * Page callback to show file usage information. */ function file_entity_usage_page($file) { + drupal_set_title(t('<em>Usage of @type</em> @title', array('@type' => $file->type, '@title' => $file->filename)), PASS_THROUGH); + $rows = array(); $occured_entities = array(); @@ -420,9 +420,12 @@ function file_entity_add_upload_submit($form, &$form_state) { // This var is set to TRUE when we are ready to save the file. $save = FALSE; $trigger = $form_state['triggering_element']['#id']; + $triggered_next = $trigger == 'edit-next' || (strpos($trigger, 'edit-next--') === 0); + $triggered_previous = $trigger == 'edit-previous' || (strpos($trigger, 'edit-previous--') === 0); + $step_delta = ($triggered_previous) ? -1 : 1; $steps_to_check = array(2, 3); - if ($trigger == 'edit-previous') { + if ($triggered_previous) { // If the previous button was hit, // the step checking order should be reversed 3, 2. $steps_to_check = array_reverse($steps_to_check); @@ -430,7 +433,7 @@ function file_entity_add_upload_submit($form, &$form_state) { foreach ($steps_to_check as $step) { // Check if we can skip step 2 and 3. - if (($form['#step'] == $step - 1 && $trigger == 'edit-next') || ($form['#step'] == $step + 1 && $trigger == 'edit-previous')) { + if (($form['#step'] == $step - 1 && $triggered_next) || ($form['#step'] == $step + 1 && $triggered_previous)) { $file = file_load($form_state['storage']['upload']); if ($step == 2) { // Check if we can skip step 2. @@ -439,12 +442,12 @@ function file_entity_add_upload_submit($form, &$form_state) { $candidates_keys = array_keys($candidates); // There is only one possible filetype for this file. // Skip the second page. - $form['#step'] += ($trigger == 'edit-previous') ? -1 : 1; + $form['#step'] += $step_delta; $form_state['storage']['type'] = reset($candidates_keys); } elseif (!$candidates || variable_get('file_entity_file_upload_wizard_skip_file_type', FALSE)) { // Do not assign the file a file type. - $form['#step'] += ($trigger == 'edit-previous') ? -1 : 1; + $form['#step'] += $step_delta; $form_state['storage']['type'] = FILE_TYPE_NONE; } } @@ -460,17 +463,17 @@ function file_entity_add_upload_submit($form, &$form_state) { if (!file_entity_file_is_writeable($file)) { // The file is read-only (remote) and must use its provided scheme. - $form['#step'] += ($trigger == 'edit-previous') ? -1 : 1; + $form['#step'] += $step_delta; $form_state['storage']['scheme'] = file_uri_scheme($file->uri); } elseif (count($schemes) == 1) { // There is only one possible stream wrapper for this file. // Skip the third page. - $form['#step'] += ($trigger == 'edit-previous') ? -1 : 1; + $form['#step'] += $step_delta; $form_state['storage']['scheme'] = key($schemes); } elseif (variable_get('file_entity_file_upload_wizard_skip_scheme', FALSE)) { - $form['#step'] += ($trigger == 'edit-previous') ? -1 : 1; + $form['#step'] += $step_delta; // Fallback to the URI scheme specified in the field settings // otherwise use the default file scheme. @@ -486,7 +489,7 @@ function file_entity_add_upload_submit($form, &$form_state) { } // We have the filetype, check if we can skip step 4. - if (($form['#step'] == 3 && $trigger == 'edit-next')) { + if ($form['#step'] == 3 && $triggered_next) { $file = file_load($form_state['storage']['upload']); $form_state['file'] = $file; if (!field_info_instances('file', $form_state['storage']['type'])) { @@ -497,14 +500,16 @@ function file_entity_add_upload_submit($form, &$form_state) { // Save the file with blanks fields. $save = TRUE; } + // Allow other modules to choose to skip or complete step 4. + drupal_alter('file_entity_file_upload_skip_fields', $save, $form_state); } // Form id's can vary depending on how many other forms are displayed, so we // need to do string comparissons. e.g edit-submit--2. - if (strpos($trigger, 'edit-next') !== FALSE) { + if ($triggered_next) { $form_state['step'] = $form['#step'] + 1; } - elseif (strpos($trigger, 'edit-previous') !== FALSE) { + elseif ($triggered_previous) { $form_state['step'] = $form['#step'] - 1; } elseif (strpos($trigger, 'edit-submit') !== FALSE) { @@ -740,6 +745,12 @@ function file_entity_edit($form, &$form_state, $file) { '#upload_validators' => file_entity_get_upload_validators($replacement_options), '#pre_render' => array('file_entity_upload_validators_pre_render'), ); + $form['replace_keep_original_filename'] = array( + '#type' => 'checkbox', + '#title' => t('Keep original filename'), + '#default_value' => variable_get('file_entity_file_replace_options_keep_original_filename', FALSE), + '#description' => t('Rename the newly uploaded file to the name of the original file. This action cannot be undone.'), + ); } $form['preview'] = file_view_file($file, 'preview'); @@ -806,7 +817,7 @@ function file_entity_edit($form, &$form_state, $file) { '#title' => t('Associated with'), '#maxlength' => 60, '#autocomplete_path' => 'user/autocomplete', - '#default_value' => !empty($file->uid) ? user_load($file->uid)->name : '', + '#default_value' => (!empty($file->uid) && $user = user_load($file->uid)) ? $user->name : '', '#weight' => -1, '#description' => t('Leave blank for %anonymous.', array('%anonymous' => variable_get('anonymous', t('Anonymous')))), ); @@ -890,29 +901,37 @@ function file_entity_edit_submit($form, &$form_state) { // Check if a replacement file has been uploaded. if (!empty($form_state['values']['replace_upload'])) { $replacement = $form_state['values']['replace_upload']; - // Move file from temp to permanent home. - if (pathinfo($replacement->uri, PATHINFO_EXTENSION) == pathinfo($file->uri, PATHINFO_EXTENSION)) { - if ($new_file_uri = file_unmanaged_copy($replacement->uri, $file->uri, FILE_EXISTS_REPLACE)) { - // Remove temporary file. - file_delete($replacement); + // Existing image metadata is stored in $file->height and $file->width. + // Loop through the replacement metadata and update existing values. + if (!empty($replacement->metadata)) { + foreach ($replacement->metadata as $metadata_key => $metadata_value) { + if (isset($file->{$metadata_key})) { + $file->{$metadata_key} = $metadata_value; + } } - } else { + } + // Move file from temp to permanent home. + if (!empty($form_state['values']['replace_keep_original_filename']) + && $form_state['values']['replace_keep_original_filename']) { + $destination_uri = rtrim($file->uri, drupal_basename($file->uri)) . drupal_basename($file->uri); + } + else { $destination_uri = rtrim($file->uri, drupal_basename($file->uri)) . drupal_basename($replacement->uri); - $replace_mode = $destination_uri == $file->uri ? FILE_EXISTS_REPLACE : FILE_EXISTS_RENAME; - if ($new_file_uri = file_unmanaged_copy($replacement->uri, $destination_uri, $replace_mode)) { - // @todo Add watchdog() about replaced file here? + } + $replace_mode = $destination_uri == $file->uri ? FILE_EXISTS_REPLACE : FILE_EXISTS_RENAME; + if ($new_file_uri = file_unmanaged_copy($replacement->uri, $destination_uri, $replace_mode)) { + // @todo Add watchdog() about replaced file here? - // Remove temporary file. - file_delete($replacement); + // Remove temporary file. + file_delete($replacement); - // Update if the uri target has changed. - if ($new_file_uri != $file->uri) { - // Store the original file uri to delete if save is successful. - $orphaned_uri = $file->uri; + // Update if the uri target has changed. + if ($new_file_uri != $file->uri) { + // Store the original file uri to delete if save is successful. + $orphaned_uri = $file->uri; - // Update file entity uri. - $file->uri = $new_file_uri; - } + // Update file entity uri. + $file->uri = $new_file_uri; } } } diff --git a/profiles/wcm_base/modules/contrib/file_entity/file_entity.pathauto.inc b/profiles/wcm_base/modules/contrib/file_entity/file_entity.pathauto.inc index 98befe3a..553f28a7 100644 --- a/profiles/wcm_base/modules/contrib/file_entity/file_entity.pathauto.inc +++ b/profiles/wcm_base/modules/contrib/file_entity/file_entity.pathauto.inc @@ -20,6 +20,11 @@ function file_entity_path_alias_types() { * Implements hook_pathauto(). */ function file_entity_pathauto($op) { + // Allow Pathauto Entity settings to override File Entity's pathauto. + if (module_exists('pathauto_entity')) { + return; + } + switch ($op) { case 'settings': $settings = array(); diff --git a/profiles/wcm_base/modules/contrib/file_entity/file_entity.test b/profiles/wcm_base/modules/contrib/file_entity/file_entity.test index 96a45102..085ced57 100644 --- a/profiles/wcm_base/modules/contrib/file_entity/file_entity.test +++ b/profiles/wcm_base/modules/contrib/file_entity/file_entity.test @@ -1671,132 +1671,4 @@ class FileEntityAttributeOverrideTestCase extends FileEntityTestHelper { $this->assertEqual($build['#file']->$attribute, $expected_value, format_string('The %attribute was overridden correctly.', array('%attribute' => $attribute))); } } - - /** - * @param EntityFieldQuery $query - * @param $expected - * An associative array of expected result. Keys are file ids, values are - * booleans to indicate if the result should include the file. - */ - function assertEntityFieldQueryAccess(EntityFieldQuery $query, $expected, $account = NULL, $query_name = 'unnamed') { - if ($account) { - $query->addMetaData('account', $account); - } - $query->addTag('entity_field_access'); - $results = $query->execute(); - $fids = isset($results['file']) ? array_keys($results['file']) : array(); - foreach ($expected as $fid => $in_result) { - if ($in_result) { - $this->assertTrue(in_array($fid, $fids), format_string("For the %name query, the result should contain %fid", array('%name' => $query_name, '%fid' => $fid))); - } - else { - $this->assertFalse(in_array($fid, $fids), format_string("For the %name query, the result should not contain %fid", array('%name' => $query_name, '%fid' => $fid))); - } - } - } - - /** - * Test file entity access for entity field queries. - */ - function testEntityFieldQueryAccess() { - // Attach a text field to the default image file type. - $field = array( - 'field_name' => drupal_strtolower($this->randomName()), - 'type' => 'text', - 'settings' => array( - 'max_length' => 255, - ) - ); - field_create_field($field); - $instance = array( - 'field_name' => $field['field_name'], - 'entity_type' => 'file', - 'bundle' => 'document', - 'widget' => array( - 'type' => 'text_textfield', - ), - 'display' => array( - 'default' => array( - 'type' => 'text_default', - ), - ), - ); - field_create_instance($instance); - // Create test files. - $file_owner = $this->drupalCreateUser(array('view own files', 'view own private files')); - $public_file = $this->createFileEntity(array( - 'status' => 0, - )); - $private_file = $this->createFileEntity(array('scheme' => 'private')); - $owned_public_file = $this->createFileEntity(array( - 'uid' => $file_owner->uid, - 'scheme' => 'public', - )); - $owned_private_file = $this->createFileEntity(array( - 'uid' => $file_owner->uid, - 'scheme' => 'private', - )); - $fids = array( - $public_file->fid, - $private_file->fid, - $owned_public_file->fid, - $owned_private_file->fid, - ); - foreach (file_load_multiple($fids) as $file) { - $file->{$field['field_name']}[LANGUAGE_NONE][0] = array('value' => 'find me'); - file_save($file); - } - - $efq_fids = new EntityFieldQuery(); - $queries['entity type and id conditions'] = $efq_fids - ->entityCondition('entity_type', 'file') - ->entityCondition('entity_id', $fids); - $efq_field_name = new EntityFieldQuery(); - $queries['single field condition'] = $efq_field_name - ->fieldCondition($field['field_name'], 'value', 'find me'); - - foreach($queries as $name => $query) { - $message = format_string(''); - // User should not see private files, only his own public files. - $this->assertEntityFieldQueryAccess(clone $query, array( - $public_file->fid => TRUE, - $private_file->fid => FALSE, - $owned_public_file->fid => TRUE, - $owned_private_file->fid => FALSE, - ), $this->drupalCreateUser(array('create files')), $name); - - // A user with the 'view own files' and 'view own private files' permissions should only see owned files and public files. - $this->drupalLogin($file_owner); - $this->assertEntityFieldQueryAccess(clone $query, array( - $public_file->fid => TRUE, - $private_file->fid => FALSE, - $owned_public_file->fid => TRUE, - $owned_private_file->fid => TRUE, - ), $file_owner, $name); - - // User with the 'view files' permission should only see public files but cannot create files. - $this->assertEntityFieldQueryAccess(clone $query, array( - $public_file->fid => TRUE, - $private_file->fid => FALSE, - $owned_public_file->fid => TRUE, - $owned_private_file->fid => FALSE, - ), $this->drupalCreateUser(array('view files')), $name); - - // User with the 'view files' and 'view private files' permissions should only see all files. - $this->assertEntityFieldQueryAccess(clone $query, array( - $public_file->fid => TRUE, - $private_file->fid => TRUE, - $owned_public_file->fid => TRUE, - $owned_private_file->fid => TRUE, - ), $this->drupalCreateUser(array('view files', 'view private files')), $name); - - // User with the 'bypass file access' permissions should only see all files. - $this->assertEntityFieldQueryAccess(clone $query, array( - $public_file->fid => TRUE, - $private_file->fid => TRUE, - $owned_public_file->fid => TRUE, - $owned_private_file->fid => TRUE, - ), $this->drupalCreateUser(array('bypass file access')), $name); - } - } } diff --git a/profiles/wcm_base/modules/contrib/file_entity/file_entity.theme.inc b/profiles/wcm_base/modules/contrib/file_entity/file_entity.theme.inc index aa78d5d2..17f2a2e0 100644 --- a/profiles/wcm_base/modules/contrib/file_entity/file_entity.theme.inc +++ b/profiles/wcm_base/modules/contrib/file_entity/file_entity.theme.inc @@ -53,7 +53,10 @@ function theme_file_entity_file_link($variables) { $options['attributes']['title'] = check_plain($file->filename); } - return '<span class="file">' . $icon . ' ' . l($link_text, $url, $options) . '</span>'; + $output = '<span class="file">' . $icon . ' ' . l($link_text, $uri['path'], $uri['options']); + $output .= ' ' . '<span class="file-size">(' . format_size($file->filesize) . ')</span>'; + $output .= '</span>'; + return $output; } /** @@ -131,6 +134,23 @@ function theme_file_entity_file_audio($variables) { $audio_attributes = array(); if ($variables['controls']) { $audio_attributes['controls'] = 'controls'; + + if (!empty($variables['controls_list'])) { + $controls_list = array(); + foreach ($variables['controls_list'] as $key => $value) { + if (!$value) { + switch ($key) { + case 'download': + $controls_list[] = 'nodownload'; + break; + case 'remote_playback': + $controls_list[] = 'noremoteplayback'; + break; + } + } + } + $audio_attributes['controlsList'] = implode(' ', $controls_list); + } } if ($variables['autoplay']) { $audio_attributes['autoplay'] = 'autoplay'; @@ -167,6 +187,8 @@ function theme_file_entity_file_audio($variables) { * - muted: Boolean indicating whether or not the sound should be muted. * - width: Width, in pixels, of the video player. * - height: Height, in pixels, of the video player. + * - playsinline: Boolean indicating if video should automatically play on + * mobile (iOS). * * @ingroup themeable */ @@ -177,6 +199,26 @@ function theme_file_entity_file_video($variables) { $video_attributes = array(); if ($variables['controls']) { $video_attributes['controls'] = 'controls'; + + if (!empty($variables['controls_list'])) { + $controls_list = array(); + foreach ($variables['controls_list'] as $key => $value) { + if (!$value) { + switch ($key) { + case 'fullscreen': + $controls_list[] = 'nofullscreen'; + break; + case 'download': + $controls_list[] = 'nodownload'; + break; + case 'remote_playback': + $controls_list[] = 'noremoteplayback'; + break; + } + } + } + $video_attributes['controlsList'] = implode(' ', $controls_list); + } } if ($variables['autoplay']) { $video_attributes['autoplay'] = 'autoplay'; @@ -196,6 +238,9 @@ function theme_file_entity_file_video($variables) { if (!empty($variables['preload'])) { $video_attributes['preload'] = $variables['preload']; } + if ($variables['playsinline']) { + $video_attributes['playsinline'] = 'playsinline'; + } $output .= '<video' . drupal_attributes($video_attributes) . '>'; foreach ($files as $delta => $file) { diff --git a/profiles/wcm_base/modules/contrib/file_entity/file_entity.tokens.inc b/profiles/wcm_base/modules/contrib/file_entity/file_entity.tokens.inc index d3d1a30e..63a8db63 100644 --- a/profiles/wcm_base/modules/contrib/file_entity/file_entity.tokens.inc +++ b/profiles/wcm_base/modules/contrib/file_entity/file_entity.tokens.inc @@ -44,6 +44,86 @@ function file_entity_token_info() { 'type' => 'url', ); + if (module_exists('token')) { + $info['types']['file_field'] = array( + 'name' => t('Media'), + 'description' => t('Tokens related to a file_entity field.'), + 'hidden' => TRUE, + ); + + $default_text = ' ' . t('Defaults to first value.'); + + $info['tokens']['file_field'] = array( + 'field' => array( + 'name' => t('Field token value'), + 'description' => t('Default: The value returned by the token field formatter.') . $default_text, + ), + 'url' => array( + 'name' => t('URL'), + 'description' => t('URL of the file_entity resource.') . $default_text, + 'type' => 'array', + ), + 'filename' => array( + 'name' => t('Filename'), + 'description' => t('Filename the file_entity resource.') . $default_text, + 'type' => 'array', + ), + 'filemime' => array( + 'name' => t('MIME type'), + 'description' => t('MIME type of the file_entity resource.') . $default_text, + 'type' => 'array', + ), + 'type' => array( + 'name' => t('File type'), + 'description' => t('File type of the file_entity resource.') . $default_text, + 'type' => 'array', + ), + 'image' => array( + 'name' => t('Image'), + 'description' => t('URL of a representative image for the file_entity resource, e.g. a video thumbnail.') . $default_text, + 'type' => 'array', + ), + 'height' => array( + 'name' => t('Height'), + 'description' => t('Height of the file_entity resource, for videos or images.') . $default_text, + 'type' => 'array', + ), + 'width' => array( + 'name' => t('Width'), + 'description' => t('Width of the file_entity resource, for videos or images.') . $default_text, + 'type' => 'array', + ), + 'https-url' => array( + 'name' => t('Secure URL'), + 'description' => t('URL of the file_entity resource using HTTPS.') . $default_text, + 'type' => 'array', + ), + 'https-image' => array( + 'name' => t('Secure image'), + 'description' => t('URL of a representative image for the file_entity resource using HTTPS, usually for videos.') . $default_text, + 'type' => 'array', + ), + ); + + $all_fields = field_info_field_map(); + foreach ($all_fields as $field_name => $field) { + if ($field['type'] == 'file') { + $field_info = _token_field_info($field_name); + foreach (array_keys($field['bundles']) as $entity_type) { + if ($entity_type == 'taxonomy_term') { + $entity_type = 'term'; + } + $info['tokens'][$entity_type][$field_name] = array( + 'name' => $field_info['label'], + 'description' => $field_info['description'], + 'type' => 'file_field', + 'module' => 'file_entity', + ); + } + } + } + } + return $info; } @@ -55,11 +135,66 @@ function file_entity_token_info_alter(&$info) { } /** - * Implements hook_tokens(). + * Provide replacement values for placeholder tokens. */ function file_entity_tokens($type, $tokens, array $data = array(), array $options = array()) { $replacements = array(); + // Check that this token call contains the data we need + if ($type == 'entity' && !empty($data['entity_type']) && !empty($data['entity']) && + !empty($data['token_type']) && module_exists('token')) { + + foreach ($tokens as $name => $original) { + + // Split out the token into its parts + $parts = explode(':', $name, 3); + + $field_name = $parts[0]; + $property = (isset($parts[1])) ? $parts[1] : ''; + $array_handler = (isset($parts[2])) ? $parts[2] : ''; + + // Check that the field has content and that we should handle it + if (!empty($data['entity']->$field_name) && _token_module($data['token_type'], $field_name) == 'file_entity') { + + // Get basic information + $entity_type = $data['entity_type']; + if ($entity_type == 'taxonomy_term') { + $entity_type = 'term'; + } + $langcode = isset($options['language']) ? $options['language']->language : NULL; + $entity = clone $data['entity']; + + // If we are looking for the field output, let field module handle it + if (empty($property) || $property == 'field') { + unset($entity->_field_view_prepared); + $field_output = field_view_field($entity_type, $entity, $field_name, 'token', $langcode); + $field_output['#token_options'] = $options; + $field_output['#prerender'][] = 'token_pre_render_field_token'; + $replacements[$original] = drupal_render($field_output); + } + else { + $items = field_get_items($entity_type, $entity, $field_name); + $return = _file_entity_tokens_get_property($items, $property, $array_handler); + + // We may get a single value or an array. + // Handle array with the array function from token module. + if (is_array($return)) { + $search_tokens = token_find_with_prefix($tokens, $field_name); + if ($array_tokens = token_find_with_prefix($search_tokens, $property)) { + $replacements += token_generate('array', $array_tokens, array('array' => $return), $options); + } + } + else { + $replacements[$original] = $return; + } + } + + // Unset clone of entity + unset($entity); + } + } + } + $url_options = array('absolute' => TRUE); if (isset($options['language'])) { $url_options['language'] = $options['language']; @@ -131,3 +266,85 @@ function file_entity_tokens($type, $tokens, array $data = array(), array $option return $replacements; } + +/** + * This helper function gets file properties for token replacement. + * + * @param array $files + * An array of files that are values for the field. + * + * @param string $property + * The property to retrieve from the file info. See file_entity_token_info() for + * a list of properties. + * + * @param string $array_handler + * The optional array modifier, e.g. "count" or "join:,". + * + * @return mixed + * Either a single value, the first of the array, or an array of values. + */ +function _file_entity_tokens_get_property($files, $property, $array_handler = 'first') { + $value = NULL; + // If we only need the first variable + $return_first = ($array_handler == 'first' || empty($array_handler) || $array_handler == 'value:0'); + + // This static variable stores image info + $info = &drupal_static(__FUNCTION__); + + foreach ($files as $file) { + $file['url'] = file_create_url($file['uri']); + $file['https-url'] = str_replace('http://', 'https://', $file['url']); + + // If values are: filename, filemime, type, url, https-url + if (isset($file[$property])) { + $value = $file[$property]; + } + + // If values are: image, height, width, https-image + elseif (!empty($info[$file['fid']])) { + if (isset($info[$file['fid']][$property])) { + $value = $info[$file['fid']][$property]; + } else { + $value = NULL; + } + } + // If values are files types + else { + + // If file type is image + if ($file['type'] == 'image') { + $imageuri = $file['uri']; + } + + // If file type is video + elseif ($file['type'] == 'video') { + list($provider, $filename) = explode('://v/', $file['uri']); + $imageuri = "public://file_entity-$provider/$filename.jpg"; + } + + // Do nothing for other file types + // @todo: Other file types may need handling + else { + $imageuri = FALSE; + } + + if ($info[$file['fid']] = image_get_info($imageuri)) { + $info[$file['fid']]['image'] = file_create_url($imageuri); + $info[$file['fid']]['https-image'] = str_replace('http://', 'https://', $info[$file['fid']]['image']); + } + + if (isset($info[$file['fid']][$property])) { + $value = $info[$file['fid']][$property]; + } else { + $value = NULL; + } + } + + if ($return_first) { + return $value; + } + $values[] = $value; + } + + return $values; +} diff --git a/profiles/wcm_base/modules/contrib/file_entity/plugins/content_types/file_display.inc b/profiles/wcm_base/modules/contrib/file_entity/plugins/content_types/file_display.inc index 922b1e5b..0da8dab5 100644 --- a/profiles/wcm_base/modules/contrib/file_entity/plugins/content_types/file_display.inc +++ b/profiles/wcm_base/modules/contrib/file_entity/plugins/content_types/file_display.inc @@ -114,7 +114,12 @@ function file_entity_file_display_content_type_edit_form($form, &$form_state) { $defaults = !empty($formatter['default settings']) ? $formatter['default settings'] : array(); $settings = !empty($conf['displays'][$name]['settings']) ? $conf['displays'][$name]['settings'] : array(); $settings += $defaults; - $settings_form = $function($form, $form_state, $settings, $name, $file_type, $view_mode); + if (strpos($name, 'file_field_') === 0) { + $settings_form = $function($form, $form_state, $settings, $name, '', ''); + } + else { + $settings_form = $function($form, $form_state, $settings); + } if (!empty($settings_form)) { $form['displays']['settings'][$name] = array( '#type' => 'fieldset', diff --git a/profiles/wcm_base/modules/contrib/file_entity/tests/file_entity_test.info b/profiles/wcm_base/modules/contrib/file_entity/tests/file_entity_test.info index 24d311fe..43a8c413 100644 --- a/profiles/wcm_base/modules/contrib/file_entity/tests/file_entity_test.info +++ b/profiles/wcm_base/modules/contrib/file_entity/tests/file_entity_test.info @@ -5,9 +5,8 @@ core = 7.x dependencies[] = file_entity hidden = TRUE -; Information added by Drupal.org packaging script on 2017-08-10 -version = "7.x-2.4" +; Information added by Drupal.org packaging script on 2018-11-09 +version = "7.x-2.25" core = "7.x" project = "file_entity" -datestamp = "1502334549" - +datestamp = "1541794687" diff --git a/profiles/wcm_base/modules/contrib/file_entity/views/views_handler_field_file_rendered.inc b/profiles/wcm_base/modules/contrib/file_entity/views/views_handler_field_file_rendered.inc index d6773742..b062c61d 100644 --- a/profiles/wcm_base/modules/contrib/file_entity/views/views_handler_field_file_rendered.inc +++ b/profiles/wcm_base/modules/contrib/file_entity/views/views_handler_field_file_rendered.inc @@ -39,7 +39,8 @@ class views_handler_field_file_rendered extends views_handler_field_entity { } function render($values) { - $file = $this->get_value($values); - return file_view_file($file, $this->options['file_view_mode']); + if ($file = $this->get_value($values)) { + return file_view_file($file, $this->options['file_view_mode']); + } } } diff --git a/profiles/wcm_base/modules/panopoly/panopoly_admin/CHANGELOG.txt b/profiles/wcm_base/modules/panopoly/panopoly_admin/CHANGELOG.txt index 8ed31311..1c36dd42 100644 --- a/profiles/wcm_base/modules/panopoly/panopoly_admin/CHANGELOG.txt +++ b/profiles/wcm_base/modules/panopoly/panopoly_admin/CHANGELOG.txt @@ -1,3 +1,11 @@ +7.x-1.64, 2019-03-20 +------------------- +- No changes since last release. + +7.x-1.63, 2019-03-14 +------------------- +- No changes since last release. + 7.x-1.62, 2019-02-21 ------------------- - No changes since last release. diff --git a/profiles/wcm_base/modules/panopoly/panopoly_admin/panopoly_admin.info b/profiles/wcm_base/modules/panopoly/panopoly_admin/panopoly_admin.info index eedc1e0a..4a96165b 100644 --- a/profiles/wcm_base/modules/panopoly/panopoly_admin/panopoly_admin.info +++ b/profiles/wcm_base/modules/panopoly/panopoly_admin/panopoly_admin.info @@ -37,8 +37,8 @@ features[page_manager_pages][] = panopoly_admin_layout_library features[page_manager_pages][] = panopoly_admin_page_library features[page_manager_pages][] = panopoly_admin_pane_library -; Information added by Drupal.org packaging script on 2019-02-21 -version = "7.x-1.62" +; Information added by Drupal.org packaging script on 2019-03-20 +version = "7.x-1.64" core = "7.x" project = "panopoly_admin" -datestamp = "1550770999" +datestamp = "1553118926" diff --git a/profiles/wcm_base/modules/panopoly/panopoly_core/CHANGELOG.txt b/profiles/wcm_base/modules/panopoly/panopoly_core/CHANGELOG.txt index c7803635..1b03468e 100644 --- a/profiles/wcm_base/modules/panopoly/panopoly_core/CHANGELOG.txt +++ b/profiles/wcm_base/modules/panopoly/panopoly_core/CHANGELOG.txt @@ -1,3 +1,11 @@ +7.x-1.64, 2019-03-20 +------------------- +- No changes since last release. + +7.x-1.63, 2019-03-14 +------------------- +- Update to Views 3.21. + 7.x-1.62, 2019-02-21 ------------------- - Update to link-7.x-1.6. diff --git a/profiles/wcm_base/modules/panopoly/panopoly_core/panopoly_core.info b/profiles/wcm_base/modules/panopoly/panopoly_core/panopoly_core.info index 1d4f8880..967b656c 100644 --- a/profiles/wcm_base/modules/panopoly/panopoly_core/panopoly_core.info +++ b/profiles/wcm_base/modules/panopoly/panopoly_core/panopoly_core.info @@ -82,8 +82,8 @@ features_exclude[variable][panelizer_taxonomy_term:panopoly_categories_allowed_t features_exclude[variable][panelizer_defaults_taxonomy_term_panopoly_categories] = panelizer_defaults_taxonomy_term_panopoly_categories features_exclude[variable][pathauto_taxonomy_term_panopoly_categories_pattern] = pathauto_taxonomy_term_panopoly_categories_pattern -; Information added by Drupal.org packaging script on 2019-02-21 -version = "7.x-1.62" +; Information added by Drupal.org packaging script on 2019-03-20 +version = "7.x-1.64" core = "7.x" project = "panopoly_core" -datestamp = "1550771011" +datestamp = "1553118941" diff --git a/profiles/wcm_base/modules/panopoly/panopoly_core/panopoly_core.make b/profiles/wcm_base/modules/panopoly/panopoly_core/panopoly_core.make index 677a7762..4b28c87c 100644 --- a/profiles/wcm_base/modules/panopoly/panopoly_core/panopoly_core.make +++ b/profiles/wcm_base/modules/panopoly/panopoly_core/panopoly_core.make @@ -35,11 +35,11 @@ projects[fape][subdir] = contrib ; Views Magic -projects[views][version] = 3.20 +projects[views][version] = 3.21 projects[views][subdir] = contrib projects[views][patch][2037469] = https://www.drupal.org/files/issues/views-exposed-sorts-2037469-26.patch projects[views][patch][2885660] = https://www.drupal.org/files/issues/2018-06-28/2885660-13.patch -projects[views][patch][2977851] = https://www.drupal.org/files/issues/2018-06-06/2977851-views-php72-count-2.patch +projects[views][patch][2977851] = https://www.drupal.org/files/issues/2019-03-13/2977851-views-php72-count-8.patch projects[views_autocomplete_filters][version] = 1.2 projects[views_autocomplete_filters][subdir] = contrib diff --git a/profiles/wcm_base/modules/panopoly/panopoly_magic/CHANGELOG.txt b/profiles/wcm_base/modules/panopoly/panopoly_magic/CHANGELOG.txt index 12af7822..d8e436b5 100644 --- a/profiles/wcm_base/modules/panopoly/panopoly_magic/CHANGELOG.txt +++ b/profiles/wcm_base/modules/panopoly/panopoly_magic/CHANGELOG.txt @@ -1,3 +1,11 @@ +7.x-1.64, 2019-03-20 +------------------- +- No changes since last release. + +7.x-1.63, 2019-03-14 +------------------- +- No changes since last release. + 7.x-1.62, 2019-02-21 ------------------- - No changes since last release. diff --git a/profiles/wcm_base/modules/panopoly/panopoly_magic/panopoly_magic.info b/profiles/wcm_base/modules/panopoly/panopoly_magic/panopoly_magic.info index cf44179b..cd134f8d 100644 --- a/profiles/wcm_base/modules/panopoly/panopoly_magic/panopoly_magic.info +++ b/profiles/wcm_base/modules/panopoly/panopoly_magic/panopoly_magic.info @@ -15,8 +15,8 @@ stylesheets[all][] = css/panopoly-modal.css features[features_api][] = api:2 files[] = plugins/views/panopoly_magic_plugin_display_panel_pane.inc -; Information added by Drupal.org packaging script on 2019-02-21 -version = "7.x-1.62" +; Information added by Drupal.org packaging script on 2019-03-20 +version = "7.x-1.64" core = "7.x" project = "panopoly_magic" -datestamp = "1550771048" +datestamp = "1553118981" diff --git a/profiles/wcm_base/modules/panopoly/panopoly_pages/CHANGELOG.txt b/profiles/wcm_base/modules/panopoly/panopoly_pages/CHANGELOG.txt index 5cbaf535..63808b99 100644 --- a/profiles/wcm_base/modules/panopoly/panopoly_pages/CHANGELOG.txt +++ b/profiles/wcm_base/modules/panopoly/panopoly_pages/CHANGELOG.txt @@ -1,3 +1,11 @@ +7.x-1.64, 2019-03-20 +------------------- +- No changes since last release. + +7.x-1.63, 2019-03-14 +------------------- +- No changes since last release. + 7.x-1.62, 2019-02-21 ------------------- - No changes since last release. diff --git a/profiles/wcm_base/modules/panopoly/panopoly_pages/panopoly_pages.info b/profiles/wcm_base/modules/panopoly/panopoly_pages/panopoly_pages.info index 30ffe2c0..d50ef72a 100644 --- a/profiles/wcm_base/modules/panopoly/panopoly_pages/panopoly_pages.info +++ b/profiles/wcm_base/modules/panopoly/panopoly_pages/panopoly_pages.info @@ -81,8 +81,8 @@ features_exclude[variable][pathauto_node_panopoly_landing_page_pattern] = pathau features_exclude[variable][pathauto_node_panopoly_page_pattern] = pathauto_node_panopoly_page_pattern features_exclude[variable][pathauto_taxonomy_term_panopoly_categories_pattern] = pathauto_taxonomy_term_panopoly_categories_pattern -; Information added by Drupal.org packaging script on 2019-02-21 -version = "7.x-1.62" +; Information added by Drupal.org packaging script on 2019-03-20 +version = "7.x-1.64" core = "7.x" project = "panopoly_pages" -datestamp = "1550771065" +datestamp = "1553118991" diff --git a/profiles/wcm_base/modules/panopoly/panopoly_search/CHANGELOG.txt b/profiles/wcm_base/modules/panopoly/panopoly_search/CHANGELOG.txt index 61267e75..117d4975 100644 --- a/profiles/wcm_base/modules/panopoly/panopoly_search/CHANGELOG.txt +++ b/profiles/wcm_base/modules/panopoly/panopoly_search/CHANGELOG.txt @@ -1,3 +1,11 @@ +7.x-1.64, 2019-03-20 +------------------- +- No changes since last release. + +7.x-1.63, 2019-03-14 +------------------- +- No changes since last release. + 7.x-1.62, 2019-02-21 ------------------- - No changes since last release. diff --git a/profiles/wcm_base/modules/panopoly/panopoly_search/panopoly_search.info b/profiles/wcm_base/modules/panopoly/panopoly_search/panopoly_search.info index 14bf82b1..2d26874d 100644 --- a/profiles/wcm_base/modules/panopoly/panopoly_search/panopoly_search.info +++ b/profiles/wcm_base/modules/panopoly/panopoly_search/panopoly_search.info @@ -54,8 +54,8 @@ features[variable][] = search_cron_limit features[views_view][] = panopoly_database_search features[views_view][] = panopoly_search -; Information added by Drupal.org packaging script on 2019-02-21 -version = "7.x-1.62" +; Information added by Drupal.org packaging script on 2019-03-20 +version = "7.x-1.64" core = "7.x" project = "panopoly_search" -datestamp = "1550771081" +datestamp = "1553119001" diff --git a/profiles/wcm_base/modules/panopoly/panopoly_test/CHANGELOG.txt b/profiles/wcm_base/modules/panopoly/panopoly_test/CHANGELOG.txt index 8072fdba..7f9a8c19 100644 --- a/profiles/wcm_base/modules/panopoly/panopoly_test/CHANGELOG.txt +++ b/profiles/wcm_base/modules/panopoly/panopoly_test/CHANGELOG.txt @@ -1,3 +1,11 @@ +7.x-1.64, 2019-03-20 +------------------- +- No changes since last release. + +7.x-1.63, 2019-03-14 +------------------- +- No changes since last release. + 7.x-1.62, 2019-02-21 ------------------- - No changes since last release. diff --git a/profiles/wcm_base/modules/panopoly/panopoly_test/panopoly_test.info b/profiles/wcm_base/modules/panopoly/panopoly_test/panopoly_test.info index a4b71f0e..c89a0587 100644 --- a/profiles/wcm_base/modules/panopoly/panopoly_test/panopoly_test.info +++ b/profiles/wcm_base/modules/panopoly/panopoly_test/panopoly_test.info @@ -99,8 +99,8 @@ features_exclude[dependencies][panopoly_pages] = panopoly_pages features_exclude[dependencies][panelizer] = panelizer hidden = 1 -; Information added by Drupal.org packaging script on 2019-02-21 -version = "7.x-1.62" +; Information added by Drupal.org packaging script on 2019-03-20 +version = "7.x-1.64" core = "7.x" project = "panopoly_test" -datestamp = "1550771100" +datestamp = "1553119014" diff --git a/profiles/wcm_base/modules/panopoly/panopoly_theme/CHANGELOG.txt b/profiles/wcm_base/modules/panopoly/panopoly_theme/CHANGELOG.txt index a1e7c78a..fb26c6ca 100644 --- a/profiles/wcm_base/modules/panopoly/panopoly_theme/CHANGELOG.txt +++ b/profiles/wcm_base/modules/panopoly/panopoly_theme/CHANGELOG.txt @@ -1,3 +1,11 @@ +7.x-1.64, 2019-03-20 +------------------- +- No changes since last release. + +7.x-1.63, 2019-03-14 +------------------- +- No changes since last release. + 7.x-1.62, 2019-02-21 ------------------- - No changes since last release. diff --git a/profiles/wcm_base/modules/panopoly/panopoly_theme/panopoly_theme.info b/profiles/wcm_base/modules/panopoly/panopoly_theme/panopoly_theme.info index a2d06014..c3c42b8d 100644 --- a/profiles/wcm_base/modules/panopoly/panopoly_theme/panopoly_theme.info +++ b/profiles/wcm_base/modules/panopoly/panopoly_theme/panopoly_theme.info @@ -11,8 +11,8 @@ stylesheets[all][] = css/panopoly-accordian.css stylesheets[all][] = css/panopoly-layouts.css features[features_api][] = api:2 -; Information added by Drupal.org packaging script on 2019-02-21 -version = "7.x-1.62" +; Information added by Drupal.org packaging script on 2019-03-20 +version = "7.x-1.64" core = "7.x" project = "panopoly_theme" -datestamp = "1550771119" +datestamp = "1553119026" diff --git a/profiles/wcm_base/modules/panopoly/panopoly_widgets/CHANGELOG.txt b/profiles/wcm_base/modules/panopoly/panopoly_widgets/CHANGELOG.txt index a15ce0f3..c5121e55 100644 --- a/profiles/wcm_base/modules/panopoly/panopoly_widgets/CHANGELOG.txt +++ b/profiles/wcm_base/modules/panopoly/panopoly_widgets/CHANGELOG.txt @@ -1,3 +1,11 @@ +7.x-1.64, 2019-03-20 +------------------- +- No changes since last release. + +7.x-1.63, 2019-03-14 +------------------- +- No changes since last release. + 7.x-1.62, 2019-02-21 ------------------- - No changes since last release. diff --git a/profiles/wcm_base/modules/panopoly/panopoly_widgets/panopoly_widgets.info b/profiles/wcm_base/modules/panopoly/panopoly_widgets/panopoly_widgets.info index a681d4fd..f5388d43 100644 --- a/profiles/wcm_base/modules/panopoly/panopoly_widgets/panopoly_widgets.info +++ b/profiles/wcm_base/modules/panopoly/panopoly_widgets/panopoly_widgets.info @@ -125,8 +125,8 @@ features[linkit_profiles][] = content_fields features[views_view][] = panopoly_widgets_general_content features_exclude[dependencies][linkit] = linkit -; Information added by Drupal.org packaging script on 2019-02-21 -version = "7.x-1.62" +; Information added by Drupal.org packaging script on 2019-03-20 +version = "7.x-1.64" core = "7.x" project = "panopoly_widgets" -datestamp = "1550771155" +datestamp = "1553119054" diff --git a/profiles/wcm_base/wcm_base.make b/profiles/wcm_base/wcm_base.make index f5288d96..47230632 100644 --- a/profiles/wcm_base/wcm_base.make +++ b/profiles/wcm_base/wcm_base.make @@ -52,13 +52,13 @@ projects[features_extra][subdir] = contrib projects[field_group][version] = 1.6 projects[field_group][subdir] = contrib -projects[fieldable_panels_panes][version] = 1.12 +projects[fieldable_panels_panes][version] = 1.13 projects[fieldable_panels_panes][subdir] = contrib -projects[file_entity][version] = 2.4 +projects[file_entity][version] = 2.25 projects[file_entity][subdir] = contrib projects[file_entity][patch][2530656] = http://drupal.org/files/issues/file_entity-file-size-limit-per-file-type-2530656-3.patch -projects[file_entity][patch][1997208] = http://drupal.org/files/issues/use-file_entity_default_file_directory-1997208-33.patch +projects[file_entity][patch][2835631] = http://drupal.org/files/issues/file_entity-playsinline-attribute-video-files-2835631-4.patch projects[file_entity_swf][version] = 1.0-rc2 projects[file_entity_swf][subdir] = contrib @@ -503,31 +503,31 @@ libraries[ocio_modernizr][download][branch] = 7.x-1.x ; The Panopoly Foundation -projects[panopoly_core][version] = 1.62 +projects[panopoly_core][version] = 1.64 projects[panopoly_core][subdir] = panopoly -projects[panopoly_theme][version] = 1.62 +projects[panopoly_theme][version] = 1.64 projects[panopoly_theme][subdir] = panopoly -projects[panopoly_magic][version] = 1.62 +projects[panopoly_magic][version] = 1.64 projects[panopoly_magic][subdir] = panopoly -projects[panopoly_widgets][version] = 1.62 +projects[panopoly_widgets][version] = 1.64 projects[panopoly_widgets][subdir] = panopoly -projects[panopoly_admin][version] = 1.62 +projects[panopoly_admin][version] = 1.64 projects[panopoly_admin][subdir] = panopoly ; The Panopoly Toolset -projects[panopoly_pages][version] = 1.62 +projects[panopoly_pages][version] = 1.64 projects[panopoly_pages][subdir] = panopoly -projects[panopoly_search][version] = 1.62 +projects[panopoly_search][version] = 1.64 projects[panopoly_search][subdir] = panopoly ; For running the automated tests. -projects[panopoly_test][version] = 1.62 +projects[panopoly_test][version] = 1.64 projects[panopoly_test][subdir] = panopoly -- GitLab