Skip to content

Commit

Permalink
Merge branch '2019.03'
Browse files Browse the repository at this point in the history
  • Loading branch information
barw4 committed Oct 12, 2020
2 parents e0b07c1 + 9f16e49 commit 10902ec
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,7 @@ function structHandlerHeader( $element, $newParent )
{
++$sectionLevel;
}
elseif ( $current->nodeName === 'td' )
elseif ( $current->nodeName === 'td' || $current->nodeName === 'th' )
{
++$sectionLevel;
break;
Expand Down
12 changes: 6 additions & 6 deletions kernel/shop/discountruleedit.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -68,7 +68,7 @@
$discountRuleSelectedClasses = $http->postVariable( 'Contentclasses' );
if ( !is_array( $discountRuleSelectedClasses ) )
{
$discountRuleSelectedClasses = unserialize( $discountRuleSelectedClasses );
$discountRuleSelectedClasses = json_decode( $discountRuleSelectedClasses );
}
}

Expand All @@ -78,7 +78,7 @@
$discountRuleSelectedSections = $http->postVariable( 'Sections' );
if ( !is_array( $discountRuleSelectedSections ) )
{
$discountRuleSelectedSections = unserialize( $discountRuleSelectedSections );
$discountRuleSelectedSections = json_decode( $discountRuleSelectedSections );
}
}

Expand All @@ -88,7 +88,7 @@
$discountRuleSelectedProducts = $http->postVariable( 'Products' );
if ( !is_array( $discountRuleSelectedProducts ) )
{
$discountRuleSelectedProducts = unserialize( $discountRuleSelectedProducts );
$discountRuleSelectedProducts = json_decode( $discountRuleSelectedProducts );
}
}

Expand Down
12 changes: 12 additions & 0 deletions lib/ezutils/classes/eztimestamp.php
Original file line number Diff line number Diff line change
Expand Up @@ -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() );

Expand All @@ -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() );

Expand Down
5 changes: 2 additions & 3 deletions settings/contentstructuremenu.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 10902ec

Please sign in to comment.