From 89dd04f56ed7ce7929936d8a332566ad6509c218 Mon Sep 17 00:00:00 2001 From: Jonathan Hunt Date: Thu, 20 Jan 2022 15:22:45 +1300 Subject: [PATCH] Update CTools to 7.x-1.20 --- .../contrib/ctools/bulk_export/bulk_export.info | 6 +++--- .../sites/all/modules/contrib/ctools/ctools.info | 6 +++--- .../ctools_access_ruleset.info | 6 +++--- .../ctools_ajax_sample/ctools_ajax_sample.info | 6 +++--- .../ctools_custom_content.info | 6 +++--- .../ctools_plugin_example.info | 6 +++--- .../modules/contrib/ctools/includes/context.inc | 2 +- .../modules/contrib/ctools/includes/fields.inc | 3 ++- .../contrib/ctools/includes/math-expr.inc | 16 ++++++++-------- .../ctools/page_manager/page_manager.info | 6 +++--- .../content_types/form/entity_form_field.inc | 7 +++++++ .../contrib/ctools/plugins/contexts/entity.inc | 2 +- .../contrib/ctools/stylizer/stylizer.info | 6 +++--- .../contrib/ctools/term_depth/term_depth.info | 6 +++--- .../contrib/ctools/tests/ctools.plugins.test | 2 +- .../ctools_export_test/ctools_export_test.info | 6 +++--- .../contrib/ctools/tests/ctools_plugin_test.info | 6 +++--- .../tests/modules/views_content_test.info | 6 +++--- .../views_content/tests/src/views_content.test | 7 +++++++ .../ctools/views_content/views_content.info | 6 +++--- 20 files changed, 66 insertions(+), 51 deletions(-) diff --git a/docroot/sites/all/modules/contrib/ctools/bulk_export/bulk_export.info b/docroot/sites/all/modules/contrib/ctools/bulk_export/bulk_export.info index db788bed..f33644a5 100644 --- a/docroot/sites/all/modules/contrib/ctools/bulk_export/bulk_export.info +++ b/docroot/sites/all/modules/contrib/ctools/bulk_export/bulk_export.info @@ -4,8 +4,8 @@ core = 7.x dependencies[] = ctools package = Chaos tool suite -; Information added by Drupal.org packaging script on 2021-01-30 -version = "7.x-1.19" +; Information added by Drupal.org packaging script on 2022-01-19 +version = "7.x-1.20" core = "7.x" project = "ctools" -datestamp = "1611988843" +datestamp = "1642577347" diff --git a/docroot/sites/all/modules/contrib/ctools/ctools.info b/docroot/sites/all/modules/contrib/ctools/ctools.info index 3a6169ca..2c2ffe71 100644 --- a/docroot/sites/all/modules/contrib/ctools/ctools.info +++ b/docroot/sites/all/modules/contrib/ctools/ctools.info @@ -19,8 +19,8 @@ files[] = tests/object_cache.test files[] = tests/object_cache_unit.test files[] = tests/page_tokens.test -; Information added by Drupal.org packaging script on 2021-01-30 -version = "7.x-1.19" +; Information added by Drupal.org packaging script on 2022-01-19 +version = "7.x-1.20" core = "7.x" project = "ctools" -datestamp = "1611988843" +datestamp = "1642577347" diff --git a/docroot/sites/all/modules/contrib/ctools/ctools_access_ruleset/ctools_access_ruleset.info b/docroot/sites/all/modules/contrib/ctools/ctools_access_ruleset/ctools_access_ruleset.info index 38065809..0702f99c 100644 --- a/docroot/sites/all/modules/contrib/ctools/ctools_access_ruleset/ctools_access_ruleset.info +++ b/docroot/sites/all/modules/contrib/ctools/ctools_access_ruleset/ctools_access_ruleset.info @@ -4,8 +4,8 @@ core = 7.x package = Chaos tool suite dependencies[] = ctools -; Information added by Drupal.org packaging script on 2021-01-30 -version = "7.x-1.19" +; Information added by Drupal.org packaging script on 2022-01-19 +version = "7.x-1.20" core = "7.x" project = "ctools" -datestamp = "1611988843" +datestamp = "1642577347" diff --git a/docroot/sites/all/modules/contrib/ctools/ctools_ajax_sample/ctools_ajax_sample.info b/docroot/sites/all/modules/contrib/ctools/ctools_ajax_sample/ctools_ajax_sample.info index b230b44a..2b9f8485 100644 --- a/docroot/sites/all/modules/contrib/ctools/ctools_ajax_sample/ctools_ajax_sample.info +++ b/docroot/sites/all/modules/contrib/ctools/ctools_ajax_sample/ctools_ajax_sample.info @@ -4,8 +4,8 @@ package = Chaos tool suite dependencies[] = ctools core = 7.x -; Information added by Drupal.org packaging script on 2021-01-30 -version = "7.x-1.19" +; Information added by Drupal.org packaging script on 2022-01-19 +version = "7.x-1.20" core = "7.x" project = "ctools" -datestamp = "1611988843" +datestamp = "1642577347" diff --git a/docroot/sites/all/modules/contrib/ctools/ctools_custom_content/ctools_custom_content.info b/docroot/sites/all/modules/contrib/ctools/ctools_custom_content/ctools_custom_content.info index c960e774..cbd53ed1 100644 --- a/docroot/sites/all/modules/contrib/ctools/ctools_custom_content/ctools_custom_content.info +++ b/docroot/sites/all/modules/contrib/ctools/ctools_custom_content/ctools_custom_content.info @@ -4,8 +4,8 @@ core = 7.x package = Chaos tool suite dependencies[] = ctools -; Information added by Drupal.org packaging script on 2021-01-30 -version = "7.x-1.19" +; Information added by Drupal.org packaging script on 2022-01-19 +version = "7.x-1.20" core = "7.x" project = "ctools" -datestamp = "1611988843" +datestamp = "1642577347" diff --git a/docroot/sites/all/modules/contrib/ctools/ctools_plugin_example/ctools_plugin_example.info b/docroot/sites/all/modules/contrib/ctools/ctools_plugin_example/ctools_plugin_example.info index 19574e50..94080764 100644 --- a/docroot/sites/all/modules/contrib/ctools/ctools_plugin_example/ctools_plugin_example.info +++ b/docroot/sites/all/modules/contrib/ctools/ctools_plugin_example/ctools_plugin_example.info @@ -7,8 +7,8 @@ dependencies[] = page_manager dependencies[] = advanced_help core = 7.x -; Information added by Drupal.org packaging script on 2021-01-30 -version = "7.x-1.19" +; Information added by Drupal.org packaging script on 2022-01-19 +version = "7.x-1.20" core = "7.x" project = "ctools" -datestamp = "1611988843" +datestamp = "1642577347" diff --git a/docroot/sites/all/modules/contrib/ctools/includes/context.inc b/docroot/sites/all/modules/contrib/ctools/includes/context.inc index e933bec5..6c136698 100644 --- a/docroot/sites/all/modules/contrib/ctools/includes/context.inc +++ b/docroot/sites/all/modules/contrib/ctools/includes/context.inc @@ -1116,7 +1116,7 @@ function ctools_context_next_id($objects, $name) { foreach ($objects as $object) { if (isset($object['name']) && $object['name'] === $name) { if (isset($object['id']) && $object['id'] > $id) { - $id = $object['id']; + $id = (int) $object['id']; } // @todo If obj has no 'id', should we increment local id? $id = $id + 1; } diff --git a/docroot/sites/all/modules/contrib/ctools/includes/fields.inc b/docroot/sites/all/modules/contrib/ctools/includes/fields.inc index 75e964f1..aa10ad91 100644 --- a/docroot/sites/all/modules/contrib/ctools/includes/fields.inc +++ b/docroot/sites/all/modules/contrib/ctools/includes/fields.inc @@ -18,7 +18,8 @@ * An array of key value pairs. These will be used as #default_value for the form elements generated by a call to hook_field_formatter_settings_form() for this field type. * Typically we'll pass an empty array to begin with and then pass this information back to ourselves on form submit so that we can set the values for later edit sessions. */ -function ctools_fields_fake_field_instance($field_name, $view_mode = 'ctools', $formatter, $formatter_settings) { +function ctools_fields_fake_field_instance($field_name, $view_mode, $formatter, $formatter_settings) { + $view_mode = isset($view_mode) ? $view_mode : 'ctools'; $field = field_read_field($field_name); $field_type = field_info_field_types($field['type']); diff --git a/docroot/sites/all/modules/contrib/ctools/includes/math-expr.inc b/docroot/sites/all/modules/contrib/ctools/includes/math-expr.inc index eb90719d..44ba015f 100644 --- a/docroot/sites/all/modules/contrib/ctools/includes/math-expr.inc +++ b/docroot/sites/all/modules/contrib/ctools/includes/math-expr.inc @@ -305,7 +305,7 @@ class ctools_math_expr { // Strip possible semicolons at the end. if (substr($expr, -1, 1) == ';') { - $expr = substr($expr, 0, -1); + $expr = (string) substr($expr, 0, -1); } // Is it a variable assignment? @@ -345,7 +345,7 @@ class ctools_math_expr { // Freeze the state of the non-argument variables. for ($i = 0; $i < count($stack); $i++) { - $token = $stack[$i]; + $token = (string) $stack[$i]; if (preg_match('/^[a-z]\w*$/', $token) and !in_array($token, $args)) { if (array_key_exists($token, $this->vars)) { $stack[$i] = $this->vars[$token]; @@ -432,7 +432,7 @@ class ctools_math_expr { // Find out if we're currently at the beginning of a number/variable/ // function/parenthesis/operand. - $ex = preg_match('/^([a-z]\w*\(?|\d+(?:\.\d*)?|\.\d+|\()/', substr($expr, $index), $match); + $ex = preg_match('/^([a-z]\w*\(?|\d+(?:\.\d*)?|\.\d+|\()/', (string) substr($expr, $index), $match); // Is it a negation instead of a minus? if ($op === '-' and !$expecting_op) { @@ -487,7 +487,7 @@ class ctools_math_expr { } // Did we just close a function? - if (preg_match("/^([a-z]\w*)\($/", $stack->last(2), $matches)) { + if (preg_match("/^([a-z]\w*)\($/", (string) $stack->last(2), $matches)) { // Get the function name. $fnn = $matches[1]; @@ -532,7 +532,7 @@ class ctools_math_expr { } elseif ($ex && !$expecting_op) { // Make sure there was a function. - if (preg_match("/^([a-z]\w*)\($/", $stack->last(3), $matches)) { + if (preg_match("/^([a-z]\w*)\($/", (string) $stack->last(3), $matches)) { // Pop the argument expression stuff and push onto the output: while (($o2 = $stack->pop()) !== '(') { // Oops, never had a '('. @@ -552,7 +552,7 @@ class ctools_math_expr { // Do we now have a function/variable/number? $expecting_op = TRUE; - $val = $match[1]; + $val = (string) $match[1]; if (preg_match("/^([a-z]\w*)\($/", $val, $matches)) { // May be func, or variable w/ implicit multiplication against // parentheses... @@ -584,7 +584,7 @@ class ctools_math_expr { } elseif ($op === '"') { // Fetch a quoted string. - $string = substr($expr, $index); + $string = (string) substr($expr, $index); if (preg_match('/"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"/s', $string, $matches)) { $string = $matches[0]; // Trim the quotes off: @@ -723,7 +723,7 @@ class ctools_math_expr { } // If the token is a function, pop arguments off the stack, hand them to // the function, and push the result back on again. - elseif (preg_match("/^([a-z]\w*)\($/", $token, $matches)) { + elseif (preg_match("/^([a-z]\w*)\($/", (string) $token, $matches)) { $fnn = $matches[1]; // Check for a built-in function. diff --git a/docroot/sites/all/modules/contrib/ctools/page_manager/page_manager.info b/docroot/sites/all/modules/contrib/ctools/page_manager/page_manager.info index 06720486..8b43b7ad 100644 --- a/docroot/sites/all/modules/contrib/ctools/page_manager/page_manager.info +++ b/docroot/sites/all/modules/contrib/ctools/page_manager/page_manager.info @@ -6,8 +6,8 @@ package = Chaos tool suite files[] = tests/head_links.test -; Information added by Drupal.org packaging script on 2021-01-30 -version = "7.x-1.19" +; Information added by Drupal.org packaging script on 2022-01-19 +version = "7.x-1.20" core = "7.x" project = "ctools" -datestamp = "1611988843" +datestamp = "1642577347" diff --git a/docroot/sites/all/modules/contrib/ctools/plugins/content_types/form/entity_form_field.inc b/docroot/sites/all/modules/contrib/ctools/plugins/content_types/form/entity_form_field.inc index f2f1e7bd..c85a1ac3 100644 --- a/docroot/sites/all/modules/contrib/ctools/plugins/content_types/form/entity_form_field.inc +++ b/docroot/sites/all/modules/contrib/ctools/plugins/content_types/form/entity_form_field.inc @@ -162,6 +162,13 @@ function ctools_entity_form_field_content_type_admin_title($subtype, $conf, $con if (!empty($context->restrictions)) { $field = field_info_instance($entity_type, $field_name, $context->restrictions['type'][0]); + + // Check for field groups. + if (empty($field) && module_exists('field_group')) { + $groups = field_group_info_groups($entity_type, $context->restrictions['type'][0], 'form'); + $group = !empty($groups[$field_name]) ? $groups[$field_name] : NULL; + $field = array('label' => isset($group->label) ? $group->label : $subtype); + } } else { $field = array('label' => $subtype); diff --git a/docroot/sites/all/modules/contrib/ctools/plugins/contexts/entity.inc b/docroot/sites/all/modules/contrib/ctools/plugins/contexts/entity.inc index 7a2b0241..d4f13cc7 100644 --- a/docroot/sites/all/modules/contrib/ctools/plugins/contexts/entity.inc +++ b/docroot/sites/all/modules/contrib/ctools/plugins/contexts/entity.inc @@ -55,7 +55,7 @@ function ctools_context_entity_get_children($plugin, $parent) { * It's important to remember that $conf is optional here, because contexts * are not always created from the UI. */ -function ctools_context_create_entity($empty, $data = NULL, $conf = FALSE, $plugin) { +function ctools_context_create_entity($empty, $data = NULL, $conf = FALSE, $plugin = NULL) { $entity_type = $plugin['keyword']; $entity = entity_get_info($entity_type); $context = new ctools_context(array('entity:' . $entity_type, 'entity', $entity_type)); diff --git a/docroot/sites/all/modules/contrib/ctools/stylizer/stylizer.info b/docroot/sites/all/modules/contrib/ctools/stylizer/stylizer.info index 6b7f70f5..cc62aca4 100644 --- a/docroot/sites/all/modules/contrib/ctools/stylizer/stylizer.info +++ b/docroot/sites/all/modules/contrib/ctools/stylizer/stylizer.info @@ -5,8 +5,8 @@ package = Chaos tool suite dependencies[] = ctools dependencies[] = color -; Information added by Drupal.org packaging script on 2021-01-30 -version = "7.x-1.19" +; Information added by Drupal.org packaging script on 2022-01-19 +version = "7.x-1.20" core = "7.x" project = "ctools" -datestamp = "1611988843" +datestamp = "1642577347" diff --git a/docroot/sites/all/modules/contrib/ctools/term_depth/term_depth.info b/docroot/sites/all/modules/contrib/ctools/term_depth/term_depth.info index 5cceeda7..cc3ebfca 100644 --- a/docroot/sites/all/modules/contrib/ctools/term_depth/term_depth.info +++ b/docroot/sites/all/modules/contrib/ctools/term_depth/term_depth.info @@ -4,8 +4,8 @@ core = 7.x dependencies[] = ctools package = Chaos tool suite -; Information added by Drupal.org packaging script on 2021-01-30 -version = "7.x-1.19" +; Information added by Drupal.org packaging script on 2022-01-19 +version = "7.x-1.20" core = "7.x" project = "ctools" -datestamp = "1611988843" +datestamp = "1642577347" diff --git a/docroot/sites/all/modules/contrib/ctools/tests/ctools.plugins.test b/docroot/sites/all/modules/contrib/ctools/tests/ctools.plugins.test index a12d06af..ba086b96 100644 --- a/docroot/sites/all/modules/contrib/ctools/tests/ctools.plugins.test +++ b/docroot/sites/all/modules/contrib/ctools/tests/ctools.plugins.test @@ -67,7 +67,7 @@ class CtoolsPluginsGetInfoTestCase extends DrupalWebTestCase { '@plugin' => $id, '@module' => $module, '@type' => $type, - '@function' => $func, + '@function' => (string) $func, ))); } diff --git a/docroot/sites/all/modules/contrib/ctools/tests/ctools_export_test/ctools_export_test.info b/docroot/sites/all/modules/contrib/ctools/tests/ctools_export_test/ctools_export_test.info index 6bb6063a..6d677e3f 100644 --- a/docroot/sites/all/modules/contrib/ctools/tests/ctools_export_test/ctools_export_test.info +++ b/docroot/sites/all/modules/contrib/ctools/tests/ctools_export_test/ctools_export_test.info @@ -7,8 +7,8 @@ hidden = TRUE files[] = ctools_export.test -; Information added by Drupal.org packaging script on 2021-01-30 -version = "7.x-1.19" +; Information added by Drupal.org packaging script on 2022-01-19 +version = "7.x-1.20" core = "7.x" project = "ctools" -datestamp = "1611988843" +datestamp = "1642577347" diff --git a/docroot/sites/all/modules/contrib/ctools/tests/ctools_plugin_test.info b/docroot/sites/all/modules/contrib/ctools/tests/ctools_plugin_test.info index 5c955bb4..5867924f 100644 --- a/docroot/sites/all/modules/contrib/ctools/tests/ctools_plugin_test.info +++ b/docroot/sites/all/modules/contrib/ctools/tests/ctools_plugin_test.info @@ -5,8 +5,8 @@ core = 7.x dependencies[] = ctools hidden = TRUE -; Information added by Drupal.org packaging script on 2021-01-30 -version = "7.x-1.19" +; Information added by Drupal.org packaging script on 2022-01-19 +version = "7.x-1.20" core = "7.x" project = "ctools" -datestamp = "1611988843" +datestamp = "1642577347" diff --git a/docroot/sites/all/modules/contrib/ctools/views_content/tests/modules/views_content_test.info b/docroot/sites/all/modules/contrib/ctools/views_content/tests/modules/views_content_test.info index 336876a8..c4073cae 100644 --- a/docroot/sites/all/modules/contrib/ctools/views_content/tests/modules/views_content_test.info +++ b/docroot/sites/all/modules/contrib/ctools/views_content/tests/modules/views_content_test.info @@ -4,8 +4,8 @@ package = Views core = 7.x dependencies[] = views_content hidden = TRUE -; Information added by Drupal.org packaging script on 2021-01-30 -version = "7.x-1.19" +; Information added by Drupal.org packaging script on 2022-01-19 +version = "7.x-1.20" core = "7.x" project = "ctools" -datestamp = "1611988843" +datestamp = "1642577347" diff --git a/docroot/sites/all/modules/contrib/ctools/views_content/tests/src/views_content.test b/docroot/sites/all/modules/contrib/ctools/views_content/tests/src/views_content.test index 25fee392..f8da9e2c 100644 --- a/docroot/sites/all/modules/contrib/ctools/views_content/tests/src/views_content.test +++ b/docroot/sites/all/modules/contrib/ctools/views_content/tests/src/views_content.test @@ -5,6 +5,13 @@ * Contains ViewsContentPanesTest. */ +/** + * Avoid simpletest "Class ViewsSqlTest not found" error. + */ +if (!class_exists('ViewsSqlTest')) { + return; +} + /** * Tests rendering views content pane displays. */ diff --git a/docroot/sites/all/modules/contrib/ctools/views_content/views_content.info b/docroot/sites/all/modules/contrib/ctools/views_content/views_content.info index 3ab45e66..0335e026 100644 --- a/docroot/sites/all/modules/contrib/ctools/views_content/views_content.info +++ b/docroot/sites/all/modules/contrib/ctools/views_content/views_content.info @@ -10,8 +10,8 @@ files[] = plugins/views/views_content_plugin_display_panel_pane.inc files[] = plugins/views/views_content_plugin_style_ctools_context.inc files[] = tests/src/views_content.test -; Information added by Drupal.org packaging script on 2021-01-30 -version = "7.x-1.19" +; Information added by Drupal.org packaging script on 2022-01-19 +version = "7.x-1.20" core = "7.x" project = "ctools" -datestamp = "1611988843" +datestamp = "1642577347"