Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
3dc8bd4
[BUGFIX] Remove merge conflict left over
frans-beech-it Jun 6, 2016
91166d5
[TASK] Check if domain record is set when creating mail from draft wi…
frans-beech-it Feb 27, 2015
6df2780
[BUGFIX] Fix issue with "extractHyperLinks"
Jun 28, 2016
308b09e
[BUGFIX] Removed $GLOBALS['TSFE']->initFEuser(); from Jumpurl Hook
fsaris Aug 19, 2016
83a3e29
Merge pull request #16 from fsaris/patch-2
kartolo Aug 22, 2016
1e112a0
Merge pull request #13 from kraftb/master
kartolo Aug 22, 2016
5e76bb6
[FIX] Changes access to the database to TYPO3_DB
3l73 Sep 2, 2016
daf0498
Merge pull request #18 from 3l73/master
kartolo Sep 2, 2016
b56bdf6
[FIX] Removed de locallang files
Sep 2, 2016
f55a1d8
[TASK] Moves icons from res/gfs to Resources/Public/Icons
3l73 Sep 2, 2016
042cad9
[TASK] Updates required PHP version
3l73 Sep 2, 2016
5704464
Updated PHP version requirement
kraftb Sep 5, 2016
aff4b9d
Merge pull request #20 from salnhan/master
kartolo Sep 8, 2016
1b811bb
Merge pull request #9 from beechit/Improve_createFromDraft
kartolo Sep 9, 2016
df47489
Merge pull request #26 from kraftb/master
kartolo Sep 12, 2016
9dbbde8
Merge branch 'master' of https://github.com/3l73/direct_mail into 3l7…
kartolo Sep 12, 2016
86c4528
Merge branch '3l73-master'
kartolo Sep 12, 2016
90c19f4
[WIP][FEATURE] Rewrite bounce handling
kartolo May 2, 2016
ed904f6
[BUGFIX] set FE group per hook
kartolo Sep 12, 2016
282fadf
[TASK] Add documentation multiLanguage
ruudsilvrants Sep 16, 2016
cecbc61
[BUGFIX] Support HTTP Username/Password on Websites running on https
Sep 19, 2016
b29ca1a
Merge pull request #27 from kartolo/develop
kartolo Oct 3, 2016
3253237
Fix composer.json file
helhum Oct 12, 2016
6438abd
[BUGFIX] Don't schedule draft mail if fetching new content failed
frans-beech-it Feb 20, 2015
1ee21d8
[BUGFIX] Remove merge conflict left over
frans-beech-it Jun 6, 2016
6def9df
[TASK] Check if domain record is set when creating mail from draft wi…
frans-beech-it Feb 27, 2015
5bfe793
[BUGFIX] Fix issue with "extractHyperLinks"
Jun 28, 2016
3807844
[BUGFIX] Removed $GLOBALS['TSFE']->initFEuser(); from Jumpurl Hook
fsaris Aug 19, 2016
92364e3
[FIX] Changes access to the database to TYPO3_DB
3l73 Sep 2, 2016
d5fd6c4
[FIX] Removed de locallang files
Sep 2, 2016
0ee4725
[TASK] Moves icons from res/gfs to Resources/Public/Icons
3l73 Sep 2, 2016
87e4efe
[TASK] Updates required PHP version
3l73 Sep 2, 2016
0517341
Updated PHP version requirement
kraftb Sep 5, 2016
219251d
[BUGFIX] set FE group per hook
kartolo Sep 12, 2016
3422935
[TASK] Adjust iconpath to Resources/Public/Icons
ruudsilvrants Oct 14, 2016
7c6eeb4
[TASK] Add label no_recipient_groups_found to locallang
ruudsilvrants Oct 14, 2016
a61e54c
Merge pull request #33 from helhum/patch-1
kartolo Oct 14, 2016
f5025c3
[FEATURE] Add a new hook for link reponse output
mkoitka Oct 25, 2016
e1cc758
[BUGFIX] declare getFEgroupSubgroups as static function
schugabe Oct 27, 2016
bec56fa
Merge pull request #36 from schugabe/issue31
kartolo Oct 31, 2016
a4b7c67
Merge pull request #15 from ruudsilvrants/master
kartolo Nov 15, 2016
f46d2d3
Merge pull request #35 from mkoitka/patch-hook-1
kartolo Nov 15, 2016
54f196c
Merge branch 'master' into github_41
kartolo Jan 6, 2017
662d4ce
update develop branch
kartolo Mar 3, 2017
cf47eaa
[TASK] set version to 5.1.1
kartolo Mar 3, 2017
837375b
Release version 5.1.1
kartolo Mar 3, 2017
cda9fa9
Merge branch 'release/v5.1.1' into develop
kartolo Mar 3, 2017
551a40f
[BUGFIX] Fixed back end user permissions when the user does not have …
Mar 6, 2017
6fa5a2e
Merge branch 'develop' into github_41
kartolo Mar 10, 2017
6cd447b
Checking if PHP IMAP extension is installed and get only unread mail
kartolo Mar 10, 2017
60e4ed3
Updated documentation
kartolo Mar 13, 2017
490a3a5
remove old returmmail script
kartolo Mar 13, 2017
40d883d
Fixing some TYPO3 CGL as mentioned by @simonschaufi
kartolo Mar 17, 2017
934e050
Merge pull request #42 from kartolo/github_41
kartolo Apr 27, 2017
1cfcf5a
Merge pull request #48 from TildBJ/master
kartolo Apr 27, 2017
545add2
Merge pull request #49 from CPS-IT/FixUserTempFolderFunction
kartolo Apr 27, 2017
9c158c6
Merge branch 'master' into develop
kartolo Jun 23, 2017
6f01696
[BUGFIX] set empty value for attachment
kartolo Jun 23, 2017
375d382
[Release] Release version 5.2.0
kartolo Jun 23, 2017
da1c2c4
Release version 5.2.0
kartolo Jun 23, 2017
f8801e1
Merge branch 'release/5.2.0' into develop
kartolo Jun 23, 2017
8431de4
Merge pull request #61 from kartolo/feature/github_52
kartolo Jun 27, 2017
49e8e6a
[BUGFIX] Remove jumpurl max version restriction
kartolo Jun 27, 2017
eeebed5
[BUGFIX] Marked processed mail deleted and expunge the deleted mail
kartolo Jun 27, 2017
24bf33a
Merge pull request #65 from kartolo/feature/github_63
kartolo Jul 6, 2017
261c90a
Update DirectMailUtility.php
rsternec Jul 20, 2017
9b8d57d
close the imap connection
kartolo Sep 11, 2017
a5d16e9
[BUGFIX] added default value.
kartolo Sep 11, 2017
1da3766
Merge pull request #76 from kartolo/feature/github-75
kartolo Sep 11, 2017
f511bf7
Merge pull request #71 from rsternec/patch-1
kartolo Sep 11, 2017
ba4eccf
Merge pull request #66 from kartolo/feature/github_64
kartolo Sep 15, 2017
5f19111
Update for TYPO3 8 LTS (#60)
webian Sep 15, 2017
02d17ca
[TASK] cleanup code for compatibility TYPO3 7 and 8 LTS
kartolo Sep 18, 2017
5a0810d
PSR-2 code cleanup
kartolo Sep 18, 2017
186fa6d
[FIX] Use correct function to parse string to timestamp
malteriechmann Sep 25, 2017
cef97a0
[TASK] Use larger select field for multiple mail groups
malteriechmann Sep 25, 2017
f3a2222
[FEATURE] Introduce a flash message renderer (resolves #85)
Sep 26, 2017
7daa511
Merge pull request #84 from visuellverstehen/task-larger-select-field
kartolo Oct 2, 2017
dd8c692
Merge branch 'develop' into github_78
kartolo Oct 2, 2017
7e23ce7
Merge pull request #79 from kartolo/github_78
kartolo Oct 2, 2017
0ac9f95
Merge branch 'develop' into develop
kartolo Oct 2, 2017
797a2ff
Merge pull request #86 from tritum/develop
kartolo Oct 2, 2017
b9c3ead
[BUGFIX] fix typo3/cms-core version range in composer.json
Patta Oct 16, 2017
f3f269b
Merge pull request #88 from Patta/develop
kartolo Oct 17, 2017
f744309
[BUGFIX] fixed required packages names and versions
Oct 18, 2017
83af450
fixed typo for f744309
Oct 18, 2017
3d1d84d
Merge pull request #89 from theorak/develop
kartolo Oct 20, 2017
e27e09c
[BUGFIX] set the mailing date and time correctly
kartolo Oct 20, 2017
1dfb1af
Merge pull request #90 from kartolo/83_fix_distribution_time
kartolo Oct 20, 2017
c45f27c
Release version 5.2.1
kartolo Oct 20, 2017
82b241a
[BUGFIX] fix required package versions
Patta Oct 20, 2017
f2a71e1
Merge pull request #91 from Patta/develop
kartolo Oct 20, 2017
5a5db3f
[Release] Release 5.2.2.
kartolo Oct 20, 2017
2632e1d
Release 5.2.2
kartolo Oct 20, 2017
3a70924
Security fix release
kartolo Oct 15, 2019
b6f5aed
Merge branch 'hotfix/v5.2.3'
kartolo Oct 15, 2019
d44c7f5
[BUGFIX] Fallback to url if the name can't be received
ruudsilvrants Jan 8, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Classes/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
*/
class Container
{

public $boundaryStartWrap = '<!--DMAILER_SECTION_BOUNDARY_ | -->';
public $boundaryEnd = '<!--DMAILER_SECTION_BOUNDARY_END-->';

Expand Down Expand Up @@ -79,14 +78,15 @@ public function insert_dMailer_boundaries($content, $conf = array())
$foreignTable,
$whereClause,
'',
$orderBy);
$orderBy
);

if ($GLOBALS['TYPO3_DB']->sql_num_rows($res)) {
while (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))) {
$categoryList .= $row['uid'] . ',';
}
$GLOBALS['TYPO3_DB']->sql_free_result($res);
$categoryList = rtrim($categoryList, ",");
$categoryList = rtrim($categoryList, ',');
}
}
// wrap boundaries around content
Expand Down
224 changes: 145 additions & 79 deletions Classes/DirectMailUtility.php

Large diffs are not rendered by default.

107 changes: 59 additions & 48 deletions Classes/Dmailer.php

Large diffs are not rendered by default.

11 changes: 5 additions & 6 deletions Classes/Hooks/JumpurlController.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ public function preprocessRequest($parameter, $parentObject)
$_POST['pass'] = $recipRow['password'];
$_POST['pid'] = $recipRow['pid'];
$_POST['logintype'] = 'login';
$GLOBALS['TSFE']->initFEuser();
}
} else {
throw new \Exception('authCode: Calculated authCode did not match the submitted authCode.', 1376899631);
Expand All @@ -144,14 +143,14 @@ public function preprocessRequest($parameter, $parentObject)
}
} else {
// jumpUrl is not an integer -- then this is a URL, that means that the "dmailerping"
// functionality was used to count the number of "opened mails" received (url, dmailerping)
// functionality was used to count the number of "opened mails" received (url, dmailerping)

// Check if jumpurl is a valid link to a "dmailerping.gif"
// Make $checkPath an absolute path pointing to dmailerping.gif so it can get checked via ::isAllowedAbsPath()
// and remove an eventual "/" at beginning of $jumpurl (because PATH_site already contains "/" at the end)
// Check if jumpurl is a valid link to a "dmailerping.gif"
// Make $checkPath an absolute path pointing to dmailerping.gif so it can get checked via ::isAllowedAbsPath()
// and remove an eventual "/" at beginning of $jumpurl (because PATH_site already contains "/" at the end)
$checkPath = PATH_site . preg_replace('#^/#', '', $jumpurl);

// Now check if $checkPath is a valid path and points to a "/dmailerping.gif"
// Now check if $checkPath is a valid path and points to a "/dmailerping.gif"
if (preg_match('#/dmailerping\\.(gif|png)$#', $checkPath) && GeneralUtility::isAllowedAbsPath($checkPath)) {
// set juHash as done for external_url in core: http://forge.typo3.org/issues/46071
GeneralUtility::_GETset(GeneralUtility::hmac($jumpurl, 'jumpurl'), 'juHash');
Expand Down
16 changes: 8 additions & 8 deletions Classes/Hooks/TtnewsPlaintextHook.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function extraCodesProcessor(&$invokingObj)
);
$row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
$GLOBALS['TYPO3_DB']->sql_free_result($res);
// get the translated record if the content language is not the default language
// get the translated record if the content language is not the default language
if ($GLOBALS['TSFE']->sys_language_content) {
$OLmode = ($this->sys_language_mode == 'strict'?'hideNonTranslated':'');
$row = $GLOBALS['TSFE']->sys_page->getRecordOverlay('tt_news', $row, $GLOBALS['TSFE']->sys_language_content, $OLmode);
Expand All @@ -116,19 +116,19 @@ public function extraCodesProcessor(&$invokingObj)
// Render the title
$lines[] = $this->renderPlainText->renderHeader($row['title']);

// Render author of the tt_news record
// Render author of the tt_news record
$lines[] = $this->renderAuthor($row);

// Render the short version of the tt_news record
// Render the short version of the tt_news record
$lines[] = $this->renderPlainText->breakContent(strip_tags($this->renderPlainText->parseBody($row['short'], 'tt_news_short')));

// Render the main text of the tt_news record
// Render the main text of the tt_news record
$lines[] = $this->renderPlainText->breakContent(strip_tags($this->renderPlainText->parseBody($row['bodytext'], 'tt_news_bodytext')));

// Render the images of the tt_news record.
// Render the images of the tt_news record.
$lines[] = $this->getImages($row);

// Render the downloads of the tt_news record.
// Render the downloads of the tt_news record.
$lines[] = $this->renderPlainText->renderUploads($row['news_files']);
} elseif ($this->sys_language_mode == 'strict' && $this->tt_news_uid) {
$noTranslMsg = $this->cObj->stdWrap($invokingObj->pi_getLL('noTranslMsg', 'Sorry, there is no translation for this news-article'), $this->conf['noNewsIdMsg_stdWrap.']);
Expand All @@ -139,7 +139,7 @@ public function extraCodesProcessor(&$invokingObj)
$content = implode(LF, $lines).$content;
}

// Substitute labels
// Substitute labels
if (!empty($content)) {
$markerArray = array();
$markerArray = $this->renderPlainText->addLabelsMarkers($markerArray);
Expand Down Expand Up @@ -223,6 +223,6 @@ public function renderAuthor($row, $type=0)
return implode(LF, $lines);
}
}
return "";
return '';
}
}
2 changes: 1 addition & 1 deletion Classes/Hooks/TypoScriptFrontendController.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function simulateUsergroup($parameters, \TYPO3\CMS\Frontend\Controller\Ty
$accessToken = GeneralUtility::_GET('access_token');
if ($directMailFeGroup > 0 && DirectMailUtility::validateAndRemoveAccessToken($accessToken)) {
if ($typoScriptFrontendController->fe_user->user) {
$typoScriptFrontendController->fe_user->user[$this->$typoScriptFrontendController->usergroup_column] = $directMailFeGroup;
$typoScriptFrontendController->fe_user->user[$typoScriptFrontendController->usergroup_column] = $directMailFeGroup;
} else {
$typoScriptFrontendController->fe_user->user = array(
$typoScriptFrontendController->fe_user->usergroup_column => $directMailFeGroup
Expand Down
36 changes: 22 additions & 14 deletions Classes/Importer.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\File\BasicFileUtility;
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Resource\DuplicationBehavior;

/**
* Recipient list module for tx_directmail extension
Expand Down Expand Up @@ -102,10 +103,10 @@ public function cmd_displayImport()
// merge it with inData, but inData has priority.
$this->indata = $this->indata + $this->params;

// $currentFileInfo = BasicFileUtility::getTotalFileInfo($this->indata['newFile']);
// $currentFileName = $currentFileInfo['file'];
// $currentFileSize = GeneralUtility::formatSize($currentFileInfo['size']);
// $currentFileMessage = $currentFileName . ' (' . $currentFileSize . ')';
// $currentFileInfo = BasicFileUtility::getTotalFileInfo($this->indata['newFile']);
// $currentFileName = $currentFileInfo['file'];
// $currentFileSize = GeneralUtility::formatSize($currentFileInfo['size']);
// $currentFileMessage = $currentFileName . ' (' . $currentFileSize . ')';

if (empty($this->indata['csv']) && !empty($_FILES['upload_1']['name'])) {
$this->indata['newFile'] = $this->checkUpload();
Expand Down Expand Up @@ -156,7 +157,7 @@ public function cmd_displayImport()
}
}

$out = "";
$out = '';
switch ($stepCurrent) {
case 'conf':
// get list of sysfolder
Expand Down Expand Up @@ -646,7 +647,7 @@ public function doImport(array $csvData)
$mappedCSV = $filteredCSV['clean'];
}

// array for the process_datamap();
// array for the process_datamap();
$data = array();
if ($this->indata['update_unique']) {
$user = array();
Expand Down Expand Up @@ -805,7 +806,7 @@ public function makeDropdown($name, array $option, $selected, $disableInput='')
*
* @return string HTML code
*/
public function makeHidden($name, $value="")
public function makeHidden($name, $value='')
{
if (is_array($name)) {
$hiddenFields = array();
Expand All @@ -830,7 +831,7 @@ public function readCSV()
{
ini_set('auto_detect_line_endings', true);
$mydata = array();
$handle = fopen($this->indata['newFile'], "r");
$handle = fopen($this->indata['newFile'], 'r');
$delimiter = $this->indata['delimiter'];
$encaps = $this->indata['encapsulation'];
$delimiter = ($delimiter === 'comma') ? ',' : $delimiter;
Expand Down Expand Up @@ -869,7 +870,7 @@ public function readExampleCSV($records=3)
if (!is_file($this->indata['newFile']) && (strpos($this->indata['newFile'], PATH_site) === false)) {
$this->indata['newFile'] = PATH_site . $this->indata['newFile'];
}
$handle = fopen($this->indata['newFile'], "r");
$handle = fopen($this->indata['newFile'], 'r');
$i = 0;
$delimiter = $this->indata['delimiter'];
$encaps = $this->indata['encapsulation'];
Expand Down Expand Up @@ -936,7 +937,7 @@ public function formatTable(array $tableLines, array $cellParams, $header, array
$rowA = array();
for ($k = 0; $k < count($r); $k++) {
$v = $r[$k];
$v = strlen($v) ? ($cellcmd[$k]?$v:htmlspecialchars($v)) : "&nbsp;";
$v = strlen($v) ? ($cellcmd[$k]?$v:htmlspecialchars($v)) : '&nbsp;';
if ($first) {
$v = '<B>' . $v . '</B>';
}
Expand Down Expand Up @@ -967,7 +968,9 @@ public function formatTable(array $tableLines, array $cellParams, $header, array
*/
public function userTempFolder()
{
return $tempFolder = 'fileadmin/_temp_/';
/** @var \TYPO3\CMS\Core\Resource\Folder $folder */
$folder = $GLOBALS['BE_USER']->getDefaultUploadTemporaryFolder();
return $folder->getPublicUrl();
}

/**
Expand All @@ -977,7 +980,7 @@ public function userTempFolder()
*/
public function writeTempFile()
{
$newfile = "";
$newfile = '';
$userPermissions = $GLOBALS['BE_USER']->getFilePermissions();

unset($this->fileProcessor);
Expand All @@ -992,7 +995,9 @@ public function writeTempFile()
// Initializing:
/* @var $fileProcessor \TYPO3\CMS\Core\Utility\File\ExtendedFileUtility */
$this->fileProcessor = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Utility\\File\\ExtendedFileUtility');
$this->fileProcessor->init($GLOBALS['FILEMOUNTS'], $GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']);
if (version_compare(TYPO3_branch, '8.3', '<')) {
$this->fileProcessor->init($GLOBALS['FILEMOUNTS'], $GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']);
}
$this->fileProcessor->setActionPermissions($userPermissions);
$this->fileProcessor->dontCheckForUnique = 1;

Expand Down Expand Up @@ -1061,7 +1066,9 @@ public function checkUpload()
// Initializing:
/* @var $fileProcessor \TYPO3\CMS\Core\Utility\File\ExtendedFileUtility */
$this->fileProcessor = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Utility\\File\\ExtendedFileUtility');
$this->fileProcessor->init($fm, $GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']);
if (version_compare(TYPO3_branch, '8.3', '<')) {
$this->fileProcessor->init($fm, $GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']);
}
$this->fileProcessor->setActionPermissions();
$this->fileProcessor->dontCheckForUnique = 1;

Expand All @@ -1073,6 +1080,7 @@ public function checkUpload()
$this->fileProcessor->writeLog(0, 2, 1, 'Referer host "%s" and server host "%s" did not match!', array($refInfo['host'], $httpHost));
} else {
$this->fileProcessor->start($file);
$this->fileProcessor->setExistingFilesConflictMode(DuplicationBehavior::cast(DuplicationBehavior::REPLACE));
$newfile = $this->fileProcessor->func_upload($file['upload']['1']);
}
return $newfile;
Expand Down
9 changes: 4 additions & 5 deletions Classes/MailSelect.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
*/
class MailSelect extends QueryGenerator
{

public $allowedTables = array('tt_address','fe_users');

/**
Expand All @@ -43,11 +42,11 @@ public function mkTableSelect($name, $cur)
{
$out = '<select name="' . $name . '" onChange="submit();">';
$out .= '<option value=""></option>';
reset($GLOBALS["TCA"]);
foreach ($GLOBALS["TCA"] as $tN => $_) {
if ($GLOBALS["BE_USER"]->check('tables_select', $tN) && in_array($tN, $this->allowedTables)) {
reset($GLOBALS['TCA']);
foreach ($GLOBALS['TCA'] as $tN => $_) {
if ($GLOBALS['BE_USER']->check('tables_select', $tN) && in_array($tN, $this->allowedTables)) {
$out .='<option value="' . $tN . '"' . ($tN == $cur ? ' selected':'') . '>' .
$GLOBALS["LANG"]->sl($GLOBALS["TCA"][$tN]['ctrl']['title']) .
$GLOBALS['LANG']->sl($GLOBALS['TCA'][$tN]['ctrl']['title']) .
'</option>';
}
}
Expand Down
Loading