head 1.2; access; symbols pkgsrc-2018Q3:1.1.0.2; locks; strict; comment @# @; 1.2 date 2018.11.15.14.26.45; author prlw1; state dead; branches; next 1.1; commitid DyFGpEjNsEoX030B; 1.1 date 2018.10.03.10.58.15; author prlw1; state Exp; branches 1.1.2.1; next ; commitid qSQe4C4rujvKfvUA; 1.1.2.1 date 2018.10.03.10.58.15; author spz; state dead; branches; next 1.1.2.2; commitid X8gd44NNWLdipTXA; 1.1.2.2 date 2018.10.29.19.57.08; author spz; state Exp; branches; next ; commitid X8gd44NNWLdipTXA; desc @@ 1.2 log @Update drupal7 to 7.61 Full compatibility with PHP 7.2 (#2947772) Drupal 7.61, 2018-11-07 ----------------------- - File upload validation functions and hook_file_validate() implementations are now always passed the correct file URI. - The default form cache expiration of 6 hours is now configurable (API addition: https://www.drupal.org/node/2857751). - Allowed callers of drupal_http_request() to optionally specify an explicit Host header. - Allowed the + character to appear in usernames. - PHP 7.2: Fixed Archive_Tar incompatibility. - PHP 7.2: Removed deprecated function each(). - PHP 7.2: Avoid count() calls on uncountable variables. - PHP 7.2: Removed deprecated create_function() call. - PHP 7.2: Make sure variables are arrays in theme_links(). - Fixed theme-settings.php not being loaded on cached forms - Fixed problem with IE11 & Chrome(PointerEvents enabled) & some Firefox scroll to the top of the page after dragging the bottom item with jquery 1.5 <-> 1.11 @ text @$NetBSD: patch-includes_theme.inc,v 1.1 2018/10/03 10:58:15 prlw1 Exp $ Issue #2885610 Avoid count() calls on uncountable variables commit 73e12f0ddf1ed60c13331dc3a9b8ea16d1599307 Issue #2996519 PHP 7.2 compatibility - make sure some variables are arrays in theme_links() commit 083a4eca4a2ebc5276eed2f11fc4a595b07898ba --- includes/theme.inc.orig 2018-10-03 09:32:02.932500773 +0000 +++ includes/theme.inc @@@@ -1776,8 +1776,8 @@@@ function theme_link($variables) { * http://www.w3.org/TR/WCAG-TECHS/H42.html for more information. */ function theme_links($variables) { - $links = $variables['links']; - $attributes = $variables['attributes']; + $links = (array) $variables['links']; + $attributes = (array) $variables['attributes']; $heading = $variables['heading']; global $language_url; $output = ''; @@@@ -1995,7 +1995,7 @@@@ function theme_table($variables) { $empty = $variables['empty']; // Add sticky headers, if applicable. - if (count($header) && $sticky) { + if (!empty($header) && $sticky) { drupal_add_js('misc/tableheader.js'); // Add 'sticky-enabled' class to the table to identify it for JS. // This is needed to target tables constructed by this function. @@@@ -2009,7 +2009,7 @@@@ function theme_table($variables) { } // Format the table columns: - if (count($colgroups)) { + if (!empty($colgroups)) { foreach ($colgroups as $number => $colgroup) { $attributes = array(); @@@@ -2044,38 +2044,40 @@@@ function theme_table($variables) { } // Add the 'empty' row message if available. - if (!count($rows) && $empty) { + if (empty($rows) && $empty) { $header_count = 0; - foreach ($header as $header_cell) { - if (is_array($header_cell)) { - $header_count += isset($header_cell['colspan']) ? $header_cell['colspan'] : 1; - } - else { - $header_count++; + if (!empty($header)) { + foreach ($header as $header_cell) { + if (is_array($header_cell)) { + $header_count += isset($header_cell['colspan']) ? $header_cell['colspan'] : 1; + } + else { + $header_count++; + } } } $rows[] = array(array('data' => $empty, 'colspan' => $header_count, 'class' => array('empty', 'message'))); } // Format the table header: - if (count($header)) { + if (!empty($header)) { $ts = tablesort_init($header); // HTML requires that the thead tag has tr tags in it followed by tbody // tags. Using ternary operator to check and see if we have any rows. - $output .= (count($rows) ? ' ' : ' '); + $output .= (!empty($rows) ? ' ' : ' '); foreach ($header as $cell) { $cell = tablesort_header($cell, $header, $ts); $output .= _theme_table_cell($cell, TRUE); } // Using ternary operator to close the tags based on whether or not there are rows - $output .= (count($rows) ? " \n" : "\n"); + $output .= (!empty($rows) ? " \n" : "\n"); } else { $ts = array(); } // Format the table rows: - if (count($rows)) { + if (!empty($rows)) { $output .= "\n"; $flip = array('even' => 'odd', 'odd' => 'even'); $class = 'even'; @@@@ -2095,7 +2097,7 @@@@ function theme_table($variables) { $attributes = array(); $no_striping = FALSE; } - if (count($cells)) { + if (!empty($cells)) { // Add odd/even class if (!$no_striping) { $class = $flip[$class]; @ 1.1 log @Update drupal7 to 7.59nb2 PHP 7.2: Removed deprecated function each(). PHP 7.2: Avoid count() calls on uncountable variables. PHP 7.2: Removed deprecated create_function() call. PHP 7.2: Make sure variables are arrays in theme_links(). Fixed theme-settings.php not being loaded on cached forms @ text @d1 1 a1 1 $NetBSD$ @ 1.1.2.1 log @file patch-includes_theme.inc was added on branch pkgsrc-2018Q3 on 2018-10-29 19:57:08 +0000 @ text @d1 103 @ 1.1.2.2 log @Pullup ticket #5863 - requested by taca www/drupal7: security update Revisions pulled up: - www/drupal7/Makefile 1.51-1.52 - www/drupal7/PLIST 1.19 - www/drupal7/distinfo 1.39-1.40 - www/drupal7/patches/patch-includes_bootstrap.inc 1.1 - www/drupal7/patches/patch-includes_form.inc 1.1 - www/drupal7/patches/patch-includes_install.inc 1.1 - www/drupal7/patches/patch-includes_menu.inc 1.1 - www/drupal7/patches/patch-includes_module.inc 1.1 - www/drupal7/patches/patch-includes_theme.inc 1.1 - www/drupal7/patches/patch-modules_book_book.module 1.1 - www/drupal7/patches/patch-modules_field_modules_list_list.install 1.1 - www/drupal7/patches/patch-modules_locale_locale.test 1.1 - www/drupal7/patches/patch-modules_simpletest_tests_themes_test__theme_theme-settings.php 1.1 - www/drupal7/patches/patch-modules_system_system.admin.inc 1.1 - www/drupal7/patches/patch-modules_system_system.test 1.1 ------------------------------------------------------------------- Module Name: pkgsrc Committed By: prlw1 Date: Wed Oct 3 10:58:15 UTC 2018 Modified Files: pkgsrc/www/drupal7: Makefile PLIST distinfo Added Files: pkgsrc/www/drupal7/patches: patch-includes_bootstrap.inc patch-includes_form.inc patch-includes_install.inc patch-includes_menu.inc patch-includes_module.inc patch-includes_theme.inc patch-modules_book_book.module patch-modules_field_modules_list_list.install patch-modules_locale_locale.test patch-modules_simpletest_tests_themes_test__theme_theme-settings.php patch-modules_system_system.admin.inc patch-modules_system_system.test Log Message: Update drupal7 to 7.59nb2 PHP 7.2: Removed deprecated function each(). PHP 7.2: Avoid count() calls on uncountable variables. PHP 7.2: Removed deprecated create_function() call. PHP 7.2: Make sure variables are arrays in theme_links(). Fixed theme-settings.php not being loaded on cached forms To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 pkgsrc/www/drupal7/Makefile cvs rdiff -u -r1.18 -r1.19 pkgsrc/www/drupal7/PLIST cvs rdiff -u -r1.38 -r1.39 pkgsrc/www/drupal7/distinfo cvs rdiff -u -r0 -r1.1 \ pkgsrc/www/drupal7/patches/patch-includes_bootstrap.inc \ pkgsrc/www/drupal7/patches/patch-includes_form.inc \ pkgsrc/www/drupal7/patches/patch-includes_install.inc \ pkgsrc/www/drupal7/patches/patch-includes_menu.inc \ pkgsrc/www/drupal7/patches/patch-includes_module.inc \ pkgsrc/www/drupal7/patches/patch-includes_theme.inc \ pkgsrc/www/drupal7/patches/patch-modules_book_book.module \ pkgsrc/www/drupal7/patches/patch-modules_field_modules_list_list.install \ pkgsrc/www/drupal7/patches/patch-modules_locale_locale.test \ pkgsrc/www/drupal7/patches/patch-modules_simpletest_tests_themes_test__theme_theme-settings.php \ pkgsrc/www/drupal7/patches/patch-modules_system_system.admin.inc \ pkgsrc/www/drupal7/patches/patch-modules_system_system.test ------------------------------------------------------------------- Module Name: pkgsrc Committed By: taca Date: Thu Oct 18 14:32:48 UTC 2018 Modified Files: pkgsrc/www/drupal7: Makefile distinfo Log Message: www/drupal7: update to 7.60 Drupal 7.60, 2018-10-18 ------------------------ - Fixed security issues. See SA-CORE-2018-006. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 pkgsrc/www/drupal7/Makefile cvs rdiff -u -r1.39 -r1.40 pkgsrc/www/drupal7/distinfo @ text @a0 103 $NetBSD$ Issue #2885610 Avoid count() calls on uncountable variables commit 73e12f0ddf1ed60c13331dc3a9b8ea16d1599307 Issue #2996519 PHP 7.2 compatibility - make sure some variables are arrays in theme_links() commit 083a4eca4a2ebc5276eed2f11fc4a595b07898ba --- includes/theme.inc.orig 2018-10-03 09:32:02.932500773 +0000 +++ includes/theme.inc @@@@ -1776,8 +1776,8 @@@@ function theme_link($variables) { * http://www.w3.org/TR/WCAG-TECHS/H42.html for more information. */ function theme_links($variables) { - $links = $variables['links']; - $attributes = $variables['attributes']; + $links = (array) $variables['links']; + $attributes = (array) $variables['attributes']; $heading = $variables['heading']; global $language_url; $output = ''; @@@@ -1995,7 +1995,7 @@@@ function theme_table($variables) { $empty = $variables['empty']; // Add sticky headers, if applicable. - if (count($header) && $sticky) { + if (!empty($header) && $sticky) { drupal_add_js('misc/tableheader.js'); // Add 'sticky-enabled' class to the table to identify it for JS. // This is needed to target tables constructed by this function. @@@@ -2009,7 +2009,7 @@@@ function theme_table($variables) { } // Format the table columns: - if (count($colgroups)) { + if (!empty($colgroups)) { foreach ($colgroups as $number => $colgroup) { $attributes = array(); @@@@ -2044,38 +2044,40 @@@@ function theme_table($variables) { } // Add the 'empty' row message if available. - if (!count($rows) && $empty) { + if (empty($rows) && $empty) { $header_count = 0; - foreach ($header as $header_cell) { - if (is_array($header_cell)) { - $header_count += isset($header_cell['colspan']) ? $header_cell['colspan'] : 1; - } - else { - $header_count++; + if (!empty($header)) { + foreach ($header as $header_cell) { + if (is_array($header_cell)) { + $header_count += isset($header_cell['colspan']) ? $header_cell['colspan'] : 1; + } + else { + $header_count++; + } } } $rows[] = array(array('data' => $empty, 'colspan' => $header_count, 'class' => array('empty', 'message'))); } // Format the table header: - if (count($header)) { + if (!empty($header)) { $ts = tablesort_init($header); // HTML requires that the thead tag has tr tags in it followed by tbody // tags. Using ternary operator to check and see if we have any rows. - $output .= (count($rows) ? ' ' : ' '); + $output .= (!empty($rows) ? ' ' : ' '); foreach ($header as $cell) { $cell = tablesort_header($cell, $header, $ts); $output .= _theme_table_cell($cell, TRUE); } // Using ternary operator to close the tags based on whether or not there are rows - $output .= (count($rows) ? " \n" : "\n"); + $output .= (!empty($rows) ? " \n" : "\n"); } else { $ts = array(); } // Format the table rows: - if (count($rows)) { + if (!empty($rows)) { $output .= "\n"; $flip = array('even' => 'odd', 'odd' => 'even'); $class = 'even'; @@@@ -2095,7 +2097,7 @@@@ function theme_table($variables) { $attributes = array(); $no_striping = FALSE; } - if (count($cells)) { + if (!empty($cells)) { // Add odd/even class if (!$no_striping) { $class = $flip[$class]; @