Skip to content

Commit

Permalink
Merge pull request #7 from oveleon/develop
Browse files Browse the repository at this point in the history
[Update] Changed database collation and removed Patchwork/UTF8
  • Loading branch information
zoglo authored Feb 14, 2022
2 parents af9c072 + 7043af0 commit 0f1b8d5
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

---

> Working with **Contao 4.9** and up to **Contao 4.12** (PHP ^7.4 and PHP 8)
> Working with **Contao 4.9** and up to **Contao 4.13** (PHP ^7.4 and PHP 8)
---

Expand Down
2 changes: 1 addition & 1 deletion src/Resources/contao/dca/tl_recommendation.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
(
array('tl_recommendation', 'generateAlias')
),
'sql' => "varchar(128) COLLATE utf8_bin NOT NULL default ''"
'sql' => "varchar(255) BINARY NOT NULL default ''"
),
'author' => array
(
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/contao/modules/ModuleRecommendation.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ protected function parseRecommendation($objRecommendation, $objRecommendationArc
$objTemplate->location = $arrMeta['location'] ?? null;

// Add styles
$color = unserialize(Config::get('recommendationActiveColor'))[0];
$color = unserialize(Config::get('recommendationActiveColor'))[0] ?? null;
$objTemplate->styles = $color ? ' style="color:#'.$color.'"' : '';

$objTemplate->addExternalImage = false;
Expand Down
3 changes: 1 addition & 2 deletions src/Resources/contao/modules/ModuleRecommendationForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
use Contao\StringUtil;
use Contao\System;
use Contao\Widget;
use Patchwork\Utf8;
use Psr\Log\LogLevel;

/**
Expand Down Expand Up @@ -63,7 +62,7 @@ public function generate()
if ($request && System::getContainer()->get('contao.routing.scope_matcher')->isBackendRequest($request))
{
$objTemplate = new BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### ' . Utf8::strtoupper($GLOBALS['TL_LANG']['FMD']['recommendationform'][0]) . ' ###';
$objTemplate->wildcard = '### ' . mb_strtoupper($GLOBALS['TL_LANG']['FMD']['recommendationform'][0], 'UTF-8') . ' ###';
$objTemplate->title = $this->headline;
$objTemplate->id = $this->id;
$objTemplate->link = $this->name;
Expand Down
3 changes: 1 addition & 2 deletions src/Resources/contao/modules/ModuleRecommendationList.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use Contao\Pagination;
use Contao\StringUtil;
use Contao\System;
use Patchwork\Utf8;

/**
* Front end module "recommendation list".
Expand Down Expand Up @@ -49,7 +48,7 @@ public function generate()
if ($request && System::getContainer()->get('contao.routing.scope_matcher')->isBackendRequest($request))
{
$objTemplate = new BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### ' . Utf8::strtoupper($GLOBALS['TL_LANG']['FMD']['recommendationlist'][0]) . ' ###';
$objTemplate->wildcard = '### ' . mb_strtoupper($GLOBALS['TL_LANG']['FMD']['recommendationlist'][0], 'UTF-8') . ' ###';
$objTemplate->title = $this->headline;
$objTemplate->id = $this->id;
$objTemplate->link = $this->name;
Expand Down
3 changes: 1 addition & 2 deletions src/Resources/contao/modules/ModuleRecommendationReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use Contao\Input;
use Contao\StringUtil;
use Contao\System;
use Patchwork\Utf8;

/**
* Front end module "recommendation reader".
Expand Down Expand Up @@ -46,7 +45,7 @@ public function generate()
if ($request && System::getContainer()->get('contao.routing.scope_matcher')->isBackendRequest($request))
{
$objTemplate = new BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### ' . Utf8::strtoupper($GLOBALS['TL_LANG']['FMD']['recommendationreader'][0]) . ' ###';
$objTemplate->wildcard = '### ' . mb_strtoupper($GLOBALS['TL_LANG']['FMD']['recommendationreader'][0], 'UTF-8') . ' ###';
$objTemplate->title = $this->headline;
$objTemplate->id = $this->id;
$objTemplate->link = $this->name;
Expand Down

0 comments on commit 0f1b8d5

Please sign in to comment.