Skip to content

Commit

Permalink
Update CTools to 7.x-1.20
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Hunt committed Jan 20, 2022
1 parent e09cd45 commit 89dd04f
Show file tree
Hide file tree
Showing 20 changed files with 66 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
6 changes: 3 additions & 3 deletions docroot/sites/all/modules/contrib/ctools/ctools.info
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 2 additions & 1 deletion docroot/sites/all/modules/contrib/ctools/includes/fields.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand Down
16 changes: 8 additions & 8 deletions docroot/sites/all/modules/contrib/ctools/includes/math-expr.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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 '('.
Expand All @@ -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...
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class CtoolsPluginsGetInfoTestCase extends DrupalWebTestCase {
'@plugin' => $id,
'@module' => $module,
'@type' => $type,
'@function' => $func,
'@function' => (string) $func,
)));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
* Contains ViewsContentPanesTest.
*/

/**
* Avoid simpletest "Class ViewsSqlTest not found" error.
*/
if (!class_exists('ViewsSqlTest')) {
return;
}

/**
* Tests rendering views content pane displays.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 89dd04f

Please sign in to comment.