-
-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
114 changed files
with
6,840 additions
and
5,189 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,40 @@ | ||
<?php | ||
namespace DirectMailTeam\DirectMail\Command; | ||
|
||
use DirectMailTeam\DirectMail\Dmailer; | ||
use Symfony\Component\Console\Command\Command; | ||
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
use Symfony\Component\Console\Style\SymfonyStyle; | ||
use TYPO3\CMS\Core\Utility\GeneralUtility; | ||
|
||
class DirectmailCommand extends Command | ||
{ | ||
/** | ||
* Configure the command by defining the name, options and arguments | ||
*/ | ||
public function configure() | ||
{ | ||
$this->setDescription('This command invokes dmailer in order to process queued messages.'); | ||
//$this->setHelp(''); | ||
} | ||
|
||
/** | ||
* @param InputInterface $input | ||
* @param OutputInterface $output | ||
*/ | ||
protected function execute(InputInterface $input, OutputInterface $output) | ||
{ | ||
$io = new SymfonyStyle($input, $output); | ||
$io->title($this->getDescription()); | ||
/** | ||
* The direct_mail engine | ||
* @var $htmlmail Dmailer | ||
*/ | ||
$htmlmail = GeneralUtility::makeInstance(Dmailer::class); | ||
$htmlmail->start(); | ||
$htmlmail->runcron(); | ||
return Command::SUCCESS; | ||
} | ||
} | ||
<?php | ||
|
||
namespace DirectMailTeam\DirectMail\Command; | ||
|
||
use DirectMailTeam\DirectMail\Dmailer; | ||
use Symfony\Component\Console\Command\Command; | ||
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
use Symfony\Component\Console\Style\SymfonyStyle; | ||
use TYPO3\CMS\Core\Utility\GeneralUtility; | ||
|
||
class DirectmailCommand extends Command | ||
{ | ||
/** | ||
* Configure the command by defining the name, options and arguments | ||
*/ | ||
public function configure() | ||
{ | ||
$this->setDescription('This command invokes dmailer in order to process queued messages.'); | ||
//$this->setHelp(''); | ||
} | ||
|
||
/** | ||
* @param InputInterface $input | ||
* @param OutputInterface $output | ||
*/ | ||
protected function execute(InputInterface $input, OutputInterface $output) | ||
{ | ||
$io = new SymfonyStyle($input, $output); | ||
$io->title($this->getDescription()); | ||
/** | ||
* The direct_mail engine | ||
* @var $htmlmail Dmailer | ||
*/ | ||
$htmlmail = GeneralUtility::makeInstance(Dmailer::class); | ||
$htmlmail->start(); | ||
$htmlmail->runcron(); | ||
return Command::SUCCESS; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php | ||
|
||
namespace DirectMailTeam\DirectMail; | ||
|
||
/* | ||
|
@@ -26,9 +27,6 @@ | |
* | ||
* @author Kasper Skårhøj <kasperYYYY>@typo3.com> | ||
* @author Thorsten Kahler <[email protected]> | ||
* | ||
* @package TYPO3 | ||
* @subpackage tx_directmail | ||
*/ | ||
class Container | ||
{ | ||
|
@@ -39,17 +37,17 @@ class Container | |
* @var TypoScriptFrontendController | ||
*/ | ||
protected $cObj; | ||
|
||
/** | ||
* https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/11.4/Deprecation-94956-PublicCObj.html | ||
* | ||
* | ||
* @param ContentObjectRenderer $cObj | ||
*/ | ||
public function setContentObjectRenderer(ContentObjectRenderer $cObj): void | ||
{ | ||
$this->cObj = $cObj; | ||
} | ||
|
||
/** | ||
* This function wraps HTML comments around the content. | ||
* The comments contain the uids of assigned direct mail categories. | ||
|
@@ -71,7 +69,7 @@ public function insert_dMailer_boundaries($content, $conf = []) | |
if ($content != '') { | ||
// setting the default | ||
$categoryList = ''; | ||
if (intval($this->cObj->data['module_sys_dmail_category']) >= 1) { | ||
if ((int)$this->cObj->data['module_sys_dmail_category'] >= 1) { | ||
// if content type "RECORDS" we have to strip off | ||
// boundaries from indcluded records | ||
if ($this->cObj->data['CType'] == 'shortcut') { | ||
|
@@ -122,7 +120,7 @@ public function stripInnerBoundaries($content) | |
public function breakLines($content, array $conf) | ||
{ | ||
$linebreak = $GLOBALS['TSFE']->cObj->stdWrap(($conf['linebreak'] ? $conf['linebreak'] : chr(32) . LF), $conf['linebreak.']); | ||
$charWidth = $GLOBALS['TSFE']->cObj->stdWrap(($conf['charWidth'] ? intval($conf['charWidth']) : 76), $conf['charWidth.']); | ||
$charWidth = $GLOBALS['TSFE']->cObj->stdWrap(($conf['charWidth'] ? (int)$conf['charWidth'] : 76), $conf['charWidth.']); | ||
|
||
return MailUtility::breakLinesForEmail($content, $linebreak, $charWidth); | ||
} | ||
|
Oops, something went wrong.