Skip to content

Commit

Permalink
Merge pull request #713 from dasgarner/release21
Browse files Browse the repository at this point in the history
Release 2.1.2
  • Loading branch information
dasgarner authored Oct 28, 2019
2 parents 9d7756d + 64ad153 commit 8f6ac77
Show file tree
Hide file tree
Showing 46 changed files with 107 additions and 72 deletions.
22 changes: 16 additions & 6 deletions lib/Entity/Layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@ public function toXlf()

// Keep track of whether this layout has an empty region
$layoutHasEmptyRegion = false;
$layoutCountRegionsWithMinDuration = 0;
$layoutCountRegionsWithDuration = 0;

$document = new \DOMDocument();
$layoutNode = $document->createElement('layout');
Expand Down Expand Up @@ -1043,6 +1043,13 @@ public function toXlf()
$layoutHasEmptyRegion = true;
}

// Work out if we have any "lead regions", those are Widgets with a duration
foreach ($widgets as $widget) {
if ($widget->useDuration == 1 || $countWidgets > 1 || $regionLoop == 1 || $widget->type == 'video') {
$layoutCountRegionsWithDuration++;
}
}

foreach ($widgets as $widget) {
/* @var Widget $widget */
$module = $this->moduleFactory->createWithWidget($widget, $region);
Expand All @@ -1064,12 +1071,15 @@ public function toXlf()
// the only time we want to override this, is if we want it set to the Minimum Duration for the XLF
$widgetDuration = $widget->calculatedDuration;

if ($widget->useDuration == 0 && $countWidgets <= 1 && $regionLoop == 0 && count($this->regions) > $layoutCountRegionsWithMinDuration + 1) {
// We have a widget without a specified duration in a region on its own and the region isn't set to
// loop.
// Reset to the minimum duration
// Is this Widget one that does not have a duration of its own?
// Assuming we have at least 1 region with a set duration, then we ought to
// Reset to the minimum duration
if ($widget->useDuration == 0 && $countWidgets <= 1 && $regionLoop == 0 && $widget->type != 'video'
&& $layoutCountRegionsWithDuration >= 1
) {
// Make sure this Widget expires immediately so that the other Regions can be the leaders when
// it comes to expiring the Layout
$widgetDuration = Widget::$widgetMinDuration;
$layoutCountRegionsWithMinDuration++;
}

// Region duration
Expand Down
2 changes: 1 addition & 1 deletion lib/Helper/Environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*/
class Environment
{
public static $WEBSITE_VERSION_NAME = '2.1.1';
public static $WEBSITE_VERSION_NAME = '2.1.2';
public static $XMDS_VERSION = '5';
public static $XLF_VERSION = '2';
public static $VERSION_REQUIRED = '5.5';
Expand Down
Binary file modified locale/af.mo
Binary file not shown.
Binary file modified locale/ar.mo
Binary file not shown.
Binary file modified locale/bg.mo
Binary file not shown.
Binary file modified locale/ca.mo
Binary file not shown.
Binary file modified locale/cs.mo
Binary file not shown.
Binary file modified locale/da.mo
Binary file not shown.
Binary file modified locale/de.mo
Binary file not shown.
155 changes: 90 additions & 65 deletions locale/default.pot

Large diffs are not rendered by default.

Binary file modified locale/el.mo
Binary file not shown.
Binary file modified locale/en_GB.mo
Binary file not shown.
Binary file modified locale/es.mo
Binary file not shown.
Binary file modified locale/et.mo
Binary file not shown.
Binary file modified locale/eu.mo
Binary file not shown.
Binary file modified locale/fa.mo
Binary file not shown.
Binary file modified locale/fi.mo
Binary file not shown.
Binary file modified locale/fr.mo
Binary file not shown.
Binary file modified locale/he.mo
Binary file not shown.
Binary file modified locale/hi.mo
Binary file not shown.
Binary file modified locale/hr.mo
Binary file not shown.
Binary file modified locale/hu.mo
Binary file not shown.
Binary file modified locale/id.mo
Binary file not shown.
Binary file modified locale/it.mo
Binary file not shown.
Binary file modified locale/ja.mo
Binary file not shown.
Binary file modified locale/ko.mo
Binary file not shown.
Binary file modified locale/ku.mo
Binary file not shown.
Binary file modified locale/lb.mo
Binary file not shown.
Binary file modified locale/lo.mo
Binary file not shown.
Binary file modified locale/lt.mo
Binary file not shown.
Binary file modified locale/nb.mo
Binary file not shown.
Binary file modified locale/nl.mo
Binary file not shown.
Binary file modified locale/nl_NL.mo
Binary file not shown.
Binary file modified locale/pl.mo
Binary file not shown.
Binary file modified locale/pt.mo
Binary file not shown.
Binary file modified locale/pt_BR.mo
Binary file not shown.
Binary file modified locale/ro.mo
Binary file not shown.
Binary file modified locale/ru.mo
Binary file not shown.
Binary file modified locale/sk.mo
Binary file not shown.
Binary file modified locale/sl.mo
Binary file not shown.
Binary file modified locale/sv.mo
Binary file not shown.
Binary file modified locale/th.mo
Binary file not shown.
Binary file modified locale/tr.mo
Binary file not shown.
Binary file modified locale/vi.mo
Binary file not shown.
Binary file modified locale/zh_CN.mo
Binary file not shown.
Binary file modified locale/zh_TW.mo
Binary file not shown.

0 comments on commit 8f6ac77

Please sign in to comment.