Skip to content

Commit

Permalink
Merge branch '4.9' into 4.10
Browse files Browse the repository at this point in the history
# Conflicts:
#	comments-bundle/src/Resources/contao/dca/tl_comments.php
#	composer.json
#	core-bundle/composer.json
#	core-bundle/src/Resources/contao/dca/tl_article.php
#	core-bundle/src/Resources/contao/dca/tl_member.php
#	core-bundle/src/Resources/contao/dca/tl_page.php
#	core-bundle/src/Resources/contao/dca/tl_user.php
#	core-bundle/src/Resources/contao/drivers/DC_Table.php
#	core-bundle/src/Resources/contao/elements/ContentDownloads.php
#	core-bundle/src/Resources/contao/elements/ContentGallery.php
#	core-bundle/src/Resources/contao/library/Contao/Controller.php
#	core-bundle/src/Resources/contao/library/Contao/Email.php
#	core-bundle/src/Resources/contao/modules/ModuleCustomnav.php
#	core-bundle/src/Resources/contao/modules/ModuleNavigation.php
#	core-bundle/src/Resources/contao/modules/ModuleQuicklink.php
#	core-bundle/src/Resources/contao/modules/ModuleSitemap.php
#	core-bundle/src/Resources/contao/pages/PageRegular.php
#	core-bundle/src/Routing/Matcher/LegacyMatcher.php
#	core-bundle/tests/Image/ImageSizesTest.php
  • Loading branch information
leofeyer committed Sep 22, 2020
2 parents 9e7b05c + a3aff27 commit 086524c
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/Resources/contao/classes/Calendar.php
Expand Up @@ -353,7 +353,7 @@ public function getSearchablePages($arrPages, $intRoot=0, $blnIsSitemap=false)
}

// The target page has not been published (see #5520)
if (!$objParent->published || ($objParent->start != '' && $objParent->start > $time) || ($objParent->stop != '' && $objParent->stop <= $time))
if (!$objParent->published || ($objParent->start && $objParent->start > $time) || ($objParent->stop && $objParent->stop <= $time))
{
continue;
}
Expand Down Expand Up @@ -451,7 +451,7 @@ protected function addEvent($objEvent, $intStart, $intEnd, $strUrl, $strBase='')
$title .= ' ' . $objEvent->title;

// Backwards compatibility (see #8329)
if ($strBase != '' && !preg_match('#^https?://#', $strUrl))
if ($strBase && !preg_match('#^https?://#', $strUrl))
{
$strUrl = $strBase . $strUrl;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/contao/classes/Events.php
Expand Up @@ -324,7 +324,7 @@ protected function addEvent($objEvents, $intStart, $intEnd, $intBegin, $intLimit
}

// Clean the RTE output
if ($arrEvent['teaser'] != '')
if ($arrEvent['teaser'])
{
$arrEvent['hasTeaser'] = true;
$arrEvent['teaser'] = StringUtil::toHtml5($arrEvent['teaser']);
Expand Down
4 changes: 2 additions & 2 deletions src/Resources/contao/dca/tl_calendar_events.php
Expand Up @@ -704,7 +704,7 @@ public function generateAlias($varValue, DataContainer $dc)
};

// Generate the alias if there is none
if ($varValue == '')
if (!$varValue)
{
$varValue = System::getContainer()->get('contao.slug')->generate($dc->activeRecord->title, CalendarModel::findByPk($dc->activeRecord->pid)->jumpTo, $aliasExists);
}
Expand Down Expand Up @@ -898,7 +898,7 @@ public function getSourceOptions(DataContainer $dc)
}

// Add the option currently set
if ($dc->activeRecord && $dc->activeRecord->source != '')
if ($dc->activeRecord && $dc->activeRecord->source)
{
$arrOptions[] = $dc->activeRecord->source;
$arrOptions = array_unique($arrOptions);
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/contao/dca/tl_calendar_feed.php
Expand Up @@ -548,7 +548,7 @@ public function getAllowedCalendars()
public function checkFeedAlias($varValue, DataContainer $dc)
{
// No change or empty value
if ($varValue == $dc->value || $varValue == '')
if (!$varValue || $varValue == $dc->value)
{
return $varValue;
}
Expand Down
8 changes: 4 additions & 4 deletions src/Resources/contao/modules/ModuleEventReader.php
Expand Up @@ -253,7 +253,7 @@ protected function compile()
}

// Clean the RTE output
if ($objEvent->teaser != '')
if ($objEvent->teaser)
{
$objTemplate->hasTeaser = true;
$objTemplate->teaser = StringUtil::toHtml5($objEvent->teaser);
Expand Down Expand Up @@ -296,7 +296,7 @@ protected function compile()
$objTemplate->addImage = false;

// Add an image
if ($objEvent->addImage && $objEvent->singleSRC != '')
if ($objEvent->addImage && $objEvent->singleSRC)
{
$objModel = FilesModel::findByUuid($objEvent->singleSRC);

Expand All @@ -306,7 +306,7 @@ protected function compile()
$arrEvent = $objEvent->row();

// Override the default image size
if ($this->imgSize != '')
if ($this->imgSize)
{
$size = StringUtil::deserialize($this->imgSize);

Expand Down Expand Up @@ -441,7 +441,7 @@ protected function compile()
}

/** @var UserModel $objAuthor */
if ($objCalendar->notify != 'notify_admin' && ($objAuthor = $objEvent->getRelated('author')) instanceof UserModel && $objAuthor->email != '')
if ($objCalendar->notify != 'notify_admin' && ($objAuthor = $objEvent->getRelated('author')) instanceof UserModel && $objAuthor->email)
{
$arrNotifies[] = $objAuthor->email;
}
Expand Down
8 changes: 4 additions & 4 deletions src/Resources/contao/modules/ModuleEventlist.php
Expand Up @@ -265,7 +265,7 @@ protected function compile()
$imgSize = false;

// Override the default image size
if ($this->imgSize != '')
if ($this->imgSize)
{
$size = StringUtil::deserialize($this->imgSize);

Expand All @@ -280,7 +280,7 @@ protected function compile()

for ($i=$offset; $i<$limit; $i++)
{
if ($arrEvents[$i]['addImage'] && $arrEvents[$i]['singleSRC'] != '')
if ($arrEvents[$i]['addImage'] && $arrEvents[$i]['singleSRC'])
{
$uuids[] = $arrEvents[$i]['singleSRC'];
}
Expand Down Expand Up @@ -350,7 +350,7 @@ protected function compile()
$objTemplate->addImage = false;

// Add an image
if ($event['addImage'] && $event['singleSRC'] != '')
if ($event['addImage'] && $event['singleSRC'])
{
$objModel = FilesModel::findByUuid($event['singleSRC']);

Expand Down Expand Up @@ -393,7 +393,7 @@ protected function compile()
}

// No events found
if ($strEvents == '')
if (!$strEvents)
{
$strEvents = "\n" . '<div class="empty">' . $strEmpty . '</div>' . "\n";
}
Expand Down

0 comments on commit 086524c

Please sign in to comment.