From 39596ffc23905a921f0ee00a2ce9316117e48cef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paulo=20Rog=C3=A9rio=20Teruel=20Valle?= Date: Thu, 27 Aug 2020 00:00:31 -0700 Subject: [PATCH 1/4] EZP-30416: INI settings don't support loose typing (#1429) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Bug fix: INI settings don't support loose typing * Fix not set setting definition * Update settings/contentstructuremenu.ini Co-authored-by: André R <289757+andrerom@users.noreply.github.com> --- settings/contentstructuremenu.ini | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/settings/contentstructuremenu.ini b/settings/contentstructuremenu.ini index d763b79d23e..98d0d492126 100644 --- a/settings/contentstructuremenu.ini +++ b/settings/contentstructuremenu.ini @@ -36,9 +36,8 @@ MaxNodes=150 # SortBy[] # SortBy[]=name/ascending # SortBy[]=published/descending -# if set to "false" - default sorting will be implemented -# (which is defined for each node) -SortBy=false +# if an empty array, it uses the sorting defined for each node instead (from the Ordering tab) +SortBy[] # enabled/disabled ToolTips=enabled From b7c2a06f8f8f2081d767fb66cee5811d800ccba3 Mon Sep 17 00:00:00 2001 From: Gunnstein Lye Date: Mon, 5 Oct 2020 14:11:56 +0000 Subject: [PATCH 2/4] EZP-31643 Object injection in discountruleedit (#139) --- kernel/shop/discountruleedit.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kernel/shop/discountruleedit.php b/kernel/shop/discountruleedit.php index b64f252d503..e0ab3145f23 100644 --- a/kernel/shop/discountruleedit.php +++ b/kernel/shop/discountruleedit.php @@ -46,9 +46,9 @@ 'discountrule_id' => $discountRuleID ), 'persistent_data' => array( 'discountrule_name' => $http->postVariable( 'discountrule_name' ), 'discountrule_percent' => $http->postVariable( 'discountrule_percent' ), - 'Contentclasses' => ( $http->hasPostVariable( 'Contentclasses' ) )? serialize( $http->postVariable( 'Contentclasses' ) ): '', - 'Sections' => ( $http->hasPostVariable( 'Sections' ) )? serialize( $http->postVariable( 'Sections' ) ): '', - 'Products' => ( $http->hasPostVariable( 'Products' ) )? serialize( $http->postVariable( 'Products' ) ): '' ), + 'Contentclasses' => ( $http->hasPostVariable( 'Contentclasses' ) )? json_encode( $http->postVariable( 'Contentclasses' ) ): '', + 'Sections' => ( $http->hasPostVariable( 'Sections' ) )? json_encode( $http->postVariable( 'Sections' ) ): '', + 'Products' => ( $http->hasPostVariable( 'Products' ) )? json_encode( $http->postVariable( 'Products' ) ): '' ), 'from_page' => "/shop/discountruleedit/$discountGroupID/$discountRuleID" ), $module ); return; @@ -68,7 +68,7 @@ $discountRuleSelectedClasses = $http->postVariable( 'Contentclasses' ); if ( !is_array( $discountRuleSelectedClasses ) ) { - $discountRuleSelectedClasses = unserialize( $discountRuleSelectedClasses ); + $discountRuleSelectedClasses = json_decode( $discountRuleSelectedClasses ); } } @@ -78,7 +78,7 @@ $discountRuleSelectedSections = $http->postVariable( 'Sections' ); if ( !is_array( $discountRuleSelectedSections ) ) { - $discountRuleSelectedSections = unserialize( $discountRuleSelectedSections ); + $discountRuleSelectedSections = json_decode( $discountRuleSelectedSections ); } } @@ -88,7 +88,7 @@ $discountRuleSelectedProducts = $http->postVariable( 'Products' ); if ( !is_array( $discountRuleSelectedProducts ) ) { - $discountRuleSelectedProducts = unserialize( $discountRuleSelectedProducts ); + $discountRuleSelectedProducts = json_decode( $discountRuleSelectedProducts ); } } From f21bbc5ec96aec0384058c81e9eb1b5c71b499e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hrvoje=20Kne=C5=BEevi=C4=87?= Date: Mon, 12 Oct 2020 15:53:12 +0200 Subject: [PATCH 3/4] Fix handling of headings in table header cells (#1457) --- extension/ezoe/ezxmltext/handlers/input/ezoeinputparser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/ezoe/ezxmltext/handlers/input/ezoeinputparser.php b/extension/ezoe/ezxmltext/handlers/input/ezoeinputparser.php index 7181f73e4dc..a04cea77285 100644 --- a/extension/ezoe/ezxmltext/handlers/input/ezoeinputparser.php +++ b/extension/ezoe/ezxmltext/handlers/input/ezoeinputparser.php @@ -999,7 +999,7 @@ function structHandlerHeader( $element, $newParent ) { ++$sectionLevel; } - elseif ( $current->nodeName === 'td' ) + elseif ( $current->nodeName === 'td' || $current->nodeName === 'th' ) { ++$sectionLevel; break; From 9f16e49e7226f52fe541f6f092b728ddc65472c3 Mon Sep 17 00:00:00 2001 From: Bartek Date: Mon, 12 Oct 2020 16:10:07 +0200 Subject: [PATCH 4/4] EZP-32018: Fixed empty ezdate field transformation (#1464) * EZP-32018: Fixed empty ezdate field transformation * EZP-32018: CS * EZP-32018: CS --- lib/ezutils/classes/eztimestamp.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/ezutils/classes/eztimestamp.php b/lib/ezutils/classes/eztimestamp.php index fcbecd85b23..181d58f4644 100644 --- a/lib/ezutils/classes/eztimestamp.php +++ b/lib/ezutils/classes/eztimestamp.php @@ -14,6 +14,12 @@ class eZTimestamp \return a timestamp in UTC */ public static function getUtcTimestampFromLocalTimestamp( $localTimestamp ) { + + if ( !$localTimestamp ) + { + return null; + } + $utcTimezone = new \DateTimeZone( 'UTC' ); $localTimezone = new \DateTimeZone( date_default_timezone_get() ); @@ -28,6 +34,12 @@ public static function getUtcTimestampFromLocalTimestamp( $localTimestamp ) { \return a timestamp in timezone defined in php.ini */ public static function getLocalTimestampFromUtcTimestamp( $utcTimestamp ) { + + if ( !$utcTimestamp ) + { + return null; + } + $utcTimezone = new \DateTimeZone( 'UTC' ); $localTimezone = new \DateTimeZone( date_default_timezone_get() );