Skip to content

Commit

Permalink
[Update] Removed Patchwork/UTF8 from dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
zoglo committed Feb 15, 2022
1 parent 846f57c commit c833678
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Resources/contao/forms/FormPageSwitch.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
use Contao\FilesModel;
use Contao\System;
use Contao\Widget;
use Patchwork\Utf8;

/**
* Class FormSubmit
Expand Down Expand Up @@ -60,10 +59,12 @@ public function validator($input)
*/
public function parse($arrAttributes=null)
{
if (TL_MODE == 'BE')
$request = System::getContainer()->get('request_stack')->getCurrentRequest();

if ($request && System::getContainer()->get('contao.routing.scope_matcher')->isBackendRequest($request))
{
$objTemplate = new BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### ' . Utf8::strtoupper($GLOBALS['TL_LANG']['FFL']['pageSwitch'][0]) . ' :: ' . $this->label . ' ###' . ($this->addCondition ? ' (' . $this->condition . ')' : '');
$objTemplate->wildcard = '### ' . mb_strtoupper($GLOBALS['TL_LANG']['FFL']['pageSwitch'][0], 'UTF-8') . ' :: ' . $this->label . ' ###' . ($this->addCondition ? ' (' . $this->condition . ')' : '');

return $objTemplate->parse();
}
Expand Down

0 comments on commit c833678

Please sign in to comment.