From 3dc8bd43576afca462df0dc9696560bf0e1cee30 Mon Sep 17 00:00:00 2001 From: Frans Saris Date: Mon, 6 Jun 2016 16:17:42 +0200 Subject: [PATCH 01/56] [BUGFIX] Remove merge conflict left over --- Classes/DirectMailUtility.php | 1 - 1 file changed, 1 deletion(-) diff --git a/Classes/DirectMailUtility.php b/Classes/DirectMailUtility.php index 1c9aaea60..00d10eb62 100644 --- a/Classes/DirectMailUtility.php +++ b/Classes/DirectMailUtility.php @@ -1,4 +1,3 @@ -<<<<<<< HEAD Date: Fri, 27 Feb 2015 10:46:09 +0100 Subject: [PATCH 02/56] [TASK] Check if domain record is set when creating mail from draft with cli request This prevents failing mailFromDraft conversions. And makes the error visible for the admin in the BE. --- Classes/Scheduler/MailFromDraft.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Classes/Scheduler/MailFromDraft.php b/Classes/Scheduler/MailFromDraft.php index 2eea614df..63323ccfb 100644 --- a/Classes/Scheduler/MailFromDraft.php +++ b/Classes/Scheduler/MailFromDraft.php @@ -71,6 +71,11 @@ public function execute() // set the right type (3 => 1, 2 => 0) $draftRecord['type'] -= 2; + // check if domain record is set + if ((TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_CLI) && (int)$draftRecord['type'] !== 1 && empty($draftRecord['use_domain'])) { + throw new \Exception('No domain record set!'); + } + // Insert the new dmail record into the DB $GLOBALS['TYPO3_DB']->exec_INSERTquery('sys_dmail', $draftRecord); $this->dmailUid = $GLOBALS['TYPO3_DB']->sql_insert_id(); From 6df27801438cb290620dd78311439e6a360a1970 Mon Sep 17 00:00:00 2001 From: Bernhard Kraft Date: Tue, 28 Jun 2016 20:03:15 +0200 Subject: [PATCH 03/56] [BUGFIX] Fix issue with "extractHyperLinks" For some special cases as shown by the unit tests the method "extractHyperLinks" fails to properly extract the appropriate values. The unit tests fail. This patch solves the issue and makes the unit tests working again. Resolves: https://github.com/kartolo/direct_mail/issues/12 Releases: master --- Classes/Dmailer.php | 21 +++++++------ Tests/Unit/Dmailer/DirectMailEngineTest.php | 35 +++++++++------------ 2 files changed, 26 insertions(+), 30 deletions(-) diff --git a/Classes/Dmailer.php b/Classes/Dmailer.php index 040e30322..2b8fc35e2 100755 --- a/Classes/Dmailer.php +++ b/Classes/Dmailer.php @@ -1408,19 +1408,21 @@ public function extractHyperLinks() $dummy = preg_match('/[^>]*/', $codepieces[$i], $reg); // Fetches the attributes for the tag - $attributes = $this->get_tag_attributes($reg[0]); + $attributes = $this->get_tag_attributes($reg[0], false); $hrefData = array(); $hrefData['ref'] = $attributes['href'] ?: $attributes['action']; + $quotes = (substr($hrefData['ref'], 0, 1) === '"') ? '"' : ''; + $hrefData['ref'] = trim($hrefData['ref'], '"'); if ($hrefData['ref']) { // Finds out if the value had quotes around it - $hrefData['quotes'] = (substr($codepieces[$i], strpos($codepieces[$i], $hrefData["ref"]) - 1, 1) == '"') ? '"' : ''; - // subst_str is the string to look for, when substituting lateron - $hrefData['subst_str'] = $hrefData['quotes'] . $hrefData['ref'] . $hrefData['quotes']; + $hrefData['quotes'] = $quotes; + // subst_str is the string to look for when substituting later on + $hrefData['subst_str'] = $quotes . $hrefData['ref'] . $quotes; if ($hrefData['ref'] && substr(trim($hrefData['ref']), 0, 1) != "#" && !strstr($linkList, "|" . $hrefData['subst_str'] . "|")) { $linkList .= "|" . $hrefData['subst_str'] . "|"; $hrefData['absRef'] = $this->absRef($hrefData['ref']); $hrefData['tag'] = $tag; - $hrefData['no_jumpurl'] = intval($attributes['no_jumpurl']) ? 1 : 0; + $hrefData['no_jumpurl'] = intval(trim($attributes['no_jumpurl'], '"')) ? 1 : 0; $this->theParts['html']['hrefs'][] = $hrefData; } } @@ -1509,10 +1511,11 @@ public function tag_regex($tags) * * @param string $tag Tag is either like this "" or * this " OPTION ATTRIB=VALUE>" which means you can omit the tag-name + * @param boolean $removeQuotes When TRUE (default) quotes around a value will get removed * * @return array array with attributes as keys in lower-case */ - public function get_tag_attributes($tag) + public function get_tag_attributes($tag, $removeQuotes = true) { $attributes = array(); $tag = ltrim(preg_replace('/^<[^ ]*/', '', trim($tag))); @@ -1525,9 +1528,9 @@ public function get_tag_attributes($tag) $attrib = $reg[0]; $tag = ltrim(substr($tag, strlen($attrib), $tagLen)); - if (substr($tag, 0, 1) == '=') { + if (substr($tag, 0, 1) === '=') { $tag = ltrim(substr($tag, 1, $tagLen)); - if (substr($tag, 0, 1) == '"') { + if (substr($tag, 0, 1) === '"' && $removeQuotes) { // Quotes around the value $reg = explode('"', substr($tag, 1, $tagLen), 2); $tag = ltrim($reg[1]); @@ -1537,7 +1540,7 @@ public function get_tag_attributes($tag) preg_match('/^([^[:space:]>]*)(.*)/', $tag, $reg); $value = trim($reg[1]); $tag = ltrim($reg[2]); - if (substr($tag, 0, 1) == '>') { + if (substr($tag, 0, 1) === '>') { $tag = ''; } } diff --git a/Tests/Unit/Dmailer/DirectMailEngineTest.php b/Tests/Unit/Dmailer/DirectMailEngineTest.php index d1a5a7ffc..49d2e23b6 100644 --- a/Tests/Unit/Dmailer/DirectMailEngineTest.php +++ b/Tests/Unit/Dmailer/DirectMailEngineTest.php @@ -1,33 +1,26 @@ - * All rights reserved + * It is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License, either version 2 + * of the License, or any later version. * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * For the full copyright and license information, please read the + * LICENSE.txt file that was distributed with this source code. * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ + * The TYPO3 project - inspiring people to share! + */ /** - * Testcase for class "dmailer" + * Testcase for class "DirectMailTeam\DirectMail\Dmailer" * * @author Bernhard Kraft + * + * @package TYPO3 + * @subpackage tx_directmail */ class DirectMailEngineTest extends \TYPO3\CMS\Core\Tests\UnitTestCase { @@ -81,7 +74,7 @@ public function extractHyperLinksDataProvider() ) ), 'absolute url (fails currently, #54459)' => array(' - This is a simple test', + This is a simple test', 'http://www.server.com/', array( array( From 308b09ec5c219495f7bfb8feadbad33375362fb8 Mon Sep 17 00:00:00 2001 From: Frans Saris Date: Fri, 19 Aug 2016 10:06:01 +0200 Subject: [PATCH 04/56] [BUGFIX] Removed $GLOBALS['TSFE']->initFEuser(); from Jumpurl Hook In the new Hook/JumpurlController $GLOBALS['TSFE']->initFEuser(); is called before $GLOBALS['TSFE'] is initiated. Removed the call as this is done after the hook in RequestHandler/handleRequest --- Classes/Hooks/JumpurlController.php | 1 - 1 file changed, 1 deletion(-) diff --git a/Classes/Hooks/JumpurlController.php b/Classes/Hooks/JumpurlController.php index e012d3e75..4d7c7bd9b 100644 --- a/Classes/Hooks/JumpurlController.php +++ b/Classes/Hooks/JumpurlController.php @@ -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); From 5e76bb65fe0d7a52227409a0da4412a573e566a4 Mon Sep 17 00:00:00 2001 From: Lars Tode Date: Fri, 2 Sep 2016 20:21:00 +0200 Subject: [PATCH 05/56] [FIX] Changes access to the database to TYPO3_DB --- pi1/class.tx_directmail_pi1.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pi1/class.tx_directmail_pi1.php b/pi1/class.tx_directmail_pi1.php index 92fdcdae9..251234510 100644 --- a/pi1/class.tx_directmail_pi1.php +++ b/pi1/class.tx_directmail_pi1.php @@ -277,9 +277,11 @@ public function getImagesStandard(array &$imagesArray, $uploadPath='uploads/pics public function getImagesFromDam(array &$imagesArray) { $sql = 'SELECT tx_dam.* FROM tx_dam_mm_ref,tx_dam WHERE tx_dam_mm_ref.tablenames="tt_content" AND tx_dam_mm_ref.ident="tx_damttcontent_files" AND tx_dam_mm_ref.uid_foreign="' . $this->cObj->data['uid'] . '" AND tx_dam_mm_ref.uid_local=tx_dam.uid AND tx_dam.deleted=0 ORDER BY sorting_foreign'; - $res = mysql_query($sql); - if (mysql_num_rows($res)>0) { - while (($row = mysql_fetch_assoc($res))) { + /* @var \TYPO3\CMS\Core\Database\DatabaseConnection $db */ + $db = $GLOBALS['TYPO3_DB']; + $res = $db->sql_query($sql); + if ($db->sql_num_rows($res) > 0) { + while ($row = $db->sql_fetch_assoc($res)) { $imagesArray[] = $this->siteUrl . $row['file_path'] . $row['file_name']; } } From b56bdf6e224c977ecfadd4ea799e82aa7057f5e5 Mon Sep 17 00:00:00 2001 From: Minh-Thien Nhan Date: Fri, 2 Sep 2016 20:53:38 +0200 Subject: [PATCH 06/56] [FIX] Removed de locallang files Resolved #11 --- .../Language/de.locallangConfiguration.xlf | 28 - .../Language/de.locallangDirectMail.xlf | 28 - .../Language/de.locallangMailerEngine.xlf | 28 - .../Private/Language/de.locallangNavFrame.xlf | 22 - .../Language/de.locallangRecipientList.xlf | 28 - .../Language/de.locallangStatistics.xlf | 28 - .../de.locallang_csh_Configuration.xlf | 41 - .../Language/de.locallang_csh_DirectMail.xlf | 221 --- .../de.locallang_csh_MailerEngine.xlf | 41 - .../de.locallang_csh_RecipientList.xlf | 102 -- .../Language/de.locallang_csh_Statistics.xlf | 45 - .../de.locallang_csh_web_txdirectmail.xlf | 269 ---- .../Private/Language/de.locallang_mod2-6.xlf | 1337 ----------------- .../Private/Language/de.locallang_tca.xlf | 284 ---- 14 files changed, 2502 deletions(-) delete mode 100644 Resources/Private/Language/de.locallangConfiguration.xlf delete mode 100644 Resources/Private/Language/de.locallangDirectMail.xlf delete mode 100644 Resources/Private/Language/de.locallangMailerEngine.xlf delete mode 100644 Resources/Private/Language/de.locallangNavFrame.xlf delete mode 100644 Resources/Private/Language/de.locallangRecipientList.xlf delete mode 100644 Resources/Private/Language/de.locallangStatistics.xlf delete mode 100644 Resources/Private/Language/de.locallang_csh_Configuration.xlf delete mode 100644 Resources/Private/Language/de.locallang_csh_DirectMail.xlf delete mode 100644 Resources/Private/Language/de.locallang_csh_MailerEngine.xlf delete mode 100644 Resources/Private/Language/de.locallang_csh_RecipientList.xlf delete mode 100644 Resources/Private/Language/de.locallang_csh_Statistics.xlf delete mode 100644 Resources/Private/Language/de.locallang_csh_web_txdirectmail.xlf delete mode 100644 Resources/Private/Language/de.locallang_mod2-6.xlf delete mode 100644 Resources/Private/Language/de.locallang_tca.xlf diff --git a/Resources/Private/Language/de.locallangConfiguration.xlf b/Resources/Private/Language/de.locallangConfiguration.xlf deleted file mode 100644 index 253490277..000000000 --- a/Resources/Private/Language/de.locallangConfiguration.xlf +++ /dev/null @@ -1,28 +0,0 @@ - - - -
- Labels for the main Direct Mail module - module - EXT:direct_mail/mod6/locallang_mod.xml - - Ivan Kartolo - ivan.kartolo@gmail.com - LFEditor -
- - - Edit configuration of the extension - Bearbeiten die Konfigrationen der Erweiterung - - - Edit configuration of the extension - Bearbeiten die Konfigrationen der Erweiterung - - - Configuration - Konfiguration - - -
-
\ No newline at end of file diff --git a/Resources/Private/Language/de.locallangDirectMail.xlf b/Resources/Private/Language/de.locallangDirectMail.xlf deleted file mode 100644 index 453198c22..000000000 --- a/Resources/Private/Language/de.locallangDirectMail.xlf +++ /dev/null @@ -1,28 +0,0 @@ - - - -
- Labels for the main Direct Mail module - module - EXT:direct_mail/mod/locallang.xml - - Ivan Kartolo - ivan.kartolo@gmail.com - LFEditor -
- - - Direct mailing of newsletters to targeted recipients. - Direct mailing von Newslettern an ausgewählte Empfänger. - - - Direct Mailer - Direct Mailer - - - Direct Mail - Direct Mail - - -
-
\ No newline at end of file diff --git a/Resources/Private/Language/de.locallangMailerEngine.xlf b/Resources/Private/Language/de.locallangMailerEngine.xlf deleted file mode 100644 index ed503cc70..000000000 --- a/Resources/Private/Language/de.locallangMailerEngine.xlf +++ /dev/null @@ -1,28 +0,0 @@ - - - -
- Labels for the Direct Mail module - module - EXT:direct_mail/mod/locallang.xml - - Ivan Kartolo - ivan.kartolo@gmail.com - LFEditor -
- - - Show the mailing status of the newsletter - Zeigt der Versandstatus eines Newsletters an - - - Mailing status - Versandstatus eines Newsletters - - - Mailer Engine Status - Versand-Status - - -
-
\ No newline at end of file diff --git a/Resources/Private/Language/de.locallangNavFrame.xlf b/Resources/Private/Language/de.locallangNavFrame.xlf deleted file mode 100644 index 8938849d0..000000000 --- a/Resources/Private/Language/de.locallangNavFrame.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - -
- module - Language labels for module "DirectMailNavFrame" - header, description - Ivan Kartolo - ivan.kartolo@gmail.com - LFEditor -
- - - Direct Mailer - Direct mailing von Newslettern an ausgewählte Empfänger. - - - Direct Mail - Direct Mail - - -
-
\ No newline at end of file diff --git a/Resources/Private/Language/de.locallangRecipientList.xlf b/Resources/Private/Language/de.locallangRecipientList.xlf deleted file mode 100644 index 4e50d5749..000000000 --- a/Resources/Private/Language/de.locallangRecipientList.xlf +++ /dev/null @@ -1,28 +0,0 @@ - - - -
- Labels for the main Direct Mail module - module - EXT:direct_mail/mod/locallang.xml - - Ivan Kartolo - ivan.kartolo@gmail.com - LFEditor -
- - - Import Recipients from a CSV File. - Importieren der Empfängern von einer CSV Datei. - - - Import Recipients (CSV) - Importieren der Empfängern (CSV) - - - Recipients Lists - Empfängerliste - - -
-
\ No newline at end of file diff --git a/Resources/Private/Language/de.locallangStatistics.xlf b/Resources/Private/Language/de.locallangStatistics.xlf deleted file mode 100644 index fb3c5092b..000000000 --- a/Resources/Private/Language/de.locallangStatistics.xlf +++ /dev/null @@ -1,28 +0,0 @@ - - - -
- Labels for the main Direct Mail module - module - EXT:direct_mail/mod/locallang.xml - - Ivan Kartolo - ivan.kartolo@gmail.com - LFEditor -
- - - Shows newsletter statistics - Zeigt Statistiken eines Newsletters - - - Shows newsletter statistics - Zeigt Statistiken eines Newsletters - - - Statistics - Statistiken - - -
-
\ No newline at end of file diff --git a/Resources/Private/Language/de.locallang_csh_Configuration.xlf b/Resources/Private/Language/de.locallang_csh_Configuration.xlf deleted file mode 100644 index 901bb3ebf..000000000 --- a/Resources/Private/Language/de.locallang_csh_Configuration.xlf +++ /dev/null @@ -1,41 +0,0 @@ - - - -
- CSH for Direct Mail Configuration Module - CSH - EXT:direct_mail/Resources/Private/Language/locallang_csh_txdirectmailM6 - _MOD_DirectMailNavFrame_txdirectmailM6 - 1 - Ivan Kartolo - ivan.kartolo@gmail.com - LFEditor -
- - - Direct Mail > Configuration module - Direct Mail > Konfiguration-Modul - - - Set the configuration - Konfigurieren das Direct Mail-Modul - - - Set the configuration for the direct mail module. Please refer to the manual for the detailed information - beziehen Sie bitte sich auf das Handbuch zu ausführlicher Information - - - Available Direct Mail folders - Verfügbare Direct-Mail-Ordner - - - Select the Direct Mail folder you wish to work with. - Wählen Sie den Direct-Mail-Ordner, mit dem Sie arbeiten wollen. - - - Each Direct Mail folder is a specifically configured work area for the Direct Mail module. - Jeder Direct-Mail-Ordner enthält eine eigene Newsletter-Konfiguration. Für unterschiedliche Zwecke oder Empfänger können Sie so unterschiedlich gestaltete Newsletter versenden. - - -
-
\ No newline at end of file diff --git a/Resources/Private/Language/de.locallang_csh_DirectMail.xlf b/Resources/Private/Language/de.locallang_csh_DirectMail.xlf deleted file mode 100644 index 9f9d256d8..000000000 --- a/Resources/Private/Language/de.locallang_csh_DirectMail.xlf +++ /dev/null @@ -1,221 +0,0 @@ - - - -
- CSH for Direct Mail Module - CSH - EXT:direct_mail/Resources/Private/Language/locallang_csh_txdirectmailM2 - _MOD_DirectMailNavFrame_txdirectmailM2 - 1 - Ivan Kartolo - ivan.kartolo@gmail.com - LFEditor -
- - - Direct Mail > Direct Mail module - Web > Direct-Mail-Modul - - - Select the function of the Direct Mail module that you want to use. - Wählen Sie eine Funktion des Direct-Mail-Moduls. - - - - - - - sys_dmail, sys_dmail_group, sys_dmail_category - sys_dmail, sys_dmail_group, sys_dmail_category - - - Select a direct mail - Select a direct mail - - - Assigning categories to a content element means that the element will appear in the mail only if the recipient user has chosen that category in his profile. - Assigning categories to a content element means that the element will appear in the mail only if the recipient user has chosen that category in his profile. - - - - - - - sys_dmail_category - sys_dmail_category - - - Create a new direct mail from newsletter - Create a new direct mail from newsletter - - - No direct mail has been created using the content of the following newsletters. Click on the one you want to use to create a new direct mail. - No direct mail has been created using the content of the following newsletters. Click on the one you want to use to create a new direct mail. - - - sys_dmail - sys_dmail - - - Create a new direct mail from an external URL - Create a new direct mail from an external URL - - - Use this form to create a new direct mail based on content grabbed from an external URL. - Use this form to create a new direct mail based on content grabbed from an external URL. - - - sys_dmail - sys_dmail - - - Create a newsletter - Newsletter anlegen - - - Click on this link if you want to create a new newsletter. - Klicken Sie hier, um eine neue Newsletter-Seite anzulegen. - - - - - - - Direct Mails options menu - Direct Mails options menu - - - Select the action you want to perform on this direct mail. - Select the action you want to perform on this direct mail. - - - - - - - sys_dmail - sys_dmail - - - Available Direct Mail folders - Verfügbare Direct-Mail-Ordner - - - Select the Direct Mail folder you wish to work with. - Wählen Sie den Direct-Mail-Ordner, mit dem Sie arbeiten wollen. - - - Each Direct Mail folder is a specifically configured work area for the Direct Mail module. - Jeder Direct-Mail-Ordner enthält eine eigene Newsletter-Konfiguration. Für unterschiedliche Zwecke oder Empfänger können Sie so unterschiedlich gestaltete Newsletter versenden. - - - The following direct mails have not yet been sent. Click on the one you want to work on. - The following direct mails have not yet been sent. Click on the one you want to work on. - - - sys_dmail - sys_dmail - - - Select a newsletter - Wählen Sie eine Newsletter-Seite. - - - Click on one of these already created newsletters. - Klicken Sie einen der bereits angelegten Newsletter. - - - You may click on one of the listed newsletter to view information about it, categorize its content elements, and eventually use it to create a direct mail. - Sie können einen der aufgelisteten Newsletter anklicken, um Informationen über ihn zu erhalten, ihn zu bearbeiten und einen Versand daraus zu erstellen. - - -
-
\ No newline at end of file diff --git a/Resources/Private/Language/de.locallang_csh_MailerEngine.xlf b/Resources/Private/Language/de.locallang_csh_MailerEngine.xlf deleted file mode 100644 index 371652396..000000000 --- a/Resources/Private/Language/de.locallang_csh_MailerEngine.xlf +++ /dev/null @@ -1,41 +0,0 @@ - - - -
- CSH for Direct Mail Mailer Engine Module - CSH - EXT:direct_mail/Resources/Private/Language/locallang_csh_txdirectmailM5 - _MOD_DirectMailNavFrame_txdirectmailM5 - 1 - Ivan Kartolo - ivan.kartolo@gmail.com - LFEditor -
- - - Direct Mail > Mailer Engine module - Direct Mail > Versand-Status-Modul - - - Show status and queuing jobs of the Mailer Engine - Zeigt Status des Versands und anstehenden Newsletter-Versand an. - - - Show the detailed status and queuing jobs of the Mailer Engine. - Zeigt detaillierte Status des Versand und anstehenden Newsletter-Versand an. - - - Available Direct Mail folders - Verfügbare Direct-Mail-Ordner - - - Select the Direct Mail folder you wish to work with. - Wählen Sie den Direct-Mail-Ordner, mit dem Sie arbeiten wollen. - - - Each Direct Mail folder is a specifically configured work area for the Direct Mail module. - Jeder Direct-Mail-Ordner enthält eine eigene Newsletter-Konfiguration. Für unterschiedliche Zwecke oder Empfänger können Sie so unterschiedlich gestaltete Newsletter versenden. - - -
-
\ No newline at end of file diff --git a/Resources/Private/Language/de.locallang_csh_RecipientList.xlf b/Resources/Private/Language/de.locallang_csh_RecipientList.xlf deleted file mode 100644 index d62f9b136..000000000 --- a/Resources/Private/Language/de.locallang_csh_RecipientList.xlf +++ /dev/null @@ -1,102 +0,0 @@ - - - -
- CSH for Direct Mail Recipient List Module - CSH - EXT:direct_mail/Resources/Private/Language/locallang_csh_txdirectmailM3 - _MOD_DirectMailNavFrame_txdirectmailM3 - 1 - Ivan Kartolo - ivan.kartolo@gmail.com - LFEditor -
- - - Direct Mail > Recipient List module - Direct Mail > Empfängerliste-Modul - - - Manage the recipient list. - Verwalten die Empfängerlisten - - - This module lets you: -- create a new recipient list -- import Addresses records from CSV-File -- link to the editing form of an existing recipient list -- select an existing recipient list; selecting an existing recipient list leads you to a screen that lets you view the number of recipients of each type in the list, with the options to list the recipients or download a csv file. - Mit diesem Modul können Sie: -- neue Empfängerliste erzeugen -- neue Adress-Datensätze von einer CSV-Datei importieren -- vorhandene Empfängerliste editieren -- vorhandene Empfängerliste auswählen; Wird eine Empfängerliste ausgewählt, können Sie die Anzahl der Empfängern, einzelne Empfänger auflisten lassen oder die Liste als CSV Datei herunteladen. - - - - sys_dmail_group - sys_dmail_group - - - Available Direct Mail folders - Verfügbare Direct-Mail-Ordner - - - Select the Direct Mail folder you wish to work with. - Wählen Sie den Direct-Mail-Ordner, mit dem Sie arbeiten wollen. - - - Each Direct Mail folder is a specifically configured work area for the Direct Mail module. - Jeder Direct-Mail-Ordner enthält eine eigene Newsletter-Konfiguration. Für unterschiedliche Zwecke oder Empfänger können Sie so unterschiedlich gestaltete Newsletter versenden. - - - Import CSV into 'Address' table - Import CSV into 'Address' table - - - This option lets you import a csv, or comma-separated, list of address records and create a recipient list containing the imported records. - This option lets you import a csv, or comma-separated, list of address records and create a recipient list containing the imported records. - - - The records to import are entered one per line. Each record to import is a comma-separated list of field values. You may also specify the use of a semicolon(;) or of a colon (:) as separator instead of the comma. - -On the first line you may enter a comma-separated list of field names. This first line provides the structure for the records that follow. If you do not provide a list of field names on the first line, then the structure of the records is assumed to be "name, email". - -Each field name listed on the first line is analyzed as follows: - -1.the field name may one of the field names from the following list: uid, name, title, email, phone, www, address, company, city, zip, country, fax, module_sys_dmail_html, module_sys_dmail_category; - -2.the field name may be omitted in which case the corresponding values will be skipped or omitted; - -3.the field name may start with "user_", assuming that table tt_address was extended with the specified field name; - -4.in addition, fields may be suffixed with "[code]"; in this case, when the value in the imported record is not null, "[+value]" adds that number to the field value and "[=value]" overrides any existing value in the field. - -Example of csv field specification: -;user_date;name;email;zip;phone;user_age[=20] -185;12-02-01;Connie Greffel;c.greffel@get2net.dk;;39905067;x -186;12-02-01;Stine Holm;ravnsbjergholm@hotmail.com;;32 96 70 75; -187;12-02-01;Anette Bentholm;madsenbentholm@mail.net4you.dk;;98373677;x - The records to import are entered one per line. Each record to import is a comma-separated list of field values. You may also specify the use of a semicolon(;) or of a colon (:) as separator instead of the comma. - -On the first line you may enter a comma-separated list of field names. This first line provides the structure for the records that follow. If you do not provide a list of field names on the first line, then the structure of the records is assumed to be "name, email". - -Each field name listed on the first line is analyzed as follows: - -1.the field name may one of the field names from the following list: uid, name, title, email, phone, www, address, company, city, zip, country, fax, module_sys_dmail_html, module_sys_dmail_category; - -2.the field name may be omitted in which case the corresponding values will be skipped or omitted; - -3.the field name may start with "user_", assuming that table tt_address was extended with the specified field name; - -4.in addition, fields may be suffixed with "[code]"; in this case, when the value in the imported record is not null, "[+value]" adds that number to the field value and "[=value]" overrides any existing value in the field. - -Example of csv field specification: -;user_date;name;email;zip;phone;user_age[=20] -185;12-02-01;Connie Greffel;c.greffel@get2net.dk;;39905067;x -186;12-02-01;Stine Holm;ravnsbjergholm@hotmail.com;;32 96 70 75; -187;12-02-01;Anette Bentholm;madsenbentholm@mail.net4you.dk;;98373677;x - - -
-
\ No newline at end of file diff --git a/Resources/Private/Language/de.locallang_csh_Statistics.xlf b/Resources/Private/Language/de.locallang_csh_Statistics.xlf deleted file mode 100644 index 983e31bca..000000000 --- a/Resources/Private/Language/de.locallang_csh_Statistics.xlf +++ /dev/null @@ -1,45 +0,0 @@ - - - -
- CSH for Direct Mail Statistic Module - CSH - EXT:direct_mail/Resources/Private/Language/locallang_csh_txdirectmailM4 - _MOD_DirectMailNavFrametxdirectmailM4 - 1 - Ivan Kartolo - ivan.kartolo@gmail.com - LFEditor -
- - - Direct Mail > Statistics module - Direct Mail > Statistik-Modul - - - Show statictics of sent newsletter. - Zeigt Statistiken eines versendeten Newsletter. - - - Show detailed information of sent newsletter. - Zeigt detaillierte Statistiken eines versendeten Newsletter - - - sys_dmail, sys_dmail_group, sys_dmail_category - sys_dmail, sys_dmail_group, sys_dmail_category - - - Available Direct Mail folders - Verfügbare Direct-Mail-Ordner - - - Select the Direct Mail folder you wish to work with. - Wählen Sie den Direct-Mail-Ordner, mit dem Sie arbeiten wollen. - - - Each Direct Mail folder is a specifically configured work area for the Direct Mail module. - Jeder Direct-Mail-Ordner enthält eine eigene Newsletter-Konfiguration. Für unterschiedliche Zwecke oder Empfänger können Sie so unterschiedlich gestaltete Newsletter versenden. - - -
-
\ No newline at end of file diff --git a/Resources/Private/Language/de.locallang_csh_web_txdirectmail.xlf b/Resources/Private/Language/de.locallang_csh_web_txdirectmail.xlf deleted file mode 100644 index 8aca0ad65..000000000 --- a/Resources/Private/Language/de.locallang_csh_web_txdirectmail.xlf +++ /dev/null @@ -1,269 +0,0 @@ - - - -
- CSH for Direct Mail Module - CSH - EXT:direct_mail/mod/locallang_csh_web_DirectMailNavFrame - _MOD_web_DirectMailNavFrame - 1 - Ivan Kartolo - ivan.kartolo@gmail.com - LFEditor -
- - - Web > Direct Mail module - Web > Direct-Mail-Modul - - - Select the function of the Direct Mail module that you want to use. - Wählen Sie eine Funktion des Direct-Mail-Moduls. - - - - - - - sys_dmail, sys_dmail_group, sys_dmail_category - sys_dmail, sys_dmail_group, sys_dmail_category - - - Select a direct mail - Select a direct mail - - - Assigning categories to a content element means that the element will appear in the mail only if the recipient user has chosen that category in his profile. - Assigning categories to a content element means that the element will appear in the mail only if the recipient user has chosen that category in his profile. - - - - - - - sys_dmail_category - sys_dmail_category - - - Create a new direct mail from newsletter - Create a new direct mail from newsletter - - - No direct mail has been created using the content of the following newsletters. Click on the one you want to use to create a new direct mail. - No direct mail has been created using the content of the following newsletters. Click on the one you want to use to create a new direct mail. - - - sys_dmail - sys_dmail - - - Create a new direct mail from an external URL - Create a new direct mail from an external URL - - - Use this form to create a new direct mail based on content grabbed from an external URL. - Use this form to create a new direct mail based on content grabbed from an external URL. - - - sys_dmail - sys_dmail - - - Create a newsletter - Newsletter anlegen - - - Click on this link if you want to create a new newsletter. - Klicken Sie hier, um eine neue Newsletter-Seite anzulegen. - - - - - - - Direct Mails options menu - Direct Mails options menu - - - Select the action you want to perform on this direct mail. - Select the action you want to perform on this direct mail. - - - - - - - sys_dmail - sys_dmail - - - Available Direct Mail folders - Verfügbare Direct-Mail-Ordner - - - Select the Direct Mail folder you wish to work with. - Wählen Sie den Direct-Mail-Ordner, mit dem Sie arbeiten wollen. - - - Each Direct Mail folder is a specifically configured work area for the Direct Mail module. - Jeder Direct-Mail-Ordner enthält eine eigene Newsletter-Konfiguration. Für unterschiedliche Zwecke oder Empfänger können Sie so unterschiedlich gestaltete Newsletter versenden. - - - Import CSV into 'Address' table - Import CSV into 'Address' table - - - This option lets you import a csv, or comma-separated, list of address records and create a recipient list containing the imported records. - This option lets you import a csv, or comma-separated, list of address records and create a recipient list containing the imported records. - - - - - - - The following direct mails have not yet been sent. Click on the one you want to work on. - The following direct mails have not yet been sent. Click on the one you want to work on. - - - sys_dmail - sys_dmail - - - Select a newsletter - Wählen Sie eine Newsletter-Seite. - - - Click on one of these already created newsletters. - Klicken Sie einen der bereits angelegten Newsletter. - - - You may click on one of the listed newsletter to view information about it, categorize its content elements, and eventually use it to create a direct mail. - Sie können einen der aufgelisteten Newsletter anklicken, um Informationen über ihn zu erhalten, ihn zu bearbeiten und einen Versand daraus zu erstellen. - - -
-
\ No newline at end of file diff --git a/Resources/Private/Language/de.locallang_mod2-6.xlf b/Resources/Private/Language/de.locallang_mod2-6.xlf deleted file mode 100644 index 36d7e35af..000000000 --- a/Resources/Private/Language/de.locallang_mod2-6.xlf +++ /dev/null @@ -1,1337 +0,0 @@ - - - -
- Labels for the main Direct Mail module - module - EXT:direct_mail/mod/locallang.xml - Ivan Kartolo - ivan.kartolo@gmail.com - LFEditor -
- - - Enter the additional URL parameters used to fetch the HTML content from a TYPO3 page. - Gibt die zusätzliche URL-Parameter, die während des Auslesen der HTML-Inhalten einer TYPO3 Seite ein. - - - The specified parameters will be added to the URL used to fetch the HTML content of the direct mail from a TYPO3 page. If in doubt, leave it blank. - Die eingegebene Parameter werden in der URL hinzugefügt, um HTML Inhalten einer TYPO3 Seite auszulesen. Im Zweifel lass es leer. - - - Set default values for mail content format: - Setze Standardwerte des Formats von E-Mail-Inhalten fest: - - - Set default values for mail content fetching options: - Setze Standardwerte für Auslesen der E-Mail-Inhalten fest: - - - Set default values for Direct Mails headers: - Setze Standardwerte des Direct Mail Headers fest: - - - Configure direct mail module - Konfigurieren des Direct Mail-Moduls - - - Default character set for direct mails built from external pages - Standard Zeichensatz des Direct Mails, die auf externe Seite basiert sind - - - Specify the character set used in direct mails when they are built from external pages and character set cannot be auto-detected. - Gibt das Zeichensatz der Direct Mails an, die auf externe Seite basiert sind und das Zeichensatz kann nicht automatisch erkannt werden. - - - Default encoding of direct mails - Standardkodierung des Direct Mails - - - Select the default content transfer encoding of direct mails. - Wähle der Standardkodierung der Direct Mail-Inhalten - - - HTML only - Nur HTML - - - HTTP Password - HTTP Kennwort - - - If mail content is protected by HTTP authentication, enter the password here. - Wenn E-Mail-Inhalte mit HTTP Authentifikation geschützt sind, gibt das Kennwort ein. - - - HTTP Username - HTTP Benutzername - - - If mail content is protected by HTTP authentication, enter the username here. - Wenn E-Mail-Inhalte mit HTTP Authentifikation geschützt sind, gibt der Benutzername ein. - - - - - - - Privacy jumpurl - Anonyme jumpurl - - - Set this option, to anonymize click statistics - Setze diese Option ein, um die Klick-Statistiken zu anonymisieren - - - Set additional module options: - Lege die zusätzliche Moduleinstellungen fest: - - - Set options for content transfer encoding and character set: - Setze die Optionen der Versandkodierung und des Zeichensatzes fest: - - - Set options for links in mail content: - Setze die Einstellungen der Links in E-Mail ein: - - - Enable jump URL's: - Aktiviere Jump URL's: - - - Check this option to enable jump URL's and the collection of click statistics. - Kreuze diese Einstellung an, um die Jump URL's zu aktivieren und Statistiken von Klicks zu sammeln. - - - This configuration determines how QuickMails are handled and further sets the default value for Direct Mails. - Diese Einstellung stellt fest, wie Quickmails behandelt und die Standardwerte der Direct Mails einsetze. - - - Enable jump URL's for mailto links: - Aktivere Jump URL's für mailto-Links: - - - Check this option to enable jump URL's for mailto links. - Kreuze diese Einstellung en, um die Jump URL's für mailto-Links zu aktivieren. - - - Enter the additional URL parameters used to fetch the plain text content from a TYPO3 page. - Gibt die zusätzliche URL-Parameter, die während des Auslesen der Text-Inhalten einer TYPO3 Seite ein. - - - The specified parameters will be added to the URL used to fetch the plain text content of the direct mail from a TYPO3 page. If in doubt, set it either to '&type=99' or, when using TemplaVoila, to '&print=1'. - Die eingegebene Parameter werden in der URL hinzugefügt, um HTML Inhalten einer TYPO3 Seite auszulesen. Im Zweifel, setzt entweder '&type=99' oder '&print=1' (nur TemplaVoila). - - - Plain text and HTML - Text und HTML - - - Plain text only - Nur text - - - High - hoch - - - Low - niedrig - - - Normal - Normal - - - Character set for quick mails - Zeichensatz des Quickmails - - - Specify the character set to use when sending quick mails. - Gibt das Zaichensatz für das Versand von Quickmail an: - - - Encoding for quick mails - Kodierung des Quickmails - - - Select the content transfer encoding to use when sending quick mails. - Select the content transfer encoding to use when sending quick mails. - - - List of UID numbers of test recipient lists: - Liste der UID Nummern von Testempfängern: - - - Alternatively to sending test-mails to individuals, you can choose to send to a whole list. This is the list of recipient lists UID numbers available for this action. - Alternativ können Sie Test-E-Mails an einer Liste verschicken. Es ist die UID-Nummer der Liste, die für das Testversand verfügbar soll. - - - List of UID numbers of test recipients (tt_address): - Liste der UID (tt_address) von Testempfängern: - - - Before sending mails, you should test the mail content by sending test mails to one or more test recipients. The available recipients for testing are determined by this list of UID numbers. So first, find out the UID numbers (tt_address) of the recipients you wish to use for testing, then enter them here in a comma-separated list. - Vor dem Versand sollten Sie die E-Mail überprüfen, in dem Sie die E-Mail an ein oder mehrere Empfängern verschicken. Die verfügbaren Empfänger sind in eine Liste von UID bestimmt. Finde die UID Nummer der Empfängern (tt_address), die als Testempfängern fungieren und gibt in einer komma getrennte Liste ein. - - - Subject for the testmail. - Betreff des Test-Newsletters. - - - This will be prepended to the test newsletter subject - Dies wird vor dem Betreff des Test-Newsletter angehängt. - - - Update configuration - Aktualisiere Konfigurationen - - - Custom-defined table: - Benutzerdefinierte Tabelle: - - - Enter the name of a custom-defined table, with compatible columns defined, which may also be used for direct mails distribution. - Gibt der benutzerdefinierte Tabellenname ein, die für das Versand der Direct Mails benutzt werden soll. - - - URL of HTML content: - HTML URL: - - - Cancel - Abbrechen - - - Create mail - E-Mail erstellen - - - Create a new Direct Mail from a page - Neuen Versand anhand einer Seite erstellen - - - Create a new Direct Mail from external URL - Neuen Versand anhand einer externen URL erstellen - - - Edit - Ändern - - - An error was encountered. - FEHLER - - - Available Direct Mail folders - Für Direct Mail konfigurierte Ordner - - - Pages with HTML frames may not be fetched. - Seiten mit HTML Frame können nicht ausgelesen werden. - - - Caution - Achtung - - - Please check the cronjob or cronjob is not set. - Cronjob prüfen oder Cronjob ist nicht konfiguriert. - - - Last run: - Zuletzt ausgeführt: - - - OK - OK - - - Cronjob is running. - Cronjob läuft. - - - Cron job status - Cron job Status - - - Warning - Warnung - - - Please check the cronjob. - Cronjob prüfen. - - - Current time: - Aktuelle Zeit: - - - delete - Entfernen - - - Delivery begun - Versand-Start - - - Delivery ended - Versand-Ende - - - Invoke Mailer Engine - Versand anstoßen - - - Mailer Engine Invoked! - Versand wurde angestoßen! - - - Log: - Protokoll: - - - If TYPO3 is not configured to automatically invoke the Mailer Engine, you can invoke it by clicking here: - Falls TYPO3 nicht so konfiguriert ist, um automatisch einen Versand anzustoßen, so haben Sie hier die Gelegenheit, dies manuell durchzuführen: - - - Manually Invoke Engine - Manueller Versandstart - - - # sent - # verschickt - - - Scheduled - Planzeit - - - Mail Engine Status - Status - - - Subject - Betreff - - - Make query - Generiere Abfrage - - - Send a testmail - Eine Testmail versenden - - - Module configuration - Modulkonfiguration - - - Categories Conversion - Konvertierung von Kategorien - - - QuickMail - QuickMail - - - Direct Mail Extension - Direct Mail Erweiterung - - - NO - NEIN - - - You cannot create direct mails using pages that are hidden or access-restricted. - Sie besitzen nicht die Möglichkeit, versteckte oder zugriffsbeschränkte Seiten zu verschicken. - - - Cannot edit - mail has been sent - Kein Editieren möglich - E-Mail wurde bereits versandt. - - - Cannot edit - you don't have permissions to edit Direct Mails. - Kein Editieren möglich - Sie haben nicht die Berechtigung, Versandobjekte zu editieren. - - - This type of page cannot be used to create direct mails. Please select a regular page. - Dieser Seitentyp kann nicht als E-Mail versendet werden. Bitte wählen Sie eine reguläre Seite. - - - The HTML content does not contain any direct mail boundaries. - The HTML content does not contain any direct mail boundaries. - - - The HTML content could not be fetched. - Die HTML Inhalten können nicht ausgelesen werden. - - - The plain text content does not contain any direct mail boundaries. - The plain text content does not contain any direct mail boundaries. - - - The plain text content could not be fetched. - Die Text Inhalten können nicht ausgelesen werden. - - - Enter at least one valid URL! - Gibt eine gültige URL ein! - - - Number of records: - Anzahl der Einträge: - - - URL of plain text content: - Plain Text URL: - - - Query - Abfrage - - - Send - Senden - - - Subject: - Betreff: - - - Update query - Aktualisiere Abfrage - - - Information on direct mail record: - Versand - - - Check the following warning. - WARNUNG - - - External Pages - Externe Seite - - - Internal Pages - Interne Seite - - - Direct Mail - Direct Mail - - - Select a newsletter to continue sending: - Wähle ein Newsletter um weiter zu versenden: - - - New Newsletter - Neue Newsletter - - - Quickmail - Quickmail - - - New Quickmail - Neue Quickmail - - - Select newsletter source: - Wählen Sie Quelle des Newsletters aus: - - - Detailed Information - Detaillierte Informationen - - - Page is successfully fetched. - Seite ist erfolgreich ausgelesen. - - - Categories - Kategorien - - - Test Mail - Testversand - - - Mass Send - Massenversand - - - back - zurück - - - next - weiter - - - [write subject] - [Betreff schreiben] - - - YES - JA - - - Ending, parsetime: - Beendet, Laufzeit: - - - Invoked at - Aufgerufen: - - - Job begin - Auftrag begonnen - - - Job end - Auftrag beendet - - - Job No: - Auftrags-Nr.: - - - Nothing to do. - Keine Aufträge. - - - processed... - bearbeitet... - - - Sending - senden - - - mails using records from table - Sende E-Mail an Empfängern von Tabelle - - - sys_dmail record - Inhalt der Tabelle sys_dmail - - - Configuration - Konfigurationen - - - Direct Mail - Direct Mail - - - Mailer Engine - Versand-Status - - - Recipient Lists - Empfängerliste - - - Statistics - Statistiken - - - Download CSV file - Download CSV-Datei - - - Recipient List - Empfängerliste - - - Import CSV into 'ADDRESS' table - Import: CSV-Datei => 'ADDRESS' - Tabelle - - - Back - Zurück - - - Filter email dublettes from csv data. If a dublette is found, only the first entry is imported. - E-Mail-Dubletten in den CSV-Daten herausfiltern. Nur der erste CSV-Datensatz mit einer mehrfach vorkommenden E-Mail-Adresse wird importiert. - - - Only update/import valid emails from csv data. - Nur aktualisieren/importieren, wenn die zu importierende E-Mail ein gültiges Format besitzt. - - - Current file: - Derzeit gewählte Datei: - - - Import is finished. - Importvorgang ist fertig. - - - Field encapsulation character (data fields are encapsed with...): - Datenfelder sind mit diesem Zeichen eingeschlossen: - - - First row of import file has fieldnames: - Erste Datenreihe des CSV Importfiles enthält Feldnamen: - - - Import settings - Import Konfigurationen - - - Upload CSV - Hochladen CSV-Daten - - - Import - Importieren - - - All recipients receive HTML newsletter - Alle Empfängern bekommen HTML Newsletter - - - Categories - Kategorien - - - Assign the following categories to all recipients: - Weist folgende Kategorien an allen empfängern: - - - Add categories - Kategorien hinzufügen - - - Settings - Einstellungen - - - Please select the character set of the import file: - Wählen Sie den Zeichensatz der Import-Datei: - - - Field mapping - Feldzuordnung - - - Additional options - Zusatzoptionen - - - Description - Bezeichnung - - - Mapping error - Zuordnungsfehler - - - Please fix following error(s): - Korrigieren Sie folgenden Fehler: - - - "Email" field has to be mapped. - "Email" Feld muss zugeordnet werden. - - - No mapping is found. You have to map at least "email" field. - Es gib keine Zuordnung. "Email" Feld muss zugeordnet werden. - - - Maps to ... - Zuordnung ... - - - Mapping - Zuordnung - - - # - # - - - Value - Wert - - - Next - Weiter - - - OR - ODER - - - Overwrite existing file: - Bestehende Dateien überschreiben: - - - Paste the CSV data: - Einfügen der CSV-Daten: - - - Ready to import - Bereit zum Importieren - - - - - - - Specify the field which determines the uniqueness of imported users: - Feld, das die Einzigartigkeit der importierten Benutzer feststellt: - - - Remove all Addresses in the storage folder before importing: - Lösche alle vorhandenen Adresse-Datensätze im Speicherort vor dem Import: - - - Double records found in the CSV Data: - doppelte Datensatz in CSV-Daten: - - - Do not insert/update invalid emails found in csv data: - Folgende Einträge werden nicht aktualisiert/importiert, da die E-Mail-Adresse kein gültiges Format besitzt: - - - Insert the following records: - Folgende Einträge werden importiert: - - - Update the following records: - Folgende Einträge werden aktualisiert: - - - Field delimiter (data fields are separated by...): - Trennzeichen zwischen den einzelnen Datenfeldern (Feldtrenner): - - - colon [:] - Doppelpunkt [:] - - - comma [,] - Komma [,] - - - semicolon [;] - Semikolon [;] - - - horizontal tab [TAB] - Tabulator [TAB] - - - Please select the storage folder for the imported users: - Wählen Sie den Speicherort für die importierten Benutzer: - - - update - aktualisieren - - - Update existing user, instead renaming the new user: - Vorhandene Benutzer wird aktualisiert statt neuer Benutzer umzubenennen: - - - Choose a file from your local computer: - Wählen Sie eine CSV Import Datei von Ihrem lokalen Rechner: - - - List all recipients - Empfänger anzeigen - - - Plain List - Liste - - - Recipients from recipient list: - Empfänger der Gruppe: - - - Number of recipients: - Anzahl der Empfänger: - - - Address Table - Tabelle: Address - - - Custom Table - Benutzerdefinierte Tabelle - - - Website User Table - Tabelle: Website User - - - Assign categories to content elements - Ausschluss von Seiteninhalten anhand von Kategorien - - - There are no content elements on the page. - Es wurden keine Seiteninhalte auf der Seite gefunden. - - - Create a newsletter - Newsletter erstellen - - - Click here to create a new page that you can later send as a direct mail. - Klicken Sie hier, um eine neue TYPO3-Seite, die Sie später als Newsletter verschicken können, anzulegen. - - - Edit page - Seite ändern - - - ALL - ALLE - - - ONLY - NUR - - - Attach. - Anhang - - - Column - Spalte - - - Last mod. - Letzte Änderung: - - - Sent? - Verschickt? - - - Size - Größe - - - Subject - Betreff - - - Draft - Entwurf - - - PAGE - SEITE - - - EXT URL - Externe URL - - - Type - Typ - - - Update category settings - Kategorie-Einstellungen ändern - - - There are already %s Direct Mails based on this newsletter. Are you sure you want to create another one? - Für diesen Newsletter wurden bereits %s Versandobjekte erstellt. Sind Sie sicher, dass Sie einen weiteren Versand erstellen möchten? - - - Select a newsletter - Newsletter auswählen - - - There are no pages in the mail module. - Es gibt keine Seiten für diese Extension. - - - View page in HTML format - Seite in HTML-Format anzeigen - - - View page in Text format - Seite in TEXT-Format anzeigen - - - Break lines to 76 char: - Zeile nach 76 Buchstaben umbrechen: - - - Message: - Nachricht: - - - Sender Email: - Absender (E-Mail): - - - Sender Name: - Absender (Name): - - - New recipient list - Neue Versandgruppe - - - Create a new recipient list? - Neue Versandgruppe erstellen? - - - Amount: - Summe: - - - Click here to import CSV - Klicken Sie hier, um eine CSV-Datei einzulesen. - - - Select a recipient list - Auswahl der Versandgruppe - - - Recipient list: - Empfängerliste: - - - Send mail - recipient list - Auswahl der Versandgruppe - - - Send to all subscribers in recipient list - An alle Empfänger der Versandgruppe versenden - - - Send this as test newsletter - Dies ist ein Test-Newsletter - - - Distribution time (hh:mm dd-mm-yyyy): - Zeitpunkt des Versands (SS:MM TT-MM-YY): - - - Please select Direct Mail folder. - Bitte einen Direct Mail Verzeichnis auswählen. - - - Recipients: - Empfänger: - - - Sending mail - Mail verschicken - - - Mail scheduled for distribution - Die E-Mail wurde für den Versand freigeben. - - - The mail was scheduled for distribution at - Planversand der E-Mail: - - - The mail was sent. - Die E-Mail wurde verschickt. - - - The mail was sent to <strong>%s</strong>. - Die E-Mail wurde an <strong>%s</strong> verschickt. - - - The mail was sent to <strong>%s</strong> recipients. - Die E-Mail wurde an <strong>%s</strong> Empfänger verschickt. - - - CSV of returned recipients - CSV-Export der zurückgekommenen Empfänger - - - CSV of returned recipients with error in header - CSV-Datei der zurückgekommenen E-Mails (Fehler in Kopfzeile) - - - CSV of returned recipients with bad host - CSV-Datei der zurückgekommenen E-Mails (Unbekannter Server) - - - CSV of returned recipients with mailbox full - CSV-Datei der zurückgekommenen E-Mails (Postfach voll) - - - CSV of returned recipients for unknown reason - CSV-Datei der zurückgekommenen E-Mails (unbekannter Grund) - - - CSV of returned recipients with unknown recipient - CSV-Datei der zurückgekommenen E-Mails (Empfänger unbekannt) - - - HTML: - HTML: - - - HTML Link # - HTML Link # - - - HTML mails viewed: - Gelesen (HTML-Mails): - - - Bad host: - Falscher Host: - - - Count: - Anzahl: - - - Statistics for direct mail: - Versand-Statistik: - - - Disable returned recipients - Deaktiverung der zurückgekommenen Empfänger - - - Disable returned recipients with error in header - Zurückgekommene E-Mails (Fehler in Kopfzeile) deaktivieren - - - Disable returned recipients with bad host - Zurückgekommene E-Mails (Unbekannter Server) deaktivieren - - - Disable returned recipients with mailbox full - Zurückgekommene E-Mails (Postfach voll) deaktivieren - - - Disable returned recipients for unknown reason - Zurückgekommene E-Mails (unbekannter Grund) deaktivieren - - - Disable returned recipients with unknown recipient - Zurückgekommene E-Mail-Adressen (Empfänger unbekannt) deaktivieren - - - List of recipients from tt_address table: - Liste der tt_address Empfängern: - - - adresses disabled - Adressen deaktiviert - - - Email adresses of returned mails with error in header: - E-Mail-Adressen der zurückgekommen E-Mails (Fehler in Kopfzeile): - - - Email adresses of returned mails with bad host: - E-Mail-Adressen der zurückgekommen E-Mails (Unbekannter Server): - - - Email adresses of returned mails: - E-Mail-Adressen der zurückgekommenen Mails: - - - Email adresses of returned mails with mailbox full: - E-Mail-Adressen der zurückgekommen E-Mails (Postfach voll): - - - Email adresses of returned mails for unknown reason: - E-Mail-Adressen der zurückgekommen E-Mails (unbekannter Grund): - - - Email adresses of returned mails with unknown recipient: - E-Mail-Adressen der zurückgekommen E-Mails (Empfänger unbekannt): - - - Error in Header: - Fehler im Mail-Header: - - - General information: - Allgemeine Informationen: - - - Imagelink: - Bildlink: - - - Total responses/Unique responses: - Angeklickte Links per Empfänger: - - - List returned recipients - Liste der zurückgekommenen Empfänger - - - List returned recipients with error in header - Liste der zurückgekommenen E-Mails (Fehler in Kopfzeile) - - - List returned recipients with bad host - Liste der zurückgekommenen E-Mails (Unbekannter Server) - - - List returned recipients with mailbox full - Liste der zurückgekommenen E-Mails (Postfach voll) - - - List returned recipients for unknown reason - Liste der zurückgekommenen E-Mails (unbekannter Grund) - - - List returned recipients with unknown recipient - Liste der zurückgekommenen E-Mails (Empfänger unbekannt) - - - Mailbox full: - Postfach voll: - - - Mails returned: - Zurückgekommene E-Mails: - - - Mails sent: - Verschickte E-Mails: - - - Choose a newsletter - Wähle ein Newsletter aus - - - Delivery begun - Versand-Start - - - Delivery ended - Versand-Ende - - - Newsletter Statistics - Newsletter Statistiken - - - queuing - in der Warteschlange - - - Scheduled - Planzeit - - - sending - sendend - - - sent - verschickt - - - Status - Status - - - Subject - Betreff - - - # sent - # verschickt - - - Plaintext: - Plaintext: - - - Plaintext Link # - Plaintext Link # - - - Reason unknown: - Grund unbekannt: - - - Re-calculate Cached Data: - Neuberechnung der Daten aus dem Zwischenspeicher (Cache): - - - Re-calculate cached statistics data - Neuberechnung der Daten aus dem Zwischenspeicher (Cache) - - - Recipient unknown: - Unbekannte Empfänger: - - - Responses: - Reaktionen: - - - Link Responses: - Geklickte Links: - - - Total: - Insgesamt: - - - Total mails returned: - Insgesamt zurückgekommen: - - - Total responses (links clicked): - Reaktionen insgesamt (Anzahl Klicks): - - - Unique responses (links clicked): - Anzahl der klickenden Empfänger: - - - List of recipients from fe_users: - Liste der fe_users Empfängern: - - - website users disabled - Website-Benutzer deaktiviert - - - Subscriber Info - Abonnentsinfo - - - Subscriber Profile - Abonnentsprofil - - - Receive HTML based mails - empfange HTML E-Mail - - - Set categories of interest for the subscriber. - Stelle die Kategorien des Abonnents ein. - - - Update profile settings - Aktualisiere Profileinstellungen - - - Testmail - Individual - Individuelle Testmail - - - Select a recipient of the testmail. The mail will be generated based on the profile of the recipient you select. - Bitte geben Sie den Empfänger für die Testmail an. Die hier generierte E-Mail wird auf dem Profil des ausgewählten Empfängers basieren. - - - Testmail - Recipient list - Testmail an eine Versandgruppe - - - Select a recipient list for the testmail. The mails will be generated based on the profiles of the recipients in that list. - Bitte geben Sie die Versandgruppe für die Testmail an. Die hier generierte E-Mail wird auf dem Profil der ausgewählten Versandgruppe basieren. - - - Testmail - Simple - Einfache Testmail versenden - - - A simple testmail includes all mail elements regardless of category. But any USER_fields are not substituted with data. Enter an email-address for the testmail: - Eine einfache Testmail enthält alle Elemente ohne Rücksicht auf die Kategorie. Jedoch werden keine Benutzerdaten ersetzt. Dies ist nur im personalisierten Massenversand möglich. Geben Sie hier den Empfänger für die Testmail an: - - - Do it now - Jetzt konvertieren - - - The direct_mail data in the sys_dmail table need to be update. Please backup the sys_dmail table before clicking the following button. Convert the data? - Die direct_mail Datenformat in der sys_dmail Tabelle muss aktualisiert werden. Bitte sichern Sie die sys_dmail-Tabellen, bevor Sie den folgenden Button klicken. Die Konvertierung durchführen? - - - %d records are converted - %d Datensätze sind konvertiert. - - - Updater - Update - - - Important! - Wichtig! - - - [Click here to open the updater] - [Hier klicken um das Update-Skript auszuführen] - - - For the old data working with direct_mail version 3.0, data must be converted. - Damit die alten Daten mit direct_mail 3.0 funktionieren, müssen die Daten konvertiert werden. - - - Warning! Please read! - Achtung! Bitte lesen! - - - BEFORE
- you click on the "Do it now" buttons.]]> - BEVOR
- Sie den "Jetzt konvertieren" Button klicken.]]>
-
- - Delivery begun/ended: - Versand begonnen/beendet: - - - Direct Mail: - Versand: - - - Flowed text: - Fließender Text: - - - Sender: - Absender: - - - Email format/attachments: - Email-Format/Anhänge: - - - Include media: - Medien einbinden: - - - Recipient total/sent: - Empfänger insgesamt/verschickt: - - - Reply: - Antwort: - - - Yes - Ja - - -
-
\ No newline at end of file diff --git a/Resources/Private/Language/de.locallang_tca.xlf b/Resources/Private/Language/de.locallang_tca.xlf deleted file mode 100644 index 1413a545b..000000000 --- a/Resources/Private/Language/de.locallang_tca.xlf +++ /dev/null @@ -1,284 +0,0 @@ - - - -
- Labels for the Direct Mail tables - database - EXT:direct_mail/Resources/Private/Language/locallang_tca.xml - - Ivan Kartolo - ivan.kartolo@gmail.com - LFEditor -
- - - Subscribe to categories - Kategorien abonnieren - - - Recieve e-mails as HTML? - E-Mails im HTML-Format empfangen? - - - Activate Newsletter - Newsletter aktivieren - - - Direct mails - Direct-Mails - - - Parameters, HTML: - Parameter, HTML: - - - URL for HTML content: - URL für HTML-Inhalt: - - - Attachments: - Anhänge: - - - Fields used in the computation of authentication codes: - Für die Authentifizierung verwendete Felder: - - - Message text character set: - E-Mail-Zeichensatz (character set): - - - Use flowing text format in plain text content: - Fließendes Format (flowed) im Text-Format verwenden: - - - Sender email: - Absender-E-Mail: - - - Sender name: - Absender-Name: - - - Include images and other media in HTML content: - Bilder und andere Medien im HTML-Format einbinden: - - - Is sent: - Gesendet: - - - Redirect not only links longer than 76 characters but ALL links: - Nicht nur Links länger als 76 Zeichen, sondern ALLE Links: - - - Long links redirection url: - Lange Link-Redirect-URL (RDCT): - - - Organization: - Organisation: - - - Mail page: - Seiten senden: - - - Parameters, Plain text: - Parameter, normaler Text: - - - URL for plain text content: - URL für normalen Text: - - - Priority: - Priorität: - - - Low - Niedrig - - - High - Hoch - - - Compiled size: - Übertragungsgröße: - - - Reply email: - Antwort-E-Mail: - - - Reply name: - Antwort-Name: - - - Return Path: - Retouradresse (Return Path): - - - Scheduled time: - Planzeit: - - - Delivery start: - Versand-Start: - - - Delivery end: - Versand-Ende: - - - Format of mail content: - Format des E-Mails: - - - Plain text - Normaler Text - - - HTML - HTML - - - Subject: - Betreff: - - - Content transfer encoding: - E-Mail-Übertragungsformat (transfer encoding): - - - TYPO3 Page - TYPO3-Seite - - - External URL - Externe URL - - - Redirect links longer than 76 characters: - Links länger als 76 Zeichen umleiten (Redirect): - - - Direct Mail Category - Direct-Mail-Kategorie - - - Category: - Kategorie - - - Recipient list - Versandgruppe - - - Configuration - Konfigurationen - - - Separate emails by space/comma/linebreak - Trennung der Emails durch Leerzeichen/Kommata/Zeilenumbruch - - - CSV [name],[email] - CSV [name],[email] - - - Recipients: - Empfänger: - - - Other recipient lists: - Andere Versandgruppen: - - - Must subscribe to one of the categories: - Kategorien müssen übereinstimmen: - - - - Kat 0 - - - - Kat 1 - - - - Kat 2 - - - - Kat 3 - - - - Kat 4 - - - - Kat 5 - - - - Kat 6 - - - - Kat 7 - - - - Kat 8 - - - - Kat 9 - - - Recipients: - Empfänger: - - - From pages - Von Seiten - - - Plain list - Normale Liste - - - Static list - Statische Gruppe - - - Special query - Spezielle Anfrage - - - From other recipient lists - Andere Mailgruppe - - - Types of records: - Tabellen: - - - Address - Adresse - - - Website user - Website-Benutzer - - - From custom-defined table - Benutzerdefinierte Tabelle - - -
-
\ No newline at end of file From f55a1d879c97743b533aa04de0812067865c4d5f Mon Sep 17 00:00:00 2001 From: Lars Tode Date: Fri, 2 Sep 2016 23:05:24 +0200 Subject: [PATCH 07/56] [TASK] Moves icons from res/gfs to Resources/Public/Icons --- Configuration/TCA/sys_dmail.php | 2 +- Configuration/TCA/sys_dmail_category.php | 2 +- Configuration/TCA/sys_dmail_group.php | 2 +- .../EnablingClickStatistics/Index.rst | 2 +- .../gfx => Resources/Public/Icons}/attach.gif | Bin {res/gfx => Resources/Public/Icons}/dmail.gif | Bin .../Public/Icons}/dmail_list.gif | Bin .../Public/Icons}/dmailerping.gif | Bin .../Public/Icons}/ext_icon_dmail_folder.gif | Bin .../Icons}/icon_tx_directmail_category.gif | Bin {res/gfx => Resources/Public/Icons}/mail.gif | Bin .../Public/Icons}/mailgroup.gif | Bin .../Public/Icons}/modules_dmail.gif | Bin .../Public/Icons}/modules_dmail__h.gif | Bin .../Public/Icons}/newmail.gif | Bin .../Public/Icons}/preview_html.gif | Bin .../Public/Icons}/preview_txt.gif | Bin ext_emconf.php | 2 +- ext_localconf.php | 24 +++++++++--------- ext_tables.php | 2 +- 20 files changed, 18 insertions(+), 18 deletions(-) rename {res/gfx => Resources/Public/Icons}/attach.gif (100%) rename {res/gfx => Resources/Public/Icons}/dmail.gif (100%) rename {res/gfx => Resources/Public/Icons}/dmail_list.gif (100%) rename {res/gfx => Resources/Public/Icons}/dmailerping.gif (100%) rename {res/gfx => Resources/Public/Icons}/ext_icon_dmail_folder.gif (100%) rename {res/gfx => Resources/Public/Icons}/icon_tx_directmail_category.gif (100%) rename {res/gfx => Resources/Public/Icons}/mail.gif (100%) rename {res/gfx => Resources/Public/Icons}/mailgroup.gif (100%) rename {res/gfx => Resources/Public/Icons}/modules_dmail.gif (100%) rename {res/gfx => Resources/Public/Icons}/modules_dmail__h.gif (100%) rename {res/gfx => Resources/Public/Icons}/newmail.gif (100%) rename {res/gfx => Resources/Public/Icons}/preview_html.gif (100%) rename {res/gfx => Resources/Public/Icons}/preview_txt.gif (100%) diff --git a/Configuration/TCA/sys_dmail.php b/Configuration/TCA/sys_dmail.php index 22fa8ece7..fe628470f 100644 --- a/Configuration/TCA/sys_dmail.php +++ b/Configuration/TCA/sys_dmail.php @@ -8,7 +8,7 @@ 'prependAtCopy' => 'LLL:EXT:lang/locallang_general.xlf:LGL.prependAtCopy', 'title' => 'LLL:EXT:direct_mail/Resources/Private/Language/locallang_tca.xlf:sys_dmail', 'delete' => 'deleted', - 'iconfile' => TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('direct_mail') . 'res/gfx/mail.gif', + 'iconfile' => TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('direct_mail') . 'Resources/Public/Icons/mail.gif', 'type' => 'type', 'useColumnsForDefaultValues' => 'from_email,from_name,replyto_email,replyto_name,organisation,priority,encoding,charset,sendOptions,type', 'dividers2tabs' => true, diff --git a/Configuration/TCA/sys_dmail_category.php b/Configuration/TCA/sys_dmail_category.php index 12376ae83..b5156264c 100644 --- a/Configuration/TCA/sys_dmail_category.php +++ b/Configuration/TCA/sys_dmail_category.php @@ -15,7 +15,7 @@ 'enablecolumns' => array( 'disabled' => 'hidden', ), - 'iconfile' => TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('direct_mail') . 'res/gfx/icon_tx_directmail_category.gif', + 'iconfile' => TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('direct_mail') . 'Resources/Public/Icons/icon_tx_directmail_category.gif', ), 'interface' => array( 'showRecordFieldList' => 'hidden,category' diff --git a/Configuration/TCA/sys_dmail_group.php b/Configuration/TCA/sys_dmail_group.php index 9c6e9e41c..78f63f82a 100644 --- a/Configuration/TCA/sys_dmail_group.php +++ b/Configuration/TCA/sys_dmail_group.php @@ -8,7 +8,7 @@ 'prependAtCopy' => 'LLL:EXT:lang/locallang_general.xlf:LGL.prependAtCopy', 'title' => 'LLL:EXT:direct_mail/Resources/Private/Language/locallang_tca.xlf:sys_dmail_group', 'delete' => 'deleted', - 'iconfile' => TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('direct_mail') . 'res/gfx/mailgroup.gif', + 'iconfile' => TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('direct_mail') . 'Resources/Public/Icons/mailgroup.gif', 'type' => 'type', ), 'interface' => array( diff --git a/Documentation/Configuration/EnablingClickStatistics/Index.rst b/Documentation/Configuration/EnablingClickStatistics/Index.rst index 975f8147c..c99b6231c 100644 --- a/Documentation/Configuration/EnablingClickStatistics/Index.rst +++ b/Documentation/Configuration/EnablingClickStatistics/Index.rst @@ -41,7 +41,7 @@ Example: :: - + Note that the result of the jumpurl setting on the above HTML line is that the src attribute will be replaced by one that refers to the diff --git a/res/gfx/attach.gif b/Resources/Public/Icons/attach.gif similarity index 100% rename from res/gfx/attach.gif rename to Resources/Public/Icons/attach.gif diff --git a/res/gfx/dmail.gif b/Resources/Public/Icons/dmail.gif similarity index 100% rename from res/gfx/dmail.gif rename to Resources/Public/Icons/dmail.gif diff --git a/res/gfx/dmail_list.gif b/Resources/Public/Icons/dmail_list.gif similarity index 100% rename from res/gfx/dmail_list.gif rename to Resources/Public/Icons/dmail_list.gif diff --git a/res/gfx/dmailerping.gif b/Resources/Public/Icons/dmailerping.gif similarity index 100% rename from res/gfx/dmailerping.gif rename to Resources/Public/Icons/dmailerping.gif diff --git a/res/gfx/ext_icon_dmail_folder.gif b/Resources/Public/Icons/ext_icon_dmail_folder.gif similarity index 100% rename from res/gfx/ext_icon_dmail_folder.gif rename to Resources/Public/Icons/ext_icon_dmail_folder.gif diff --git a/res/gfx/icon_tx_directmail_category.gif b/Resources/Public/Icons/icon_tx_directmail_category.gif similarity index 100% rename from res/gfx/icon_tx_directmail_category.gif rename to Resources/Public/Icons/icon_tx_directmail_category.gif diff --git a/res/gfx/mail.gif b/Resources/Public/Icons/mail.gif similarity index 100% rename from res/gfx/mail.gif rename to Resources/Public/Icons/mail.gif diff --git a/res/gfx/mailgroup.gif b/Resources/Public/Icons/mailgroup.gif similarity index 100% rename from res/gfx/mailgroup.gif rename to Resources/Public/Icons/mailgroup.gif diff --git a/res/gfx/modules_dmail.gif b/Resources/Public/Icons/modules_dmail.gif similarity index 100% rename from res/gfx/modules_dmail.gif rename to Resources/Public/Icons/modules_dmail.gif diff --git a/res/gfx/modules_dmail__h.gif b/Resources/Public/Icons/modules_dmail__h.gif similarity index 100% rename from res/gfx/modules_dmail__h.gif rename to Resources/Public/Icons/modules_dmail__h.gif diff --git a/res/gfx/newmail.gif b/Resources/Public/Icons/newmail.gif similarity index 100% rename from res/gfx/newmail.gif rename to Resources/Public/Icons/newmail.gif diff --git a/res/gfx/preview_html.gif b/Resources/Public/Icons/preview_html.gif similarity index 100% rename from res/gfx/preview_html.gif rename to Resources/Public/Icons/preview_html.gif diff --git a/res/gfx/preview_txt.gif b/Resources/Public/Icons/preview_txt.gif similarity index 100% rename from res/gfx/preview_txt.gif rename to Resources/Public/Icons/preview_txt.gif diff --git a/ext_emconf.php b/ext_emconf.php index ddb34eab7..f41a8a6da 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -49,7 +49,7 @@ 'suggests' => array( ), ), - '_md5_values_when_last_written' => 'a:99:{s:9:"ChangeLog";s:4:"c147";s:20:"class.ext_update.php";s:4:"0ab1";s:31:"class.tx_directmail_gabriel.php";s:4:"6de4";s:33:"class.tx_directmail_scheduler.php";s:4:"1a0e";s:16:"ext_autoload.php";s:4:"2e3e";s:21:"ext_conf_template.txt";s:4:"7c49";s:12:"ext_icon.gif";s:4:"a143";s:17:"ext_localconf.php";s:4:"33b2";s:14:"ext_tables.php";s:4:"bc0a";s:14:"ext_tables.sql";s:4:"2388";s:17:"locallang_tca.xml";s:4:"6e8b";s:35:"Classes/Scheduler/MailFromDraft.php";s:4:"4f4c";s:52:"Classes/Scheduler/MailFromDraft_AdditionalFields.php";s:4:"eaa9";s:21:"Configuration/tca.php";s:4:"0000";s:42:"Interfaces/Scheduler/MailFromDraftHook.php";s:4:"938b";s:40:"Resources/Public/StyleSheets/modules.css";s:4:"bf1f";s:23:"cli/cli_direct_mail.php";s:4:"a2b3";s:14:"doc/manual.sxw";s:4:"811a";s:36:"locallang/locallang_csh_sysdmail.xml";s:4:"f4a1";s:39:"locallang/locallang_csh_sysdmailcat.xml";s:4:"a2b1";s:37:"locallang/locallang_csh_sysdmailg.xml";s:4:"0ecd";s:42:"locallang/locallang_csh_txdirectmailM2.xml";s:4:"2fa2";s:42:"locallang/locallang_csh_txdirectmailM3.xml";s:4:"3846";s:42:"locallang/locallang_csh_txdirectmailM4.xml";s:4:"761f";s:42:"locallang/locallang_csh_txdirectmailM5.xml";s:4:"e511";s:42:"locallang/locallang_csh_txdirectmailM6.xml";s:4:"3f6d";s:44:"locallang/locallang_csh_web_txdirectmail.xml";s:4:"1764";s:30:"locallang/locallang_mod2-6.xml";s:4:"d14a";s:14:"mod1/clear.gif";s:4:"cc11";s:13:"mod1/conf.php";s:4:"f25a";s:14:"mod1/index.php";s:4:"4f8b";s:22:"mod1/locallang_mod.xml";s:4:"9b3c";s:17:"mod1/mod_icon.gif";s:4:"a143";s:22:"mod1/mod_template.html";s:4:"65bd";s:34:"mod2/class.tx_directmail_dmail.php";s:4:"5beb";s:13:"mod2/conf.php";s:4:"f24c";s:14:"mod2/index.php";s:4:"6421";s:22:"mod2/locallang_mod.xml";s:4:"6088";s:17:"mod2/mod_icon.gif";s:4:"a143";s:22:"mod2/mod_template.html";s:4:"f729";s:43:"mod3/class.tx_directmail_recipient_list.php";s:4:"7ad3";s:14:"mod3/clear.gif";s:4:"cc11";s:13:"mod3/conf.php";s:4:"ba64";s:14:"mod3/index.php";s:4:"e742";s:22:"mod3/locallang_mod.xml";s:4:"c2ce";s:17:"mod3/mod_icon.gif";s:4:"a143";s:22:"mod3/mod_template.html";s:4:"2581";s:39:"mod4/class.tx_directmail_statistics.php";s:4:"95da";s:14:"mod4/clear.gif";s:4:"cc11";s:13:"mod4/conf.php";s:4:"2c51";s:14:"mod4/index.php";s:4:"e2b7";s:22:"mod4/locallang_mod.xml";s:4:"fc77";s:17:"mod4/mod_icon.gif";s:4:"a143";s:22:"mod4/mod_template.html";s:4:"2581";s:42:"mod5/class.tx_directmail_mailer_engine.php";s:4:"8129";s:14:"mod5/clear.gif";s:4:"cc11";s:13:"mod5/conf.php";s:4:"4ad5";s:14:"mod5/index.php";s:4:"2077";s:22:"mod5/locallang_mod.xml";s:4:"a0d7";s:17:"mod5/mod_icon.gif";s:4:"a143";s:22:"mod5/mod_template.html";s:4:"2581";s:42:"mod6/class.tx_directmail_configuration.php";s:4:"9037";s:14:"mod6/clear.gif";s:4:"cc11";s:13:"mod6/conf.php";s:4:"2862";s:14:"mod6/index.php";s:4:"c58e";s:22:"mod6/locallang_mod.xml";s:4:"87d6";s:17:"mod6/mod_icon.gif";s:4:"a143";s:31:"pi1/class.tx_directmail_pi1.php";s:4:"ef59";s:17:"pi1/locallang.php";s:4:"ff9e";s:17:"pi1/locallang.xml";s:4:"2d6b";s:36:"pi1/tx_directmail_pi1_plaintext.tmpl";s:4:"2027";s:18:"res/gfx/attach.gif";s:4:"5559";s:17:"res/gfx/dmail.gif";s:4:"4d4f";s:22:"res/gfx/dmail_list.gif";s:4:"8d58";s:23:"res/gfx/dmailerping.gif";s:4:"cc11";s:33:"res/gfx/ext_icon_dmail_folder.gif";s:4:"a143";s:39:"res/gfx/icon_tx_directmail_category.gif";s:4:"9398";s:16:"res/gfx/mail.gif";s:4:"4174";s:21:"res/gfx/mailgroup.gif";s:4:"1cc5";s:25:"res/gfx/modules_dmail.gif";s:4:"a143";s:28:"res/gfx/modules_dmail__h.gif";s:4:"040c";s:19:"res/gfx/newmail.gif";s:4:"ffa9";s:24:"res/gfx/preview_html.gif";s:4:"1e65";s:23:"res/gfx/preview_txt.gif";s:4:"4d9a";s:29:"res/scripts/class.dmailer.php";s:4:"4089";s:32:"res/scripts/class.mailselect.php";s:4:"43dd";s:30:"res/scripts/class.readmail.php";s:4:"c526";s:48:"res/scripts/class.tx_directmail_checkjumpurl.php";s:4:"6bf9";s:45:"res/scripts/class.tx_directmail_container.php";s:4:"b13c";s:44:"res/scripts/class.tx_directmail_importer.php";s:4:"6f7e";s:53:"res/scripts/class.tx_directmail_select_categories.php";s:4:"0c1f";s:42:"res/scripts/class.tx_directmail_static.php";s:4:"171f";s:47:"res/scripts/class.tx_directmail_tsparserext.php";s:4:"a5fe";s:52:"res/scripts/class.tx_directmail_ttnews_plaintext.php";s:4:"c28d";s:28:"res/scripts/returnmail.phpsh";s:4:"c0be";s:27:"static/boundaries/setup.txt";s:4:"9409";s:30:"static/plaintext/constants.txt";s:4:"59ce";s:26:"static/plaintext/setup.txt";s:4:"ee48";s:34:"static/tt_news_plaintext/setup.txt";s:4:"1a31";}', + '_md5_values_when_last_written' => 'a:99:{s:9:"ChangeLog";s:4:"c147";s:20:"class.ext_update.php";s:4:"0ab1";s:31:"class.tx_directmail_gabriel.php";s:4:"6de4";s:33:"class.tx_directmail_scheduler.php";s:4:"1a0e";s:16:"ext_autoload.php";s:4:"2e3e";s:21:"ext_conf_template.txt";s:4:"7c49";s:12:"ext_icon.gif";s:4:"a143";s:17:"ext_localconf.php";s:4:"33b2";s:14:"ext_tables.php";s:4:"bc0a";s:14:"ext_tables.sql";s:4:"2388";s:17:"locallang_tca.xml";s:4:"6e8b";s:35:"Classes/Scheduler/MailFromDraft.php";s:4:"4f4c";s:52:"Classes/Scheduler/MailFromDraft_AdditionalFields.php";s:4:"eaa9";s:21:"Configuration/tca.php";s:4:"0000";s:42:"Interfaces/Scheduler/MailFromDraftHook.php";s:4:"938b";s:40:"Resources/Public/StyleSheets/modules.css";s:4:"bf1f";s:23:"cli/cli_direct_mail.php";s:4:"a2b3";s:14:"doc/manual.sxw";s:4:"811a";s:36:"locallang/locallang_csh_sysdmail.xml";s:4:"f4a1";s:39:"locallang/locallang_csh_sysdmailcat.xml";s:4:"a2b1";s:37:"locallang/locallang_csh_sysdmailg.xml";s:4:"0ecd";s:42:"locallang/locallang_csh_txdirectmailM2.xml";s:4:"2fa2";s:42:"locallang/locallang_csh_txdirectmailM3.xml";s:4:"3846";s:42:"locallang/locallang_csh_txdirectmailM4.xml";s:4:"761f";s:42:"locallang/locallang_csh_txdirectmailM5.xml";s:4:"e511";s:42:"locallang/locallang_csh_txdirectmailM6.xml";s:4:"3f6d";s:44:"locallang/locallang_csh_web_txdirectmail.xml";s:4:"1764";s:30:"locallang/locallang_mod2-6.xml";s:4:"d14a";s:14:"mod1/clear.gif";s:4:"cc11";s:13:"mod1/conf.php";s:4:"f25a";s:14:"mod1/index.php";s:4:"4f8b";s:22:"mod1/locallang_mod.xml";s:4:"9b3c";s:17:"mod1/mod_icon.gif";s:4:"a143";s:22:"mod1/mod_template.html";s:4:"65bd";s:34:"mod2/class.tx_directmail_dmail.php";s:4:"5beb";s:13:"mod2/conf.php";s:4:"f24c";s:14:"mod2/index.php";s:4:"6421";s:22:"mod2/locallang_mod.xml";s:4:"6088";s:17:"mod2/mod_icon.gif";s:4:"a143";s:22:"mod2/mod_template.html";s:4:"f729";s:43:"mod3/class.tx_directmail_recipient_list.php";s:4:"7ad3";s:14:"mod3/clear.gif";s:4:"cc11";s:13:"mod3/conf.php";s:4:"ba64";s:14:"mod3/index.php";s:4:"e742";s:22:"mod3/locallang_mod.xml";s:4:"c2ce";s:17:"mod3/mod_icon.gif";s:4:"a143";s:22:"mod3/mod_template.html";s:4:"2581";s:39:"mod4/class.tx_directmail_statistics.php";s:4:"95da";s:14:"mod4/clear.gif";s:4:"cc11";s:13:"mod4/conf.php";s:4:"2c51";s:14:"mod4/index.php";s:4:"e2b7";s:22:"mod4/locallang_mod.xml";s:4:"fc77";s:17:"mod4/mod_icon.gif";s:4:"a143";s:22:"mod4/mod_template.html";s:4:"2581";s:42:"mod5/class.tx_directmail_mailer_engine.php";s:4:"8129";s:14:"mod5/clear.gif";s:4:"cc11";s:13:"mod5/conf.php";s:4:"4ad5";s:14:"mod5/index.php";s:4:"2077";s:22:"mod5/locallang_mod.xml";s:4:"a0d7";s:17:"mod5/mod_icon.gif";s:4:"a143";s:22:"mod5/mod_template.html";s:4:"2581";s:42:"mod6/class.tx_directmail_configuration.php";s:4:"9037";s:14:"mod6/clear.gif";s:4:"cc11";s:13:"mod6/conf.php";s:4:"2862";s:14:"mod6/index.php";s:4:"c58e";s:22:"mod6/locallang_mod.xml";s:4:"87d6";s:17:"mod6/mod_icon.gif";s:4:"a143";s:31:"pi1/class.tx_directmail_pi1.php";s:4:"ef59";s:17:"pi1/locallang.php";s:4:"ff9e";s:17:"pi1/locallang.xml";s:4:"2d6b";s:36:"pi1/tx_directmail_pi1_plaintext.tmpl";s:4:"2027";s:33:"Resources/Public/Icons/attach.gif";s:4:"5559";s:32:"Resources/Public/Icons/dmail.gif";s:4:"4d4f";s:37:"Resources/Public/Icons/dmail_list.gif";s:4:"8d58";s:38:"Resources/Public/Icons/dmailerping.gif";s:4:"cc11";s:48:"Resources/Public/Icons/ext_icon_dmail_folder.gif";s:4:"a143";s:54:"Resources/Public/Icons/icon_tx_directmail_category.gif";s:4:"9398";s:31:"Resources/Public/Icons/mail.gif";s:4:"4174";s:36:"Resources/Public/Icons/mailgroup.gif";s:4:"1cc5";s:40:"Resources/Public/Icons/modules_dmail.gif";s:4:"a143";s:43:"Resources/Public/Icons/modules_dmail__h.gif";s:4:"040c";s:34:"Resources/Public/Icons/newmail.gif";s:4:"ffa9";s:39:"Resources/Public/Icons/preview_html.gif";s:4:"1e65";s:38:"Resources/Public/Icons/preview_txt.gif";s:4:"4d9a";s:29:"res/scripts/class.dmailer.php";s:4:"4089";s:32:"res/scripts/class.mailselect.php";s:4:"43dd";s:30:"res/scripts/class.readmail.php";s:4:"c526";s:48:"res/scripts/class.tx_directmail_checkjumpurl.php";s:4:"6bf9";s:45:"res/scripts/class.tx_directmail_container.php";s:4:"b13c";s:44:"res/scripts/class.tx_directmail_importer.php";s:4:"6f7e";s:53:"res/scripts/class.tx_directmail_select_categories.php";s:4:"0c1f";s:42:"res/scripts/class.tx_directmail_static.php";s:4:"171f";s:47:"res/scripts/class.tx_directmail_tsparserext.php";s:4:"a5fe";s:52:"res/scripts/class.tx_directmail_ttnews_plaintext.php";s:4:"c28d";s:28:"res/scripts/returnmail.phpsh";s:4:"c0be";s:27:"static/boundaries/setup.txt";s:4:"9409";s:30:"static/plaintext/constants.txt";s:4:"59ce";s:26:"static/plaintext/setup.txt";s:4:"ee48";s:34:"static/tt_news_plaintext/setup.txt";s:4:"1a31";}', 'suggests' => array( ), 'autoload' => array( diff --git a/ext_localconf.php b/ext_localconf.php index 6acc36581..1a3806c91 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -10,18 +10,18 @@ $iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class); $icons = array( - 'directmail-attachment' => array('source' => 'EXT:direct_mail/res/gfx/attach.gif'), - 'directmail-dmail' => array('source' => 'EXT:direct_mail/res/gfx/dmail.gif'), - 'directmail-dmail-list' => array('source' => 'EXT:direct_mail/res/gfx/dmail_list.gif'), - 'directmail-folder' => array('source' => 'EXT:direct_mail/res/gfx/ext_icon_dmail_folder.gif'), - 'directmail-category' => array('source' => 'EXT:direct_mail/res/gfx/icon_tx_directmail_category.gif'), - 'directmail-mail' => array('source' => 'EXT:direct_mail/res/gfx/mail.gif'), - 'directmail-mailgroup' => array('source' => 'EXT:direct_mail/res/gfx/mailgroup.gif'), - 'directmail-page-modules-dmail' => array('source' => 'EXT:direct_mail/res/gfx/modules_dmail.gif'), - 'directmail-page-modules-dmail-inactive' => array('source' => 'EXT:direct_mail/res/gfx/modules_dmail__h.gif'), - 'directmail-dmail-new' => array('source' => 'EXT:direct_mail/res/gfx/newmail.gif'), - 'directmail-dmail-preview-html' => array('source' => 'EXT:direct_mail/res/gfx/preview_html.gif'), - 'directmail-dmail-preview-text' => array('source' => 'EXT:direct_mail/res/gfx/preview_txt.gif'), + 'directmail-attachment' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/attach.gif'), + 'directmail-dmail' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/dmail.gif'), + 'directmail-dmail-list' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/dmail_list.gif'), + 'directmail-folder' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/ext_icon_dmail_folder.gif'), + 'directmail-category' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/icon_tx_directmail_category.gif'), + 'directmail-mail' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/mail.gif'), + 'directmail-mailgroup' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/mailgroup.gif'), + 'directmail-page-modules-dmail' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/modules_dmail.gif'), + 'directmail-page-modules-dmail-inactive' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/modules_dmail__h.gif'), + 'directmail-dmail-new' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/newmail.gif'), + 'directmail-dmail-preview-html' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/preview_html.gif'), + 'directmail-dmail-preview-text' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/preview_txt.gif'), ); diff --git a/ext_tables.php b/ext_tables.php index fabf72336..213c427ce 100755 --- a/ext_tables.php +++ b/ext_tables.php @@ -151,7 +151,7 @@ } -$GLOBALS['TBE_STYLES']['spritemanager']['singleIcons']['tcarecords-pages-contains-dmail'] = TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'res/gfx/ext_icon_dmail_folder.gif'; +$GLOBALS['TBE_STYLES']['spritemanager']['singleIcons']['tcarecords-pages-contains-dmail'] = TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Icons/ext_icon_dmail_folder.gif'; if (is_array($GLOBALS['TCA']['pages']['ctrl']['typeicon_classes'])) { $GLOBALS['TCA']['pages']['ctrl']['typeicon_classes']['contains-dmail'] = 'tcarecords-pages-contains-dmail'; } From 042cad9a8161af6e2a423181c8f7f169e681c970 Mon Sep 17 00:00:00 2001 From: Lars Tode Date: Fri, 2 Sep 2016 23:09:56 +0200 Subject: [PATCH 08/56] [TASK] Updates required PHP version --- ext_emconf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext_emconf.php b/ext_emconf.php index f41a8a6da..340cbd44e 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -36,7 +36,7 @@ 'depends' => array( 'cms' => '', 'tt_address' => '', - 'php' => '5.3.0', + 'php' => '5.3.0-5.5.99', 'typo3' => '7.6.0-7.6.99', 'jumpurl' => '7.6.0-7.6.99', ), From 5704464fc678d16ee22d66cee780930ec10aef5d Mon Sep 17 00:00:00 2001 From: kraftb Date: Mon, 5 Sep 2016 14:02:09 +0200 Subject: [PATCH 09/56] Updated PHP version requirement As the extension uses the "::class" keyword/operator the PHP version requirement has to get raised to 5.5 --- ext_emconf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext_emconf.php b/ext_emconf.php index ddb34eab7..d47b4dd14 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -36,7 +36,7 @@ 'depends' => array( 'cms' => '', 'tt_address' => '', - 'php' => '5.3.0', + 'php' => '5.5.0', 'typo3' => '7.6.0-7.6.99', 'jumpurl' => '7.6.0-7.6.99', ), From 90c19f4617394ba96bbfbdf5b38620c2de67d79e Mon Sep 17 00:00:00 2001 From: Ivan Kartolo Date: Mon, 2 May 2016 09:03:39 +0200 Subject: [PATCH 10/56] [WIP][FEATURE] Rewrite bounce handling Bounce handling is rewritten, so it's not dependent on fetchmail anymore. It uses the Fetch library (https://github.com/tedious/Fetch/), which needs PHP IMAP module. Todo: check PHP IMAP module and documentation Resolves: #73727 Releases: master Change-Id: I978619b854222957f6c12f15d5f6f71725f7933e --- Classes/Readmail.php | 7 +- Classes/Scheduler/AnalyzeBounceMail.php | 280 ++++++ .../AnalyzeBounceMailAdditionalFields.php | 149 ++++ .../Private/Language/locallang_mod2-6.xlf | 39 + Resources/Private/Php/Fetch/.coveralls.yml | 3 + Resources/Private/Php/Fetch/.gitignore | 9 + Resources/Private/Php/Fetch/.travis.yml | 24 + Resources/Private/Php/Fetch/CONTRIBUTING.md | 54 ++ Resources/Private/Php/Fetch/LICENSE | 24 + Resources/Private/Php/Fetch/README.md | 67 ++ Resources/Private/Php/Fetch/autoload.php | 25 + Resources/Private/Php/Fetch/composer.json | 28 + Resources/Private/Php/Fetch/phpunit.xml.dist | 27 + .../Php/Fetch/src/Fetch/Attachment.php | 234 +++++ .../Private/Php/Fetch/src/Fetch/Message.php | 797 ++++++++++++++++++ .../Private/Php/Fetch/src/Fetch/Server.php | 515 +++++++++++ .../Fetch/tests/Fetch/Test/AttachmentTest.php | 118 +++ .../Fetch/tests/Fetch/Test/MessageTest.php | 286 +++++++ .../Php/Fetch/tests/Fetch/Test/ServerTest.php | 234 +++++ .../Private/Php/Fetch/tests/bootstrap.php | 40 + Resources/Private/Php/Fetch/tests/runTests.sh | 17 + composer.json | 3 +- ext_emconf.php | 5 +- ext_localconf.php | 8 + 24 files changed, 2987 insertions(+), 6 deletions(-) create mode 100644 Classes/Scheduler/AnalyzeBounceMail.php create mode 100644 Classes/Scheduler/AnalyzeBounceMailAdditionalFields.php create mode 100644 Resources/Private/Php/Fetch/.coveralls.yml create mode 100644 Resources/Private/Php/Fetch/.gitignore create mode 100644 Resources/Private/Php/Fetch/.travis.yml create mode 100644 Resources/Private/Php/Fetch/CONTRIBUTING.md create mode 100644 Resources/Private/Php/Fetch/LICENSE create mode 100644 Resources/Private/Php/Fetch/README.md create mode 100644 Resources/Private/Php/Fetch/autoload.php create mode 100644 Resources/Private/Php/Fetch/composer.json create mode 100644 Resources/Private/Php/Fetch/phpunit.xml.dist create mode 100644 Resources/Private/Php/Fetch/src/Fetch/Attachment.php create mode 100755 Resources/Private/Php/Fetch/src/Fetch/Message.php create mode 100644 Resources/Private/Php/Fetch/src/Fetch/Server.php create mode 100644 Resources/Private/Php/Fetch/tests/Fetch/Test/AttachmentTest.php create mode 100644 Resources/Private/Php/Fetch/tests/Fetch/Test/MessageTest.php create mode 100644 Resources/Private/Php/Fetch/tests/Fetch/Test/ServerTest.php create mode 100644 Resources/Private/Php/Fetch/tests/bootstrap.php create mode 100755 Resources/Private/Php/Fetch/tests/runTests.sh diff --git a/Classes/Readmail.php b/Classes/Readmail.php index 88bc76093..7a829b767 100644 --- a/Classes/Readmail.php +++ b/Classes/Readmail.php @@ -55,7 +55,6 @@ class Readmail public $serverGMToffsetMinutes = 60; - /** * Returns special TYPO3 Message ID (MID) from input TO header * (the return address of the sent mail from Dmailer) @@ -91,8 +90,8 @@ public function find_MIDfromReturnPath($to) */ public function find_XTypo3MID($content) { - if (strstr($content, "X-TYPO3MID:")) { - $p = explode("X-TYPO3MID:", $content, 2); + if (strstr($content, 'X-TYPO3MID:')) { + $p = explode('X-TYPO3MID:', $content, 2); $l = explode(LF, $p[1], 2); list($mid, $hash) = GeneralUtility::trimExplode('-', $l[0]); if (md5($mid) == $hash) { @@ -105,7 +104,7 @@ public function find_XTypo3MID($content) return($out); } } - return ""; + return ''; } /** diff --git a/Classes/Scheduler/AnalyzeBounceMail.php b/Classes/Scheduler/AnalyzeBounceMail.php new file mode 100644 index 000000000..c15306dcc --- /dev/null +++ b/Classes/Scheduler/AnalyzeBounceMail.php @@ -0,0 +1,280 @@ + + */ +class AnalyzeBounceMail extends AbstractTask +{ + /** + * url of the mail server + * @var string + */ + protected $server; + + /** + * Port number of the mail server + * @var int + */ + protected $port; + + /** + * Username to use to authenticate + * @var string + */ + protected $user; + + /** + * Password of the user + * @var string + */ + protected $password; + + /** + * Mailserver type (imap or pop3) + * @var string + */ + protected $service; + + /** + * Maximum number of bounce mail to be processed + * @var int + */ + protected $maxProcessed; + + /** + * @return int + */ + public function getPort() + { + return $this->port; + } + + /** + * @param int $port + */ + public function setPort($port) + { + $this->port = $port; + } + + /** + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * @param string $user + */ + public function setUser($user) + { + $this->user = $user; + } + + /** + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * @param string $password + */ + public function setPassword($password) + { + $this->password = $password; + } + + /** + * @return string + */ + public function getService() + { + return $this->service; + } + + /** + * @param string $service + */ + public function setService($service) + { + $this->service = $service; + } + + /** + * @return mixed + */ + public function getServer() + { + return $this->server; + } + + /** + * @param mixed $server + */ + public function setServer($server) + { + $this->server = $server; + } + + /** + * @return mixed + */ + public function getMaxProcessed() + { + return $this->maxProcessed; + } + + /** + * @param mixed $maxProcessed + */ + public function setMaxProcessed($maxProcessed) + { + $this->maxProcessed = (int) $maxProcessed; + } + + /** + * execute the scheduler task. + * + * @return bool + */ + public function execute() + { + // try connect to mail server + $mailServer = $this->connectMailServer(); + if ($mailServer instanceof Server) { + // we are connected to mail server + // get mails + // TODO: how to get only unread mail + $messages = $mailServer->getMessages($this->maxProcessed); + /** @var Message $message The message object */ + foreach ($messages as $i => $message) { + // process the mail + if ($this->processBounceMail($message)) { + // set delete + //$message->delete(); + } + } + + // expunge to delete permanently + //$mailServer->expunge(); + return true; + } else { + return false; + } + } + + /** + * Process the bounce mail + * @param Message $message the message object + * @return bool true if bounce mail can be parsed, else false + */ + private function processBounceMail($message) + { + /** @var Readmail $readMail */ + $readMail = GeneralUtility::makeInstance('DirectMailTeam\\DirectMail\\Readmail'); + + // get attachment + $attachmentArray = $message->getAttachments(); + $midArray = array(); + foreach ($attachmentArray as $v => $attachment) { + //Todo: check attachment mimeType $attachment->mimeType? + $bouncedMail = $attachment->getData(); + // Find mail id + $midArray = $readMail->find_XTypo3MID($bouncedMail); + if (is_array($midArray)) { + // if mid, rid and rtbl are found, then continue + break; + } + } + + // Extract text content + $cp = $readMail->analyseReturnError($message->getMessageBody()); + + $res = $this->getDatabaseConnection()->exec_SELECTquery( + 'uid,email', + 'sys_dmail_maillog', + 'rid=' . intval($midArray['rid']) . ' AND rtbl="' . + $this->getDatabaseConnection()->quoteStr($midArray['rtbl'], 'sys_dmail_maillog') . '"' . + ' AND mid=' . intval($midArray['mid']) . ' AND response_type=0' + ); + + // only write to log table, if we found a corresponding recipient record + if ($this->getDatabaseConnection()->sql_num_rows($res)) { + $row = $this->getDatabaseConnection()->sql_fetch_assoc($res); + $midArray['email'] = $row['email']; + $insertFields = array( + 'tstamp' => time(), + 'response_type' => -127, + 'mid' => intval($midArray['mid']), + 'rid' => intval($midArray['rid']), + 'email' => $midArray['email'], + 'rtbl' => $midArray['rtbl'], + 'return_content' => serialize($cp), + 'return_code' => intval($cp['reason']) + ); + DebugUtility::debug($insertFields); + return $this->getDatabaseConnection()->exec_INSERTquery('sys_dmail_maillog', $insertFields); + } else { + return false; + } + } + + /** + * Create connection to mail server. + * Return mailServer object or false on error + * + * @return bool|Server + */ + private function connectMailServer() + { + // check if we can connect using the given data + /** @var Server $mailServer */ + $mailServer = GeneralUtility::makeInstance( + 'Fetch\\Server', + $this->server, + (int) $this->port, + $this->service + ); + + // set mail username and password + $mailServer->setAuthentication($this->user, $this->password); + + try { + $imapStream = $mailServer->getImapStream(); + return $mailServer; + } catch (\Exception $e) { + return false; + } + } + + /** + * Get the DB global object + * + * @return \TYPO3\CMS\Core\Database\DatabaseConnection + */ + protected function getDatabaseConnection() + { + return $GLOBALS['TYPO3_DB']; + } +} diff --git a/Classes/Scheduler/AnalyzeBounceMailAdditionalFields.php b/Classes/Scheduler/AnalyzeBounceMailAdditionalFields.php new file mode 100644 index 000000000..37cb2d288 --- /dev/null +++ b/Classes/Scheduler/AnalyzeBounceMailAdditionalFields.php @@ -0,0 +1,149 @@ + + */ +class AnalyzeBounceMailAdditionalFields implements AdditionalFieldProviderInterface +{ + + public function __construct() + { + // add locallang file + $this->getLanguangeService()->includeLLFile('EXT:direct_mail/Resources/Private/Language/locallang_mod2-6.xlf'); + } + + /** + * This method is used to define new fields for adding or editing a task + * In this case, it adds an email field + * + * @param array $taskInfo reference to the array containing the info used in the add/edit form + * @param object $task when editing, reference to the current task object. Null when adding. + * @param SchedulerModuleController $schedulerModule reference to the calling object (Scheduler's BE module) + * + * @return array Array containg all the information pertaining to the additional fields + * The array is multidimensional, keyed to the task class name and each field's id + * For each field it provides an associative sub-array with the following: + * ['code'] => The HTML code for the field + * ['label'] => The label of the field (possibly localized) + * ['cshKey'] => The CSH key for the field + * ['cshLabel'] => The code of the CSH label + */ + public function getAdditionalFields(array &$taskInfo, $task, SchedulerModuleController $schedulerModule) + { + // TODO: Implement getAdditionalFields() method. + // fields: server, port, user, pw, service (imap, pop3) + $serverHTML = ''; + $portHTML = ''; + $userHTML = ''; + $passwordHTML = ''; + $maxProcessedHTML = ''; + $serviceHTML = ''; + +// TODO: add check SSL + + $additionalFields = array(); + $additionalFields['server'] = $this->createAdditionalFields('server', $serverHTML); + $additionalFields['port'] = $this->createAdditionalFields('port', $portHTML); + $additionalFields['user'] = $this->createAdditionalFields('user', $userHTML); + $additionalFields['password'] = $this->createAdditionalFields('password', $passwordHTML); + $additionalFields['service'] = $this->createAdditionalFields('service', $serviceHTML); + $additionalFields['maxProcessed'] = $this->createAdditionalFields('maxProcessed', $maxProcessedHTML); + + return $additionalFields; + } + + /** + * Takes care of saving the additional fields' values in the task's object + * + * @param array $submittedData An array containing the data submitted by the add/edit task form + * @param AbstractTask $task Reference to the scheduler backend module + * @return void + */ + public function saveAdditionalFields(array $submittedData, AbstractTask $task) + { + $task->setServer($submittedData['bounceServer']); + $task->setPort((int)$submittedData['bouncePort']); + $task->setUser($submittedData['bounceUser']); + $task->setPassword($submittedData['bouncePassword']); + $task->setService($submittedData['bounceService']); + $task->setMaxProcessed($submittedData['bounceProcessed']); + } + + /** + * Validates the additional fields' values + * + * @param array $submittedData An array containing the data submitted by the add/edit task form + * @param SchedulerModuleController $schedulerModule Reference to the scheduler backend module + * @return bool TRUE if validation was ok (or selected class is not relevant), FALSE otherwise + */ + public function validateAdditionalFields(array &$submittedData, SchedulerModuleController $schedulerModule) + { + // check if we can connect using the given data + /** @var Server $mailServer */ + $mailServer = GeneralUtility::makeInstance( + 'Fetch\\Server', + $submittedData['bounceServer'], + (int)$submittedData['bouncePort'], + $submittedData['bounceService'] + ); + + $mailServer->setAuthentication($submittedData['bounceUser'], $submittedData['bouncePassword']); + + try { + $imapStream = $mailServer->getImapStream(); + $return = true; + } catch (\Exception $e) { + $schedulerModule->addMessage( + $this->getLanguangeService()->getLL('scheduler.bounceMail.dataVerification') . + $e->getMessage(), + FlashMessage::ERROR + ); + $return = false; + } + + return $return; + } + + protected function createAdditionalFields($fieldName, $fieldHTML) + { + // create server input field + return array( + 'code' => $fieldHTML, + 'label' => $this->getLanguangeService()->getLL('scheduler.bounceMail.' . $fieldName), + 'cshKey' => $fieldName, + 'cshLabel' => $this->getLanguangeService()->getLL('scheduler.bounceMail.csh.' . $fieldName) + ); + } + + /** + * Get languange service + * + * @return LanguageService + */ + protected function getLanguangeService() + { + return $GLOBALS['LANG']; + } +} diff --git a/Resources/Private/Language/locallang_mod2-6.xlf b/Resources/Private/Language/locallang_mod2-6.xlf index 4027042b3..8c695db43 100644 --- a/Resources/Private/Language/locallang_mod2-6.xlf +++ b/Resources/Private/Language/locallang_mod2-6.xlf @@ -1021,6 +1021,45 @@ By clicking on the "Import" button below, all data will be written in tt_address Yes + + Server URL/IP + + + URL or IP of the mail server + + + Port number + + + Port number of the mail server + + + Username + + + Username to authenticate + + + Password + + + Password of the user + + + Type of mailserver + + + IMAP or POP3 + + + Number of bounce mail to be processed + + + Maximum number of bounce mail to be processed on one scheduler cycle + + + + \ No newline at end of file diff --git a/Resources/Private/Php/Fetch/.coveralls.yml b/Resources/Private/Php/Fetch/.coveralls.yml new file mode 100644 index 000000000..cbd906c6a --- /dev/null +++ b/Resources/Private/Php/Fetch/.coveralls.yml @@ -0,0 +1,3 @@ +src_dir: src +coverage_clover: build/logs/clover.xml +json_path: build/logs/coveralls-upload.json \ No newline at end of file diff --git a/Resources/Private/Php/Fetch/.gitignore b/Resources/Private/Php/Fetch/.gitignore new file mode 100644 index 000000000..75ec3873b --- /dev/null +++ b/Resources/Private/Php/Fetch/.gitignore @@ -0,0 +1,9 @@ +.vagrant +/.idea +/.settings +/.buildpath +/.project +/composer.lock +/vendor +/report +/build \ No newline at end of file diff --git a/Resources/Private/Php/Fetch/.travis.yml b/Resources/Private/Php/Fetch/.travis.yml new file mode 100644 index 000000000..96a7b6941 --- /dev/null +++ b/Resources/Private/Php/Fetch/.travis.yml @@ -0,0 +1,24 @@ +language: php + +php: + - 5.3 + - 5.4 + - 5.5 + - 5.6 + - hhvm + - hhvm-nightly + +before_script: + - composer self-update && composer install --dev + - vendor/tedivm/dovecottesting/SetupEnvironment.sh + +script: ./tests/runTests.sh + +after_script: + - php vendor/bin/coveralls -v + +matrix: + fast_finish: true + allow_failures: + - php: hhvm + - php: hhvm-nightly \ No newline at end of file diff --git a/Resources/Private/Php/Fetch/CONTRIBUTING.md b/Resources/Private/Php/Fetch/CONTRIBUTING.md new file mode 100644 index 000000000..8fe815a9d --- /dev/null +++ b/Resources/Private/Php/Fetch/CONTRIBUTING.md @@ -0,0 +1,54 @@ +# Contributions Welcome! + +Pull Requests and Community Contributions are the bread and butter of open source software. Every contribution- from bug +reports to feature requests, typos to full new features- are greatly appreciated. + + +## Important Guidelines + +* One Item Per Pull Request or Issue. This makes it much easier to review code and merge it back in, and prevents issues + with one request from blocking another. + +* Code Coverage is extremely important, and pull requests are much more likely to be accepted if testing is also improved. + New code should be properly tested, and all tests must pass. + +* Read the LICENSE document and make sure you understand it, because your code is going to be released under it. + +* Be prepared to make revisions. Don't be discouraged if you're asked to make changes, as that is just another step + towards refining the code and getting it merged back in. + +* Remember to add the relevant documentation, particular the docblock comments. + + +## Code Styling + +This project follows the PSR standards set forth by the [PHP Framework Interop Group](http://www.php-fig.org/). + +* [PSR-0: Class and file naming conventions](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md) +* [PSR-1: Basic coding standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md) +* [PSR-2: Coding style guide](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) + +All code most follow these standards to be accepted. The easiest way to accomplish this is to run php-cs-fixer once the +new changes are finished. The php-cs-fixer package is installed as a development dependency of this project. + + composer install --dev + vendor/bin/php-cs-fixer fix ./ --level="all" -vv + + +## Running the test suite + +First install dependencies using Composer. It's important to include the dev packages: + + composer install --dev + +The "runTests.sh" script runs the full test suite- phpunit, php-cs-fixer, as well as any environmental setup: + + tests/runTests.sh + +To call phpunit directly: + + vendor/bin/phpunit + +To call php-cs-fixer directly: + + vendor/bin/php-cs-fixer fix ./ --level="all" -vv --dry-run diff --git a/Resources/Private/Php/Fetch/LICENSE b/Resources/Private/Php/Fetch/LICENSE new file mode 100644 index 000000000..68caa37c6 --- /dev/null +++ b/Resources/Private/Php/Fetch/LICENSE @@ -0,0 +1,24 @@ +Copyright (c) 2009, Robert Hafner +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Stash Project nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL Robert Hafner BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/Resources/Private/Php/Fetch/README.md b/Resources/Private/Php/Fetch/README.md new file mode 100644 index 000000000..b157a49c9 --- /dev/null +++ b/Resources/Private/Php/Fetch/README.md @@ -0,0 +1,67 @@ +# Fetch [![Build Status](https://travis-ci.org/tedious/Fetch.svg?branch=master)](https://travis-ci.org/tedious/Fetch) + +[![License](http://img.shields.io/packagist/l/tedivm/fetch.svg)](https://github.com/tedious/fetch/blob/master/LICENSE) +[![Latest Stable Version](http://img.shields.io/github/release/tedious/fetch.svg)](https://packagist.org/packages/tedivm/fetch) +[![Coverage Status](http://img.shields.io/coveralls/tedious/Fetch.svg)](https://coveralls.io/r/tedious/Fetch?branch=master) +[![Total Downloads](http://img.shields.io/packagist/dt/tedivm/fetch.svg)](https://packagist.org/packages/tedivm/fetch) + +Fetch is a library for reading email and attachments, primarily using the POP +and IMAP protocols. + + +## Installing + > N.b. A note on Ubuntu 14.04 (probably other Debian-based / Apt managed systems), the install of php5-imap does not enable the extension for CLI (possibly others as well), which can cause composer to report fetch requires ext-imap + ``` +sudo ln -s /etc/php5/mods-available/imap.ini /etc/php5/cli/conf.d/30-imap.ini + ``` + +### Composer + +Installing Fetch can be done through a variety of methods, although Composer is +recommended. + +Until Fetch reaches a stable API with version 1.0 it is recommended that you +review changes before even Minor updates, although bug fixes will always be +backwards compatible. + +``` +"require": { + "tedivm/fetch": "0.6.*" +} +``` + +### Pear + +Fetch is also available through Pear. + +``` +$ pear channel-discover pear.tedivm.com +$ pear install tedivm/Fetch +``` + +### Github + +Releases of Fetch are available on [Github](https://github.com/tedious/Fetch/releases). + + +## Sample Usage + +This is just a simple code to show how to access messages by using Fetch. It uses Fetch +own autoload, but it can (and should be, if applicable) replaced with the one generated +by composer. + + + $server = new \Fetch\Server('imap.example.com', 993); + $server->setAuthentication('dummy', 'dummy'); + + + $messages = $server->getMessages(); + /** @var $message \Fetch\Message */ + foreach ($messages as $message) { + echo "Subject: {$message->getSubject()}\nBody: {$message->getMessageBody()}\n"; + } + + +## License + +Fetch is licensed under the BSD License. See the LICENSE file for details. diff --git a/Resources/Private/Php/Fetch/autoload.php b/Resources/Private/Php/Fetch/autoload.php new file mode 100644 index 000000000..97c6b0029 --- /dev/null +++ b/Resources/Private/Php/Fetch/autoload.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +spl_autoload_register(function ($class) { + $base = '/src/'; + + if (strpos($class, 'Fetch\Test') === 0) { + $base = '/tests/'; + } + + $file = __DIR__.$base.strtr($class, '\\', '/').'.php'; + if (file_exists($file)) { + require $file; + + return true; + } +}); diff --git a/Resources/Private/Php/Fetch/composer.json b/Resources/Private/Php/Fetch/composer.json new file mode 100644 index 000000000..43ca4a16f --- /dev/null +++ b/Resources/Private/Php/Fetch/composer.json @@ -0,0 +1,28 @@ +{ + "name": "tedivm/fetch", + "description": "A PHP IMAP Library", + "keywords": ["email","imap","pop3"], + "homepage": "http://github.com/tedious/Fetch", + "type": "library", + "license": "BSD-3-Clause", + "authors": [ + { + "name": "Robert Hafner", + "email": "tedivm@tedivm.com" + } + ], + "require": { + "php": ">=5.3.0", + "ext-imap": "*" + }, + "require-dev": { + "tedivm/dovecottesting": "1.2.3", + "phpunit/phpunit": "4.2.*", + "fabpot/php-cs-fixer": "0.5.*", + "satooshi/php-coveralls": "dev-master" + + }, + "autoload": { + "psr-0": {"Fetch": "src/"} + } +} diff --git a/Resources/Private/Php/Fetch/phpunit.xml.dist b/Resources/Private/Php/Fetch/phpunit.xml.dist new file mode 100644 index 000000000..26aa32392 --- /dev/null +++ b/Resources/Private/Php/Fetch/phpunit.xml.dist @@ -0,0 +1,27 @@ + + + + + + ./tests + + + + + ./src/Fetch/ + + + + + + diff --git a/Resources/Private/Php/Fetch/src/Fetch/Attachment.php b/Resources/Private/Php/Fetch/src/Fetch/Attachment.php new file mode 100644 index 000000000..431153f86 --- /dev/null +++ b/Resources/Private/Php/Fetch/src/Fetch/Attachment.php @@ -0,0 +1,234 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Fetch; + +/** + * This library is a wrapper around the Imap library functions included in php. This class wraps around an attachment + * in a message, allowing developers to easily save or display attachments. + * + * @package Fetch + * @author Robert Hafner + */ +class Attachment +{ + + /** + * This is the structure object for the piece of the message body that the attachment is located it. + * + * @var \stdClass + */ + protected $structure; + + /** + * This is the unique identifier for the message this attachment belongs to. + * + * @var int + */ + protected $messageId; + + /** + * This is the ImapResource. + * + * @var resource + */ + protected $imapStream; + + /** + * This is the id pointing to the section of the message body that contains the attachment. + * + * @var int + */ + protected $partId; + + /** + * This is the attachments filename. + * + * @var string + */ + protected $filename; + + /** + * This is the size of the attachment. + * + * @var int + */ + protected $size; + + /** + * This stores the data of the attachment so it doesn't have to be retrieved from the server multiple times. It is + * only populated if the getData() function is called and should not be directly used. + * + * @internal + * @var array + */ + protected $data; + + /** + * This function takes in an ImapMessage, the structure object for the particular piece of the message body that the + * attachment is located at, and the identifier for that body part. As a general rule you should not be creating + * instances of this yourself, but rather should get them from an ImapMessage class. + * + * @param Message $message + * @param \stdClass $structure + * @param string $partIdentifier + */ + public function __construct(Message $message, $structure, $partIdentifier = null) + { + $this->messageId = $message->getUid(); + $this->imapStream = $message->getImapBox()->getImapStream(); + $this->structure = $structure; + + if (isset($partIdentifier)) + $this->partId = $partIdentifier; + + $parameters = Message::getParametersFromStructure($structure); + + if (isset($parameters['filename'])) { + $this->filename = imap_utf8($parameters['filename']); + } elseif (isset($parameters['name'])) { + $this->filename = imap_utf8($parameters['name']); + } + + $this->size = $structure->bytes; + + $this->mimeType = Message::typeIdToString($structure->type); + + if (isset($structure->subtype)) + $this->mimeType .= '/' . strtolower($structure->subtype); + + $this->encoding = $structure->encoding; + } + + /** + * This function returns the data of the attachment. Combined with getMimeType() it can be used to directly output + * data to a browser. + * + * @return string + */ + public function getData() + { + if (!isset($this->data)) { + $messageBody = isset($this->partId) ? + imap_fetchbody($this->imapStream, $this->messageId, $this->partId, FT_UID) + : imap_body($this->imapStream, $this->messageId, FT_UID); + + $messageBody = Message::decode($messageBody, $this->encoding); + $this->data = $messageBody; + } + + return $this->data; + } + + /** + * This returns the filename of the attachment, or false if one isn't given. + * + * @return string + */ + public function getFileName() + { + return (isset($this->filename)) ? $this->filename : false; + } + + /** + * This function returns the mimetype of the attachment. + * + * @return string + */ + public function getMimeType() + { + return $this->mimeType; + } + + /** + * This returns the size of the attachment. + * + * @return int + */ + public function getSize() + { + return $this->size; + } + + /** + * This function returns the object that contains the structure of this attachment. + * + * @return \stdClass + */ + public function getStructure() + { + return $this->structure; + } + + /** + * This function saves the attachment to the passed directory, keeping the original name of the file. + * + * @param string $path + * @return bool + */ + public function saveToDirectory($path) + { + $path = rtrim($path, '/') . '/'; + + if (is_dir($path)) + return $this->saveAs($path . $this->getFileName()); + + return false; + } + + /** + * This function saves the attachment to the exact specified location. + * + * @param string $path + * @return bool + */ + public function saveAs($path) + { + $dirname = dirname($path); + if (file_exists($path)) { + if (!is_writable($path)) { + return false; + } + } elseif (!is_dir($dirname) || !is_writable($dirname)) { + return false; + } + + if (($filePointer = fopen($path, 'w')) == false) { + return false; + } + + switch ($this->encoding) { + case 3: //base64 + $streamFilter = stream_filter_append($filePointer, 'convert.base64-decode', STREAM_FILTER_WRITE); + break; + + case 4: //quoted-printable + $streamFilter = stream_filter_append($filePointer, 'convert.quoted-printable-decode', STREAM_FILTER_WRITE); + break; + + default: + $streamFilter = null; + } + + // Fix an issue causing server to throw an error + // See: https://github.com/tedious/Fetch/issues/74 for more details + $fetch = imap_fetchbody($this->imapStream, $this->messageId, $this->partId ?: 1, FT_UID); + $result = imap_savebody($this->imapStream, $filePointer, $this->messageId, $this->partId ?: 1, FT_UID); + + if ($streamFilter) { + stream_filter_remove($streamFilter); + } + + fclose($filePointer); + + return $result; + } +} diff --git a/Resources/Private/Php/Fetch/src/Fetch/Message.php b/Resources/Private/Php/Fetch/src/Fetch/Message.php new file mode 100755 index 000000000..870c78488 --- /dev/null +++ b/Resources/Private/Php/Fetch/src/Fetch/Message.php @@ -0,0 +1,797 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Fetch; + +/** + * This library is a wrapper around the Imap library functions included in php. This class represents a single email + * message as retrieved from the Imap. + * + * @package Fetch + * @author Robert Hafner + */ +class Message +{ + /** + * This is the connection/mailbox class that the email came from. + * + * @var Server + */ + protected $imapConnection; + + /** + * This is the unique identifier for the message. This corresponds to the imap "uid", which we use instead of the + * sequence number. + * + * @var int + */ + protected $uid; + + /** + * This is a reference to the Imap stream generated by 'imap_open'. + * + * @var resource + */ + protected $imapStream; + + /** + * This as an string which contains raw header information for the message. + * + * @var string + */ + protected $rawHeaders; + + /** + * This as an object which contains header information for the message. + * + * @var \stdClass + */ + protected $headers; + + /** + * This is an object which contains various status messages and other information about the message. + * + * @var \stdClass + */ + protected $messageOverview; + + /** + * This is an object which contains information about the structure of the message body. + * + * @var \stdClass + */ + protected $structure; + + /** + * This is an array with the index being imap flags and the value being a boolean specifying whether that flag is + * set or not. + * + * @var array + */ + protected $status = array(); + + /** + * This is an array of the various imap flags that can be set. + * + * @var string + */ + protected static $flagTypes = array(self::FLAG_RECENT, self::FLAG_FLAGGED, self::FLAG_ANSWERED, self::FLAG_DELETED, self::FLAG_SEEN, self::FLAG_DRAFT); + + /** + * This holds the plantext email message. + * + * @var string + */ + protected $plaintextMessage; + + /** + * This holds the html version of the email. + * + * @var string + */ + protected $htmlMessage; + + /** + * This is the date the email was sent. + * + * @var int + */ + protected $date; + + /** + * This is the subject of the email. + * + * @var string + */ + protected $subject; + + /** + * This is the size of the email. + * + * @var int + */ + protected $size; + + /** + * This is an array containing information about the address the email came from. + * + * @var string + */ + protected $from; + + /** + * This is an array containing information about the address the email was sent from. + * + * @var string + */ + protected $sender; + + /** + * This is an array of arrays that contains information about the addresses the email was sent to. + * + * @var array + */ + protected $to; + + /** + * This is an array of arrays that contains information about the addresses the email was cc'd to. + * + * @var array + */ + protected $cc; + + /** + * This is an array of arrays that contains information about the addresses the email was bcc'd to. + * + * @var array + */ + protected $bcc; + + /** + * This is an array of arrays that contain information about the addresses that should receive replies to the email. + * + * @var array + */ + protected $replyTo; + + /** + * This is an array of ImapAttachments retrieved from the message. + * + * @var Attachment[] + */ + protected $attachments = array(); + + /** + * Contains the mailbox that the message resides in. + * + * @var string + */ + protected $mailbox; + + /** + * This value defines the encoding we want the email message to use. + * + * @var string + */ + public static $charset = 'UTF-8'; + + /** + * This value defines the flag set for encoding if the mb_convert_encoding + * function can't be found, and in this case iconv encoding will be used. + * + * @var string + */ + public static $charsetFlag = '//TRANSLIT'; + + /** + * These constants can be used to easily access available flags + */ + const FLAG_RECENT = 'recent'; + const FLAG_FLAGGED = 'flagged'; + const FLAG_ANSWERED = 'answered'; + const FLAG_DELETED = 'deleted'; + const FLAG_SEEN = 'seen'; + const FLAG_DRAFT = 'draft'; + + /** + * This constructor takes in the uid for the message and the Imap class representing the mailbox the + * message should be opened from. This constructor should generally not be called directly, but rather retrieved + * through the apprioriate Imap functions. + * + * @param int $messageUniqueId + * @param Server $mailbox + */ + public function __construct($messageUniqueId, Server $connection) + { + $this->imapConnection = $connection; + $this->mailbox = $connection->getMailBox(); + $this->uid = $messageUniqueId; + $this->imapStream = $this->imapConnection->getImapStream(); + if($this->loadMessage() !== true) + throw new \RuntimeException('Message with ID ' . $messageUniqueId . ' not found.'); + } + + /** + * This function is called when the message class is loaded. It loads general information about the message from the + * imap server. + * + */ + protected function loadMessage() + { + + /* First load the message overview information */ + + if(!is_object($messageOverview = $this->getOverview())) + + return false; + + $this->subject = isset($messageOverview->subject) ? imap_utf8($messageOverview->subject) : null; + $this->date = strtotime($messageOverview->date); + $this->size = $messageOverview->size; + + foreach (self::$flagTypes as $flag) + $this->status[$flag] = ($messageOverview->$flag == 1); + + /* Next load in all of the header information */ + + $headers = $this->getHeaders(); + + if (isset($headers->to)) + $this->to = $this->processAddressObject($headers->to); + + if (isset($headers->cc)) + $this->cc = $this->processAddressObject($headers->cc); + + if (isset($headers->bcc)) + $this->bcc = $this->processAddressObject($headers->bcc); + + if (isset($headers->sender)) + $this->sender = $this->processAddressObject($headers->sender); + + $this->from = isset($headers->from) ? $this->processAddressObject($headers->from) : array(''); + $this->replyTo = isset($headers->reply_to) ? $this->processAddressObject($headers->reply_to) : $this->from; + + /* Finally load the structure itself */ + + $structure = $this->getStructure(); + + if (!isset($structure->parts)) { + // not multipart + $this->processStructure($structure); + } else { + // multipart + foreach ($structure->parts as $id => $part) + $this->processStructure($part, $id + 1); + } + + return true; + } + + /** + * This function returns an object containing information about the message. This output is similar to that over the + * imap_fetch_overview function, only instead of an array of message overviews only a single result is returned. The + * results are only retrieved from the server once unless passed true as a parameter. + * + * @param bool $forceReload + * @return \stdClass + */ + public function getOverview($forceReload = false) + { + if ($forceReload || !isset($this->messageOverview)) { + // returns an array, and since we just want one message we can grab the only result + $results = imap_fetch_overview($this->imapStream, $this->uid, FT_UID); + if ( sizeof($results) == 0 ) { + throw new \RuntimeException('Error fetching overview'); + } + $this->messageOverview = array_shift($results); + if ( ! isset($this->messageOverview->date)) { + $this->messageOverview->date = null; + } + } + + return $this->messageOverview; + } + + /** + * This function returns an object containing the raw headers of the message. + * + * @param bool $forceReload + * @return string + */ + public function getRawHeaders($forceReload = false) + { + if ($forceReload || !isset($this->rawHeaders)) { + // raw headers (since imap_headerinfo doesn't use the unique id) + $this->rawHeaders = imap_fetchheader($this->imapStream, $this->uid, FT_UID); + } + + return $this->rawHeaders; + } + + /** + * This function returns an object containing the headers of the message. This is done by taking the raw headers + * and running them through the imap_rfc822_parse_headers function. The results are only retrieved from the server + * once unless passed true as a parameter. + * + * @param bool $forceReload + * @return \stdClass + */ + public function getHeaders($forceReload = false) + { + if ($forceReload || !isset($this->headers)) { + // raw headers (since imap_headerinfo doesn't use the unique id) + $rawHeaders = $this->getRawHeaders(); + + // convert raw header string into a usable object + $headerObject = imap_rfc822_parse_headers($rawHeaders); + + // to keep this object as close as possible to the original header object we add the udate property + if (isset($headerObject->date)) { + $headerObject->udate = strtotime($headerObject->date); + } else { + $headerObject->date = null; + $headerObject->udate = null; + } + + $this->headers = $headerObject; + } + + return $this->headers; + } + + /** + * This function returns an object containing the structure of the message body. This is the same object thats + * returned by imap_fetchstructure. The results are only retrieved from the server once unless passed true as a + * parameter. + * + * @param bool $forceReload + * @return \stdClass + */ + public function getStructure($forceReload = false) + { + if ($forceReload || !isset($this->structure)) { + $this->structure = imap_fetchstructure($this->imapStream, $this->uid, FT_UID); + } + + return $this->structure; + } + + /** + * This function returns the message body of the email. By default it returns the plaintext version. If a plaintext + * version is requested but not present, the html version is stripped of tags and returned. If the opposite occurs, + * the plaintext version is given some html formatting and returned. If neither are present the return value will be + * false. + * + * @param bool $html Pass true to receive an html response. + * @return string|bool Returns false if no body is present. + */ + public function getMessageBody($html = false) + { + if ($html) { + if (!isset($this->htmlMessage) && isset($this->plaintextMessage)) { + $output = nl2br($this->plaintextMessage); + + return $output; + + } elseif (isset($this->htmlMessage)) { + return $this->htmlMessage; + } + } else { + if (!isset($this->plaintextMessage) && isset($this->htmlMessage)) { + $output = preg_replace('/\s*\/i', PHP_EOL, trim($this->htmlMessage) ); + $output = strip_tags($output); + + return $output; + } elseif (isset($this->plaintextMessage)) { + return $this->plaintextMessage; + } + } + + return false; + } + + /** + * This function returns the plain text body of the email or false if not present. + * @return string|bool Returns false if not present + */ + public function getPlainTextBody() + { + return isset($this->plaintextMessage) ? $this->plaintextMessage : false; + } + + /** + * This function returns the HTML body of the email or false if not present. + * @return string|bool Returns false if not present + */ + public function getHtmlBody() + { + return isset($this->htmlMessage) ? $this->htmlMessage : false; + } + + /** + * This function returns either an array of email addresses and names or, optionally, a string that can be used in + * mail headers. + * + * @param string $type Should be 'to', 'cc', 'bcc', 'from', 'sender', or 'reply-to'. + * @param bool $asString + * @return array|string|bool + */ + public function getAddresses($type, $asString = false) + { + $type = ( $type == 'reply-to' ) ? 'replyTo' : $type; + $addressTypes = array('to', 'cc', 'bcc', 'from', 'sender', 'replyTo'); + + if (!in_array($type, $addressTypes) || !isset($this->$type) || count($this->$type) < 1) + return false; + + if (!$asString) { + if ($type == 'from') + return $this->from[0]; + elseif ($type == 'sender') + return $this->sender[0]; + + return $this->$type; + } else { + $outputString = ''; + foreach ($this->$type as $address) { + if (isset($set)) + $outputString .= ', '; + if (!isset($set)) + $set = true; + + $outputString .= isset($address['name']) ? + $address['name'] . ' <' . $address['address'] . '>' + : $address['address']; + } + + return $outputString; + } + } + + /** + * This function returns the date, as a timestamp, of when the email was sent. + * + * @return int + */ + public function getDate() + { + return isset($this->date) ? $this->date : false; + } + + /** + * This returns the subject of the message. + * + * @return string + */ + public function getSubject() + { + return isset($this->subject) ? $this->subject : null; + } + + /** + * This function marks a message for deletion. It is important to note that the message will not be deleted form the + * mailbox until the Imap->expunge it run. + * + * @return bool + */ + public function delete() + { + return imap_delete($this->imapStream, $this->uid, FT_UID); + } + + /** + * This function returns Imap this message came from. + * + * @return Server + */ + public function getImapBox() + { + return $this->imapConnection; + } + + /** + * This function takes in a structure and identifier and processes that part of the message. If that portion of the + * message has its own subparts, those are recursively processed using this function. + * + * @param \stdClass $structure + * @param string $partIdentifier + */ + protected function processStructure($structure, $partIdentifier = null) + { + $parameters = self::getParametersFromStructure($structure); + + if ((isset($parameters['name']) || isset($parameters['filename'])) + || (isset($structure->subtype) && strtolower($structure->subtype) == 'rfc822') + ) { + $attachment = new Attachment($this, $structure, $partIdentifier); + $this->attachments[] = $attachment; + } elseif ($structure->type == 0 || $structure->type == 1) { + $messageBody = isset($partIdentifier) ? + imap_fetchbody($this->imapStream, $this->uid, $partIdentifier, FT_UID | FT_PEEK) + : imap_body($this->imapStream, $this->uid, FT_UID | FT_PEEK); + + $messageBody = self::decode($messageBody, $structure->encoding); + + if (!empty($parameters['charset']) && $parameters['charset'] !== self::$charset) { + $mb_converted = false; + if (function_exists('mb_convert_encoding')) { + if (!in_array($parameters['charset'], mb_list_encodings())) { + if ($structure->encoding === 0) { + $parameters['charset'] = 'US-ASCII'; + } else { + $parameters['charset'] = 'UTF-8'; + } + } + + $messageBody = @mb_convert_encoding($messageBody, self::$charset, $parameters['charset']); + $mb_converted = true; + } + if (!$mb_converted) { + $messageBodyConv = @iconv($parameters['charset'], self::$charset . self::$charsetFlag, $messageBody); + + if ($messageBodyConv !== false) { + $messageBody = $messageBodyConv; + } + } + } + + if (strtolower($structure->subtype) === 'plain' || ($structure->type == 1 && strtolower($structure->subtype) !== 'alternative')) { + if (isset($this->plaintextMessage)) { + $this->plaintextMessage .= PHP_EOL . PHP_EOL; + } else { + $this->plaintextMessage = ''; + } + + $this->plaintextMessage .= trim($messageBody); + } elseif (strtolower($structure->subtype) === 'html') { + if (isset($this->htmlMessage)) { + $this->htmlMessage .= '

'; + } else { + $this->htmlMessage = ''; + } + + $this->htmlMessage .= $messageBody; + } + } + + if (isset($structure->parts)) { // multipart: iterate through each part + + foreach ($structure->parts as $partIndex => $part) { + $partId = $partIndex + 1; + + if (isset($partIdentifier)) + $partId = $partIdentifier . '.' . $partId; + + $this->processStructure($part, $partId); + } + } + } + + /** + * This function takes in the message data and encoding type and returns the decoded data. + * + * @param string $data + * @param int|string $encoding + * @return string + */ + public static function decode($data, $encoding) + { + if (!is_numeric($encoding)) { + $encoding = strtolower($encoding); + } + + switch (true) { + case $encoding === 'quoted-printable': + case $encoding === 4: + return quoted_printable_decode($data); + + case $encoding === 'base64': + case $encoding === 3: + return base64_decode($data); + + default: + return $data; + } + } + + /** + * This function returns the body type that an imap integer maps to. + * + * @param int $id + * @return string + */ + public static function typeIdToString($id) + { + switch ($id) { + case 0: + return 'text'; + + case 1: + return 'multipart'; + + case 2: + return 'message'; + + case 3: + return 'application'; + + case 4: + return 'audio'; + + case 5: + return 'image'; + + case 6: + return 'video'; + + default: + case 7: + return 'other'; + } + } + + /** + * Takes in a section structure and returns its parameters as an associative array. + * + * @param \stdClass $structure + * @return array + */ + public static function getParametersFromStructure($structure) + { + $parameters = array(); + if (isset($structure->parameters)) + foreach ($structure->parameters as $parameter) + $parameters[strtolower($parameter->attribute)] = $parameter->value; + + if (isset($structure->dparameters)) + foreach ($structure->dparameters as $parameter) + $parameters[strtolower($parameter->attribute)] = $parameter->value; + + return $parameters; + } + + /** + * This function takes in an array of the address objects generated by the message headers and turns them into an + * associative array. + * + * @param array $addresses + * @return array + */ + protected function processAddressObject($addresses) + { + $outputAddresses = array(); + if (is_array($addresses)) + foreach ($addresses as $address) { + if (property_exists($address, 'mailbox') && $address->mailbox != 'undisclosed-recipients') { + $currentAddress = array(); + $currentAddress['address'] = $address->mailbox . '@' . $address->host; + if (isset($address->personal)) { + $currentAddress['name'] = $address->personal; + } + $outputAddresses[] = $currentAddress; + } + } + + return $outputAddresses; + } + + /** + * This function returns the unique id that identifies the message on the server. + * + * @return int + */ + public function getUid() + { + return $this->uid; + } + + /** + * This function returns the attachments a message contains. If a filename is passed then just that ImapAttachment + * is returned, unless + * + * @param null|string $filename + * @return array|bool|Attachment[] + */ + public function getAttachments($filename = null) + { + if (!isset($this->attachments) || count($this->attachments) < 1) + return false; + + if (!isset($filename)) + return $this->attachments; + + $results = array(); + foreach ($this->attachments as $attachment) { + if ($attachment->getFileName() == $filename) + $results[] = $attachment; + } + + switch (count($results)) { + case 0: + return false; + + case 1: + return array_shift($results); + + default: + return $results; + break; + } + } + + /** + * This function checks to see if an imap flag is set on the email message. + * + * @param string $flag Recent, Flagged, Answered, Deleted, Seen, Draft + * @return bool + */ + public function checkFlag($flag = self::FLAG_FLAGGED) + { + return (isset($this->status[$flag]) && $this->status[$flag] === true); + } + + /** + * This function is used to enable or disable one or more flags on the imap message. + * + * @param string|array $flag Flagged, Answered, Deleted, Seen, Draft + * @param bool $enable + * @throws \InvalidArgumentException + * @return bool + */ + public function setFlag($flag, $enable = true) + { + $flags = (is_array($flag)) ? $flag : array($flag); + + foreach ($flags as $i => $flag) { + $flag = ltrim(strtolower($flag), '\\'); + if (!in_array($flag, self::$flagTypes) || $flag == self::FLAG_RECENT) + throw new \InvalidArgumentException('Unable to set invalid flag "' . $flag . '"'); + + if ($enable) { + $this->status[$flag] = true; + } else { + unset($this->status[$flag]); + } + + $flags[$i] = $flag; + } + + $imapifiedFlag = '\\'.implode(' \\', array_map('ucfirst', $flags)); + + if ($enable === true) { + return imap_setflag_full($this->imapStream, $this->uid, $imapifiedFlag, ST_UID); + } else { + return imap_clearflag_full($this->imapStream, $this->uid, $imapifiedFlag, ST_UID); + } + } + + /** + * This function is used to move a mail to the given mailbox. + * + * @param $mailbox + * + * @return bool + */ + public function moveToMailBox($mailbox) + { + $currentBox = $this->imapConnection->getMailBox(); + $this->imapConnection->setMailBox($this->mailbox); + + $returnValue = imap_mail_copy($this->imapStream, $this->uid, $mailbox, CP_UID | CP_MOVE); + imap_expunge($this->imapStream); + + $this->mailbox = $mailbox; + + $this->imapConnection->setMailBox($currentBox); + + return $returnValue; + } +} diff --git a/Resources/Private/Php/Fetch/src/Fetch/Server.php b/Resources/Private/Php/Fetch/src/Fetch/Server.php new file mode 100644 index 000000000..32e57c1b3 --- /dev/null +++ b/Resources/Private/Php/Fetch/src/Fetch/Server.php @@ -0,0 +1,515 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Fetch; + +/** + * This library is a wrapper around the Imap library functions included in php. This class in particular manages a + * connection to the server (imap, pop, etc) and allows for the easy retrieval of stored messages. + * + * @package Fetch + * @author Robert Hafner + */ +class Server +{ + /** + * When SSL isn't compiled into PHP we need to make some adjustments to prevent soul crushing annoyances. + * + * @var bool + */ + public static $sslEnable = true; + + /** + * These are the flags that depend on ssl support being compiled into imap. + * + * @var array + */ + public static $sslFlags = array('ssl', 'validate-cert', 'novalidate-cert', 'tls', 'notls'); + + /** + * This is used to prevent the class from putting up conflicting tags. Both directions- key to value, value to key- + * are checked, so if "novalidate-cert" is passed then "validate-cert" is removed, and vice-versa. + * + * @var array + */ + public static $exclusiveFlags = array('validate-cert' => 'novalidate-cert', 'tls' => 'notls'); + + /** + * This is the domain or server path the class is connecting to. + * + * @var string + */ + protected $serverPath; + + /** + * This is the name of the current mailbox the connection is using. + * + * @var string + */ + protected $mailbox = ''; + + /** + * This is the username used to connect to the server. + * + * @var string + */ + protected $username; + + /** + * This is the password used to connect to the server. + * + * @var string + */ + protected $password; + + /** + * This is an array of flags that modify how the class connects to the server. Examples include "ssl" to enforce a + * secure connection or "novalidate-cert" to allow for self-signed certificates. + * + * @link http://us.php.net/manual/en/function.imap-open.php + * @var array + */ + protected $flags = array(); + + /** + * This is the port used to connect to the server + * + * @var int + */ + protected $port; + + /** + * This is the set of options, represented by a bitmask, to be passed to the server during connection. + * + * @var int + */ + protected $options = 0; + + /** + * This is the set of connection parameters + * + * @var array + */ + protected $params = array(); + + /** + * This is the resource connection to the server. It is required by a number of imap based functions to specify how + * to connect. + * + * @var resource + */ + protected $imapStream; + + /** + * This is the name of the service currently being used. Imap is the default, although pop3 and nntp are also + * options + * + * @var string + */ + protected $service = 'imap'; + + /** + * This constructor takes the location and service thats trying to be connected to as its arguments. + * + * @param string $serverPath + * @param null|int $port + * @param null|string $service + */ + public function __construct($serverPath, $port = 143, $service = 'imap') + { + $this->serverPath = $serverPath; + + $this->port = $port; + + switch ($port) { + case 143: + $this->setFlag('novalidate-cert'); + break; + + case 993: + $this->setFlag('ssl'); + break; + } + + $this->service = $service; + } + + /** + * This function sets the username and password used to connect to the server. + * + * @param string $username + * @param string $password + * @param bool $tryFasterAuth tries to auth faster by disabling GSSAPI & NTLM auth methods (set to false if you use either of these auth methods) + */ + public function setAuthentication($username, $password, $tryFasterAuth=true) + { + $this->username = $username; + $this->password = $password; + if ($tryFasterAuth) { + $this->setParam('DISABLE_AUTHENTICATOR', array('GSSAPI','NTLM')); + } + } + + /** + * This function sets the mailbox to connect to. + * + * @param string $mailbox + * @return bool + */ + public function setMailBox($mailbox = '') + { + if (!$this->hasMailBox($mailbox)) { + return false; + } + + $this->mailbox = $mailbox; + if (isset($this->imapStream)) { + $this->setImapStream(); + } + + return true; + } + + public function getMailBox() + { + return $this->mailbox; + } + + /** + * This function sets or removes flag specifying connection behavior. In many cases the flag is just a one word + * deal, so the value attribute is not required. However, if the value parameter is passed false it will clear that + * flag. + * + * @param string $flag + * @param null|string|bool $value + */ + public function setFlag($flag, $value = null) + { + if (!self::$sslEnable && in_array($flag, self::$sslFlags)) + return; + + if (isset(self::$exclusiveFlags[$flag])) { + $kill = self::$exclusiveFlags[$flag]; + } elseif ($index = array_search($flag, self::$exclusiveFlags)) { + $kill = $index; + } + + if (isset($kill) && false !== $index = array_search($kill, $this->flags)) + unset($this->flags[$index]); + + $index = array_search($flag, $this->flags); + if (isset($value) && $value !== true) { + if ($value == false && $index !== false) { + unset($this->flags[$index]); + } elseif ($value != false) { + $match = preg_grep('/' . $flag . '/', $this->flags); + if (reset($match)) { + $this->flags[key($match)] = $flag . '=' . $value; + } else { + $this->flags[] = $flag . '=' . $value; + } + } + } elseif ($index === false) { + $this->flags[] = $flag; + } + } + + /** + * This funtion is used to set various options for connecting to the server. + * + * @param int $bitmask + * @throws \Exception + */ + public function setOptions($bitmask = 0) + { + if (!is_numeric($bitmask)) + throw new \RuntimeException('Function requires numeric argument.'); + + $this->options = $bitmask; + } + + /** + * This function is used to set connection parameters + * + * @param string $key + * @param string $value + */ + public function setParam($key, $value) + { + $this->params[$key] = $value; + } + + /** + * This function gets the current saved imap resource and returns it. + * + * @return resource + */ + public function getImapStream() + { + if (empty($this->imapStream)) + $this->setImapStream(); + + return $this->imapStream; + } + + /** + * This function takes in all of the connection date (server, port, service, flags, mailbox) and creates the string + * thats passed to the imap_open function. + * + * @return string + */ + public function getServerString() + { + $mailboxPath = $this->getServerSpecification(); + + if (isset($this->mailbox)) + $mailboxPath .= $this->mailbox; + + return $mailboxPath; + } + + /** + * Returns the server specification, without adding any mailbox. + * + * @return string + */ + protected function getServerSpecification() + { + $mailboxPath = '{' . $this->serverPath; + + if (isset($this->port)) + $mailboxPath .= ':' . $this->port; + + if ($this->service != 'imap') + $mailboxPath .= '/' . $this->service; + + foreach ($this->flags as $flag) { + $mailboxPath .= '/' . $flag; + } + + $mailboxPath .= '}'; + + return $mailboxPath; + } + + /** + * This function creates or reopens an imapStream when called. + * + */ + protected function setImapStream() + { + if (!empty($this->imapStream)) { + if (!imap_reopen($this->imapStream, $this->getServerString(), $this->options, 1)) + throw new \RuntimeException(imap_last_error()); + } else { + $imapStream = @imap_open($this->getServerString(), $this->username, $this->password, $this->options, 1, $this->params); + + if ($imapStream === false) + throw new \RuntimeException(imap_last_error()); + + $this->imapStream = $imapStream; + } + } + + /** + * This returns the number of messages that the current mailbox contains. + * + * @param string $mailbox + * @return int + */ + public function numMessages($mailbox='') + { + $cnt = 0; + if ($mailbox==='') { + $cnt = imap_num_msg($this->getImapStream()); + } elseif ($this->hasMailbox($mailbox) && $mailbox !== '') { + $oldMailbox = $this->getMailBox(); + $this->setMailbox($mailbox); + $cnt = $this->numMessages(); + $this->setMailbox($oldMailbox); + } + + return ((int) $cnt); + } + + /** + * This function returns an array of ImapMessage object for emails that fit the criteria passed. The criteria string + * should be formatted according to the imap search standard, which can be found on the php "imap_search" page or in + * section 6.4.4 of RFC 2060 + * + * @link http://us.php.net/imap_search + * @link http://www.faqs.org/rfcs/rfc2060 + * @param string $criteria + * @param null|int $limit + * @return array An array of ImapMessage objects + */ + public function search($criteria = 'ALL', $limit = null) + { + if ($results = imap_search($this->getImapStream(), $criteria, SE_UID)) { + if (isset($limit) && count($results) > $limit) + $results = array_slice($results, 0, $limit); + + $messages = array(); + + foreach ($results as $messageId) + $messages[] = new Message($messageId, $this); + + return $messages; + } else { + return array(); + } + } + + /** + * This function returns the recently received emails as an array of ImapMessage objects. + * + * @param null|int $limit + * @return array An array of ImapMessage objects for emails that were recently received by the server. + */ + public function getRecentMessages($limit = null) + { + return $this->search('Recent', $limit); + } + + /** + * Returns the emails in the current mailbox as an array of ImapMessage objects. + * + * @param null|int $limit + * @return Message[] + */ + public function getMessages($limit = null) + { + $numMessages = $this->numMessages(); + + if (isset($limit) && is_numeric($limit) && $limit < $numMessages) + $numMessages = $limit; + + if ($numMessages < 1) + return array(); + + $stream = $this->getImapStream(); + $messages = array(); + for ($i = 1; $i <= $numMessages; $i++) { + $uid = imap_uid($stream, $i); + $messages[] = new Message($uid, $this); + } + + return $messages; + } + + /** + * Returns the emails in the current mailbox as an array of ImapMessage objects + * ordered by some ordering + * + * @see http://php.net/manual/en/function.imap-sort.php + * @param int $orderBy + * @param bool $reverse + * @param int $limit + * @return Message[] + */ + public function getOrderedMessages($orderBy, $reverse, $limit) + { + $msgIds = imap_sort($this->getImapStream(), $orderBy, $reverse ? 1 : 0, SE_UID); + + return array_map(array($this, 'getMessageByUid'), array_slice($msgIds, 0, $limit)); + } + + /** + * Returns the requested email or false if it is not found. + * + * @param int $uid + * @return Message|bool + */ + public function getMessageByUid($uid) + { + try { + $message = new \Fetch\Message($uid, $this); + + return $message; + } catch (\Exception $e) { + return false; + } + } + + /** + * This function removes all of the messages flagged for deletion from the mailbox. + * + * @return bool + */ + public function expunge() + { + return imap_expunge($this->getImapStream()); + } + + /** + * Checks if the given mailbox exists. + * + * @param $mailbox + * + * @return bool + */ + public function hasMailBox($mailbox) + { + return (boolean) $this->getMailBoxDetails($mailbox); + } + + /** + * Return information about the mailbox or mailboxes + * + * @param $mailbox + * + * @return array + */ + public function getMailBoxDetails($mailbox) + { + return imap_getmailboxes( + $this->getImapStream(), + $this->getServerString(), + $this->getServerSpecification() . $mailbox + ); + } + + /** + * Creates the given mailbox. + * + * @param $mailbox + * + * @return bool + */ + public function createMailBox($mailbox) + { + return imap_createmailbox($this->getImapStream(), $this->getServerSpecification() . $mailbox); + } + + /** + * List available mailboxes + * + * @param string $pattern + * + * @return array + */ + public function listMailBoxes($pattern = '*') + { + return imap_list($this->getImapStream(), $this->getServerSpecification(), $pattern); + } + + /** + * Deletes the given mailbox. + * + * @param $mailbox + * + * @return bool + */ + public function deleteMailBox($mailbox) + { + return imap_deletemailbox($this->getImapStream(), $this->getServerSpecification() . $mailbox); + } +} diff --git a/Resources/Private/Php/Fetch/tests/Fetch/Test/AttachmentTest.php b/Resources/Private/Php/Fetch/tests/Fetch/Test/AttachmentTest.php new file mode 100644 index 000000000..ffec66b9f --- /dev/null +++ b/Resources/Private/Php/Fetch/tests/Fetch/Test/AttachmentTest.php @@ -0,0 +1,118 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Fetch\Test; + +/** + * @package Fetch + * @author Robert Hafner + */ +class AttachmentTest extends \PHPUnit_Framework_TestCase +{ + + public static function getAttachments($MessageId) + { + $server = ServerTest::getServer(); + $message = new \Fetch\Message($MessageId, $server); + $attachments = $message->getAttachments(); + $returnAttachments = array(); + foreach($attachments as $attachment) + $returnAttachments[$attachment->getFileName()] = $attachment; + + return $returnAttachments; + } + + public function testGetData() + { + $attachments = static::getAttachments('6'); + + $attachment_RCA = $attachments['RCA_Indian_Head_test_pattern.JPG.zip']; + $md5_RCA = '3e9b6f02551590a7bcfff5d50b5b7b20'; + $this->assertEquals($md5_RCA, md5($attachment_RCA->getData())); + + $attachment_TestCard = $attachments['Test_card.png.zip']; + $md5_TestCard = '94c40bd83fbfa03b29bf1811f9aaccea'; + $this->assertEquals($md5_TestCard, md5($attachment_TestCard->getData())); + } + + public function testGetMimeType() + { + $attachments = static::getAttachments('6'); + + $attachment_RCA = $attachments['RCA_Indian_Head_test_pattern.JPG.zip']; + $mimetype_RCA = 'application/zip'; + $this->assertEquals($mimetype_RCA, $attachment_RCA->getMimeType()); + + $attachment_TestCard = $attachments['Test_card.png.zip']; + $mimetype_TestCard = 'application/zip'; + $this->assertEquals($mimetype_TestCard, $attachment_TestCard->getMimeType()); + } + + public function testGetSize() + { + $attachments = static::getAttachments('6'); + + $attachment_RCA = $attachments['RCA_Indian_Head_test_pattern.JPG.zip']; + $size_RCA = 378338; + $this->assertEquals($size_RCA, $attachment_RCA->getSize()); + + $attachment_TestCard = $attachments['Test_card.png.zip']; + $size_TestCard = 32510; + $this->assertEquals($size_TestCard, $attachment_TestCard->getSize()); + } + + public function testGetStructure() + { + $attachments = static::getAttachments('6'); + + $attachment_RCA = $attachments['RCA_Indian_Head_test_pattern.JPG.zip']; + $structure_RCA = $attachment_RCA->getStructure(); + + $this->assertObjectHasAttribute('type', $structure_RCA); + $this->assertEquals(3, $structure_RCA->type); + + $this->assertObjectHasAttribute('subtype', $structure_RCA); + $this->assertEquals('ZIP', $structure_RCA->subtype); + + $this->assertObjectHasAttribute('bytes', $structure_RCA); + $this->assertEquals(378338, $structure_RCA->bytes); + } + + public function testSaveToDirectory() + { + $attachments = static::getAttachments('6'); + + $attachment_RCA = $attachments['RCA_Indian_Head_test_pattern.JPG.zip']; + + $tmpdir = rtrim(sys_get_temp_dir(), '/') . '/'; + $filepath = $tmpdir . 'RCA_Indian_Head_test_pattern.JPG.zip'; + + $this->assertTrue($attachment_RCA->saveToDirectory($tmpdir)); + + $this->assertFileExists($filepath); + $this->assertEquals(md5(file_get_contents($filepath)), md5($attachment_RCA->getData())); + + $attachments = static::getAttachments('6'); + $attachment_RCA = $attachments['RCA_Indian_Head_test_pattern.JPG.zip']; + $this->assertFalse($attachment_RCA->saveToDirectory('/'), 'Returns false when attempting to save without filesystem permission.'); + + $attachments = static::getAttachments('6'); + $attachment_RCA = $attachments['RCA_Indian_Head_test_pattern.JPG.zip']; + $this->assertFalse($attachment_RCA->saveToDirectory($filepath), 'Returns false when attempting to save over a file.'); + } + + public static function tearDownAfterClass() + { + $tmpdir = rtrim(sys_get_temp_dir(), '/') . '/'; + $filepath = $tmpdir . 'RCA_Indian_Head_test_pattern.JPG.zip'; + unlink($filepath); + } +} diff --git a/Resources/Private/Php/Fetch/tests/Fetch/Test/MessageTest.php b/Resources/Private/Php/Fetch/tests/Fetch/Test/MessageTest.php new file mode 100644 index 000000000..0cb9a7637 --- /dev/null +++ b/Resources/Private/Php/Fetch/tests/Fetch/Test/MessageTest.php @@ -0,0 +1,286 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Fetch\Test; +use Fetch\Message; + +/** + * @package Fetch + * @author Robert Hafner + */ +class MessageTest extends \PHPUnit_Framework_TestCase +{ + public static function getMessage($id) + { + $server = ServerTest::getServer(); + + return new \Fetch\Message($id, $server); + } + + public function testConstructMessage() + { + $message = static::getMessage(3); + $this->assertInstanceOf('\Fetch\Message', $message); + } + + public function testGetOverview() + { + $message = static::getMessage(3); + $overview = $message->getOverview(); + $this->assertEquals('Welcome', $overview->subject, 'Subject available from overview'); + $this->assertEquals('tedivm@tedivm.com', $overview->from, 'From available from overview'); + $this->assertEquals('testuser@tedivm.com', $overview->to, 'To available from overview'); + $this->assertEquals(1465, $overview->size, 'Size available from overview'); + $this->assertEquals(0, $overview->flagged, 'Flagged available from overview'); + $this->assertEquals(1, $overview->seen, 'Seen available from overview'); + } + + public function testGetHeaders() + { + $message = static::getMessage(3); + $headers = $message->getHeaders(); + $this->assertEquals('Sun, 1 Dec 2013 21:14:03 -0800 (PST)', $headers->date, 'Headers contain the right date.'); + $this->assertEquals('testuser@tedivm.com', $headers->toaddress, 'Headers contain toaddress.'); + $this->assertEquals('tedivm@tedivm.com', $headers->fromaddress, 'Headers contain fromaddress'); + } + + public function testGetStructure() + { + + } + + public function testGetMessageBody() + { + // easiest way to deal with php encoding issues is simply not to. + $plaintextTest = 'f9377a89c9c935463a2b35c92dd61042'; + $convertedHtmlTest = '11498bcf191900d634ff8772a64ca523'; + $pureHtmlTest = '6a366ddecf080199284146d991d52169'; + + $message = static::getMessage(3); + $messageNonHTML = $message->getMessageBody(); + $this->assertEquals($plaintextTest, md5($messageNonHTML), 'Message returns as plaintext.'); + + $messageHTML = $message->getMessageBody(true); + $this->assertEquals($convertedHtmlTest, md5($messageHTML), 'Message converts from plaintext to HTML when requested.'); + + $message = static::getMessage(4); + $messageHTML = $message->getMessageBody(true); + $this->assertEquals($pureHtmlTest, md5($messageHTML), 'Message returns as HTML.'); + + } + + public function testGetPlainTextBody() + { + // easiest way to deal with php encoding issues is simply not to. + $plaintextTest1 = 'f9377a89c9c935463a2b35c92dd61042'; + $plaintextTest2 = '0b8fc9b534a1789f1071f996f238a07a'; + $plaintextTest3 = 'd41d8cd98f00b204e9800998ecf8427e'; + + $message = static::getMessage(3); + $messagePlainText = $message->getPlainTextBody(); + $this->assertEquals($plaintextTest1, md5($messagePlainText), 'Message returns as plaintext.'); + + $message = static::getMessage(4); + $messagePlainText = $message->getPlainTextBody(); + $this->assertEquals($plaintextTest2, md5($messagePlainText), 'Message returns as plaintext.'); + + $message = static::getMessage(6); + $messagePlainText = $message->getPlainTextBody(); + $this->assertEquals($plaintextTest3, md5($messagePlainText), 'Message does not return as plaintext.'); + + } + + public function testGetHtmlBody() + { + // easiest way to deal with php encoding issues is simply not to. + $HtmlTest1 = 'd41d8cd98f00b204e9800998ecf8427e'; + $HtmlTest2 = '6a366ddecf080199284146d991d52169'; + + $message = static::getMessage(3); + $messageHtml = $message->getHtmlBody(); + $this->assertEquals($HtmlTest1, md5($messageHtml), 'Message does not return as HTML.'); + + $message = static::getMessage(4); + $messageHtml = $message->getHtmlBody(); + $this->assertEquals($HtmlTest2, md5($messageHtml), 'Message returns as HTML.'); + + } + + public function testGetAddresses() + { + $message = static::getMessage(3); + + $addresses = $message->getAddresses('to'); + $this->assertEquals('testuser@tedivm.com', $addresses[0]['address'], 'Retrieving to user from address array.'); + + $addressString = $message->getAddresses('to', true); + $this->assertEquals('testuser@tedivm.com', $addressString, 'Returning To address as string.'); + + $addresses = $message->getAddresses('from'); + $this->assertEquals('tedivm@tedivm.com', $addresses['address'], 'Returning From address as an address array.'); + + $addressString = $message->getAddresses('from', true); + $this->assertEquals('tedivm@tedivm.com', $addressString, 'Returning From address as string.'); + } + + public function testGetDate() + { + $message = static::getMessage(3); + $this->assertEquals(1385961243, $message->getDate(), 'Returns date as timestamp.'); + } + + public function testGetSubject() + { + $message = static::getMessage(3); + $this->assertEquals('Welcome', $message->getSubject(), 'Returns Subject.'); + } + + public function testDelete() + { + + } + + public function testGetImapBox() + { + $server = ServerTest::getServer(); + $message = new \Fetch\Message('3', $server); + $this->assertEquals($server, $message->getImapBox(), 'getImapBox returns Server used to create Message.'); + } + + public function testGetUid() + { + $message = static::getMessage('3'); + $this->assertEquals(3, $message->getUid(), 'Message returns UID'); + } + + public function testGetAttachments() + { + $messageWithoutAttachments = static::getMessage('3'); + $this->assertFalse($messageWithoutAttachments->getAttachments(), 'getAttachments returns false when no attachments present.'); + + $messageWithAttachments = static::getMessage('6'); + $attachments = $messageWithAttachments->getAttachments(); + $this->assertCount(2, $attachments); + foreach($attachments as $attachment) + $this->assertInstanceOf('\Fetch\Attachment', $attachment, 'getAttachments returns Fetch\Attachment objects.'); + + $attachment = $messageWithAttachments->getAttachments('Test_card.png.zip'); + $this->assertInstanceOf('\Fetch\Attachment', $attachment, 'getAttachment returns specified Fetch\Attachment object.'); + } + + public function testCheckFlag() + { + $message = static::getMessage('3'); + $this->assertFalse($message->checkFlag('flagged')); + $this->assertTrue($message->checkFlag('seen')); + } + + public function testSetFlag() + { + $message = static::getMessage('3'); + $this->assertFalse($message->checkFlag('answered'), 'Message is not answered.'); + + $this->assertTrue($message->setFlag('answered'), 'setFlag returned true.'); + $this->assertTrue($message->checkFlag('answered'), 'Message was successfully answered.'); + + $this->assertTrue($message->setFlag('answered', false), 'setFlag returned true.'); + $this->assertFalse($message->checkFlag('answered'), 'Message was successfully unanswered.'); + + $message = static::getMessage('2'); + $this->assertFalse($message->checkFlag('flagged'), 'Message is not flagged.'); + + $this->assertTrue($message->setFlag('flagged'), 'setFlag returned true.'); + $this->assertTrue($message->checkFlag('flagged'), 'Message was successfully flagged.'); + + $message = static::getMessage('2'); + $this->assertTrue($message->setFlag('flagged', false), 'setFlag returned true.'); + $this->assertFalse($message->checkFlag('flagged'), 'Message was successfully unflagged.'); + } + + public function testMoveToMailbox() + { + $server = ServerTest::getServer(); + + // Testing by moving message from "Test Folder" to "Sent" + + // Count Test Folder + $testFolderNumStart = $server->numMessages('Test Folder'); + $server->setMailbox('Test Folder'); + $this->assertEquals($testFolderNumStart, $server->numMessages(), 'Server presents consistent information between numMessages when mailbox set and directly queried for number of messages'); + + // Get message from Test Folder + $message = current($server->getMessages(1)); + $this->assertInstanceOf('\Fetch\Message', $message, 'Server returned Message.'); + + // Switch to Sent folder, count messages + $sentFolderNumStart = $server->numMessages('Sent'); + $server->setMailbox('Sent'); + $this->assertEquals($sentFolderNumStart, $server->numMessages(), 'Server presents consistent information between numMessages when mailbox set and directly queried for number of messages'); + + // Switch to "Flagged" folder in order to test that function properly returns to it + $this->assertTrue($server->setMailBox('Flagged Email')); + // Move the message! + $this->assertTrue($message->moveToMailBox('Sent')); + // Make sure we're still in the same folder + $this->assertEquals('Flagged Email', $server->getMailBox(), 'Returned Server back to right mailbox.'); + $this->assertAttributeEquals('Sent', 'mailbox', $message, 'Message mailbox changed to new location.'); + // Make sure Test Folder lost a message + $this->assertTrue($server->setMailBox('Test Folder')); + $this->assertEquals($testFolderNumStart - 1, $server->numMessages(), 'Message moved out of Test Folder.'); + // Make sure Sent folder gains one + $this->assertTrue($server->setMailBox('Sent')); + $this->assertEquals($sentFolderNumStart + 1, $server->numMessages(), 'Message moved into Sent Folder.'); + } + + public function testDecode() + { + $quotedPrintableDecoded = "Now's the time for all folk to come to the aid of their country."; + $quotedPrintable = <<<'ENCODE' +Now's the time = +for all folk to come= + to the aid of their country. +ENCODE; + $this->assertEquals($quotedPrintableDecoded, Message::decode($quotedPrintable, 'quoted-printable'), 'Decodes quoted printable'); + $this->assertEquals($quotedPrintableDecoded, Message::decode($quotedPrintable, 4), 'Decodes quoted printable'); + + $testString = 'This is a test string'; + $base64 = base64_encode($testString); + $this->assertEquals($testString, Message::decode($base64, 'base64'), 'Decodes quoted base64'); + $this->assertEquals($testString, Message::decode($base64, 3), 'Decodes quoted base64'); + + $notEncoded = '> w - www.somesite.com.au'; + $this->assertEquals($notEncoded, Message::decode($notEncoded, 0), 'Nothing to decode'); + } + + public function testTypeIdToString() + { + $types = array(); + $types[0] = 'text'; + $types[1] = 'multipart'; + $types[2] = 'message'; + $types[3] = 'application'; + $types[4] = 'audio'; + $types[5] = 'image'; + $types[6] = 'video'; + $types[7] = 'other'; + $types[8] = 'other'; + $types[32] = 'other'; + + foreach($types as $id => $type) + $this->assertEquals($type, Message::typeIdToString($id)); + } + + public function testGetParametersFromStructure() + { + + } + +} diff --git a/Resources/Private/Php/Fetch/tests/Fetch/Test/ServerTest.php b/Resources/Private/Php/Fetch/tests/Fetch/Test/ServerTest.php new file mode 100644 index 000000000..a90ee7f67 --- /dev/null +++ b/Resources/Private/Php/Fetch/tests/Fetch/Test/ServerTest.php @@ -0,0 +1,234 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Fetch\Test; + +use Fetch\Server; + +/** + * @package Fetch + * @author Robert Hafner + */ +class ServerTest extends \PHPUnit_Framework_TestCase +{ + public static $num_messages_inbox = 12; + + /** + * @dataProvider flagsDataProvider + * @param string $expected server string with %host% placeholder + * @param integer $port to use (needed to test behavior on port 143 and 993 from constructor) + * @param array $flags to set/unset ($flag => $value) + */ + public function testFlags($expected, $port, $flags) + { + $server = new Server(TESTING_SERVER_HOST, $port); + + foreach ($flags as $flag => $value) { + $server->setFlag($flag, $value); + } + + $this->assertEquals(str_replace('%host%', TESTING_SERVER_HOST, $expected), $server->getServerString()); + } + + public function testFlagOverwrite() + { + $server = static::getServer(); + + $server->setFlag('TestFlag', 'true'); + $this->assertAttributeContains('TestFlag=true', 'flags', $server); + + $server->setFlag('TestFlag', 'false'); + $this->assertAttributeContains('TestFlag=false', 'flags', $server); + } + + public function flagsDataProvider() + { + return array( + array('{%host%:143/novalidate-cert}', 143, array()), + array('{%host%:143/validate-cert}', 143, array('validate-cert' => true)), + array('{%host%:143}', 143, array('novalidate-cert' => false)), + array('{%host%:993/ssl}', 993, array()), + array('{%host%:993}', 993, array('ssl' => false)), + array('{%host%:100/tls}', 100, array('tls' => true)), + array('{%host%:100/tls}', 100, array('tls' => true, 'tls' => true)), + array('{%host%:100/notls}', 100, array('tls' => true, 'notls' => true)), + array('{%host%:100}', 100, array('ssl' => true, 'ssl' => false)), + array('{%host%:100/user=foo}', 100, array('user' => 'foo')), + array('{%host%:100/user=foo}', 100, array('user' => 'foo', 'user' => 'foo')), + array('{%host%:100/user=bar}', 100, array('user' => 'foo', 'user' => 'bar')), + array('{%host%:100}', 100, array('user' => 'foo', 'user' => false)), + ); + } + + /** + * @dataProvider connectionDataProvider + * @param integer $port to use (needed to test behavior on port 143 and 993 from constructor) + * @param array $flags to set/unset ($flag => $value) + * @param string $message Assertion message + */ + public function testConnection($port, $flags, $message) + { + $server = new Server(TESTING_SERVER_HOST, $port); + $server->setAuthentication(TEST_USER, TEST_PASSWORD); + + foreach ($flags as $flag => $value) { + $server->setFlag($flag, $value); + } + + $imapSteam = $server->getImapStream(); + $this->assertInternalType('resource', $imapSteam, $message); + } + + public function connectionDataProvider() + { + return array( + array(143, array(), 'Connects with default settings.'), + array(993, array('novalidate-cert' => true), 'Connects over SSL (self signed).'), + ); + } + + public function testNumMessages() + { + $server = static::getServer(); + $numMessages = $server->numMessages(); + $this->assertEquals(self::$num_messages_inbox, $numMessages); + $this->assertEquals(0, $server->numMessages( 'DOESNOTEXIST'.time() ) ); + } + + public function testGetMessages() + { + $server = static::getServer(); + $messages = $server->getMessages(5); + + $this->assertCount(5, $messages, 'Five messages returned'); + foreach ($messages as $message) { + $this->assertInstanceOf('\Fetch\Message', $message, 'Returned values are Messages'); + } + } + + public function testGetMessagesOrderedByDateAsc() + { + $server = static::getServer(); + $messages = $server->getOrderedMessages(SORTDATE, false, 2); + + $this->assertCount(2, $messages, 'Two messages returned'); + $this->assertGreaterThan($messages[0]->getDate(), $messages[1]->getDate(), 'Messages in ascending order'); + } + + public function testGetMessagesOrderedByDateDesc() + { + $server = static::getServer(); + $messages = $server->getOrderedMessages(SORTDATE, true, 2); + + $this->assertCount(2, $messages, 'Two messages returned'); + $this->assertLessThan($messages[0]->getDate(), $messages[1]->getDate(), 'Messages in descending order'); + } + + public function testGetMailBox() + { + $server = static::getServer(); + $this->assertEquals('', $server->getMailBox()); + $this->assertTrue($server->setMailBox('Sent')); + $this->assertEquals('Sent', $server->getMailBox()); + } + + public function testSetMailBox() + { + $server = static::getServer(); + + $this->assertTrue($server->setMailBox('Sent')); + $this->assertEquals('Sent', $server->getMailBox()); + + $this->assertTrue($server->setMailBox('Flagged Email')); + $this->assertEquals('Flagged Email', $server->getMailBox()); + + $this->assertFalse($server->setMailBox('Cheese')); + + $this->assertTrue($server->setMailBox('')); + $this->assertEquals('', $server->getMailBox()); + } + + public function testHasMailBox() + { + $server = static::getServer(); + + $this->assertTrue($server->hasMailBox('Sent'), 'Has mailbox "Sent"'); + $this->assertTrue($server->hasMailBox('Flagged Email'), 'Has mailbox "Flagged Email"'); + $this->assertFalse($server->hasMailBox('Cheese'), 'Does not have mailbox "Cheese"'); + } + + public function testListMailBoxes() + { + $server = static::getServer(); + $spec = sprintf('{%s:143/novalidate-cert}', TESTING_SERVER_HOST); + + $list = $server->listMailboxes('*'); + $this->assertContains($spec.'Sent', $list, 'Has mailbox "Sent"'); + $this->assertNotContains($spec.'Cheese', $list, 'Does not have mailbox "Cheese"'); + } + + public function testCreateMailbox() + { + $server = static::getServer(); + + $this->assertFalse($server->hasMailBox('Cheese'), 'Does not have mailbox "Cheese"'); + $this->assertTrue($server->createMailBox('Cheese'), 'createMailbox returns true.'); + $this->assertTrue($server->hasMailBox('Cheese'), 'Mailbox "Cheese" was created'); + } + + public function testDeleteMailbox() + { + $server = static::getServer(); + $this->assertTrue($server->hasMailBox('Cheese'), 'Does have mailbox "Cheese"'); + $this->assertTrue($server->deleteMailBox('Cheese'), 'deleteMailBox returns true.'); + $this->assertFalse($server->hasMailBox('Cheese'), 'Mailbox "Cheese" was deleted'); + } + + /** + * @expectedException \RuntimeException + */ + public function testSetOptionsException() + { + $server = static::getServer(); + $server->setOptions('purple'); + } + + public function testSetOptions() + { + $server = static::getServer(); + $server->setOptions(5); + $this->assertAttributeEquals(5, 'options', $server); + } + + public function testExpunge() + { + $server = static::getServer(); + $message = $server->getMessageByUid(12); + + $this->assertInstanceOf('\Fetch\Message', $message, 'Message exists'); + + $message->delete(); + + $this->assertInstanceOf('\Fetch\Message', $server->getMessageByUid(12), 'Message still present after being deleted but before being expunged.'); + + $server->expunge(); + + $this->assertFalse($server->getMessageByUid(12), 'Message successfully expunged'); + } + + public static function getServer() + { + $server = new Server(TESTING_SERVER_HOST, 143); + $server->setAuthentication(TEST_USER, TEST_PASSWORD); + + return $server; + } +} diff --git a/Resources/Private/Php/Fetch/tests/bootstrap.php b/Resources/Private/Php/Fetch/tests/bootstrap.php new file mode 100644 index 000000000..c656c67fc --- /dev/null +++ b/Resources/Private/Php/Fetch/tests/bootstrap.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +error_reporting(-1); + +define('TESTING', true); +define('TEST_USER', 'testuser'); +define('TEST_PASSWORD', 'applesauce'); + +date_default_timezone_set('UTC'); + +if (getenv('TRAVIS')) { + define('TESTING_ENVIRONMENT', 'TRAVIS'); + define('TESTING_SERVER_HOST', '127.0.0.1'); +} else { + define('TESTING_ENVIRONMENT', 'VAGRANT'); + define('TESTING_SERVER_HOST', '172.31.1.2'); +} + +$filename = __DIR__ .'/../vendor/autoload.php'; + +if (!file_exists($filename)) { + echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" . PHP_EOL; + echo " You need to execute `composer install` before running the tests. " . PHP_EOL; + echo " Vendors are required for complete test execution. " . PHP_EOL; + echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" . PHP_EOL . PHP_EOL; + $filename = __DIR__ .'/../autoload.php'; + require_once $filename; +} else { + $loader = require $filename; + $loader->add('Fetch\\Test', __DIR__); +} diff --git a/Resources/Private/Php/Fetch/tests/runTests.sh b/Resources/Private/Php/Fetch/tests/runTests.sh new file mode 100755 index 000000000..0547fd730 --- /dev/null +++ b/Resources/Private/Php/Fetch/tests/runTests.sh @@ -0,0 +1,17 @@ +#/usr/bin/env/sh +set -e + +if [ ! -n "$TRAVIS" ]; then + ./vendor/tedivm/dovecottesting/SetupEnvironment.sh + sleep 5 +fi + +echo 'Running unit tests.' +./vendor/bin/phpunit --verbose --coverage-clover build/logs/clover.xml + +echo '' +echo '' +echo '' +echo 'Testing for Coding Styling Compliance.' +echo 'All code should follow PSR standards.' +./vendor/bin/php-cs-fixer fix ./ --level="all" -vv --dry-run \ No newline at end of file diff --git a/composer.json b/composer.json index bcd0abb86..9deee990a 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,8 @@ }, "autoload": { "psr-4": { - "DirectMailTeam\\DirectMail\\": "Classes" + "DirectMailTeam\\DirectMail\\": "Classes", + "Fetch\\": "Resources/Private/Php/Fetch/src/Fetch" } }, "replace": { diff --git a/ext_emconf.php b/ext_emconf.php index c398b53b4..1e47d0778 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -53,6 +53,9 @@ 'suggests' => array( ), 'autoload' => array( - 'classmap' => array('Classes') + 'psr-4' => array( + 'DirectMailTeam\\DirectMail\\' => 'Classes/', + 'Fetch\\' => 'Resources/Private/Php/Fetch/src/Fetch/' + ) ), ); diff --git a/ext_localconf.php b/ext_localconf.php index 1a3806c91..a75222c8e 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -105,6 +105,14 @@ 'additionalFields' => 'DirectMailTeam\\DirectMail\\Scheduler\\MailFromDraftAdditionalFields' ); +// bounce mail per scheduler +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['DirectMailTeam\\DirectMail\\Scheduler\\AnalyzeBounceMail'] = array( + 'extension' => $_EXTKEY, + 'title' => 'Direct Mail: Analyze bounce mail', + 'description' => 'This task will get bounce mail from the configured mailbox', + 'additionalFields' => 'DirectMailTeam\\DirectMail\\Scheduler\\AnalyzeBounceMailAdditionalFields' +); + /** * Added CLI From ed904f69cceb816254702628619aeb6dd5727a05 Mon Sep 17 00:00:00 2001 From: Ivan Kartolo Date: Mon, 12 Sep 2016 21:44:14 +0200 Subject: [PATCH 11/56] [BUGFIX] set FE group per hook Resolves: #24 Releases: master Change-Id: Ie95d092eb93c3db287c179824e7121ffc4e5aa7a --- Classes/Hooks/TypoScriptFrontendController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Hooks/TypoScriptFrontendController.php b/Classes/Hooks/TypoScriptFrontendController.php index 97f1964c7..563fe2318 100644 --- a/Classes/Hooks/TypoScriptFrontendController.php +++ b/Classes/Hooks/TypoScriptFrontendController.php @@ -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 From 282fadf66c055c87d265792f65d7be406a269d6a Mon Sep 17 00:00:00 2001 From: Ruud Silvrants Date: Fri, 16 Sep 2016 14:22:59 +0200 Subject: [PATCH 12/56] [TASK] Add documentation multiLanguage --- .../ConfiguringMultilanguage/index.rst | 29 +++++++++++++++++++ Documentation/Configuration/Index.rst | 1 + 2 files changed, 30 insertions(+) create mode 100644 Documentation/Configuration/ConfiguringMultilanguage/index.rst diff --git a/Documentation/Configuration/ConfiguringMultilanguage/index.rst b/Documentation/Configuration/ConfiguringMultilanguage/index.rst new file mode 100644 index 000000000..105313a81 --- /dev/null +++ b/Documentation/Configuration/ConfiguringMultilanguage/index.rst @@ -0,0 +1,29 @@ +Usage/configuring multi language +-------------------------------- + +When the page has a translation you have the possibility to select a specific language/translation of the page when creating a new Direct Mail. It is also possible to target receiver groups based on a language restriction. +Creating a Direct Mail will provide the option in the BE module to use a translation of the page instead of the original only if a page is translated. + +In the last step of creating a Direct Mail, receiver groups are shown that match the language selection. When only 1 group is present, the select is not shown but this group is automatically selected. + +Configuring a language for recipients +""""""""""""""""""""""""""""""""""""" + +In a recipient list an option is available to select a language for that list with as default . This option is used at the last step of creating a Direct Mail to determine the receivers. + +Language mapping +"""""""""""""""" + +Mapping language params to the sys_language_uid can be done by tsConfig and with an automatic fallback to `&L=sys_language_uid`. + +Example tsConfig:: + +mod.web_modules.dmail { + langParams.0 = + langParams.1 = &L=1 +} + + + + + diff --git a/Documentation/Configuration/Index.rst b/Documentation/Configuration/Index.rst index 5f997289d..6552b3d79 100644 --- a/Documentation/Configuration/Index.rst +++ b/Documentation/Configuration/Index.rst @@ -33,6 +33,7 @@ Configuration ConfiguringPlainTextRendering/Index ConfiguringPlainTextRenderingOfNewsRecords/Index ConfiguringTheUseOfCategories/Index + ConfiguringMultilanguage/Index EnablingClickStatistics/Index AutomaticallyInvokeTheMailerEngine/Index ConfiguringTheAnalysisOfReturnedMails/Index From cecbc6125ae7db68f1d2181738114ea7f0b64043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dennis=20R=C3=B6mmich?= Date: Mon, 19 Sep 2016 18:25:18 +0200 Subject: [PATCH 13/56] [BUGFIX] Support HTTP Username/Password on Websites running on https refs #29 --- Classes/DirectMailUtility.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Classes/DirectMailUtility.php b/Classes/DirectMailUtility.php index 00d10eb62..f12884f7f 100644 --- a/Classes/DirectMailUtility.php +++ b/Classes/DirectMailUtility.php @@ -1233,6 +1233,9 @@ protected static function addUserPass($url, array $params) if ($user && $pass && substr($url, 0, 7) == 'http://') { $url = 'http://' . $user . ':' . $pass . '@' . substr($url, 7); } + if ($user && $pass && substr($url, 0, 8) == 'https://') { + $url = 'https://' . $user . ':' . $pass . '@' . substr($url, 8); + } if ($params['simulate_usergroup'] && MathUtility::canBeInterpretedAsInteger($params['simulate_usergroup'])) { $url = $url . '&dmail_fe_group=' . (int)$params['simulate_usergroup'] . '&access_token=' . self::createAndGetAccessToken(); } From 32532378704ad7aa505c7c34ef87044d57896448 Mon Sep 17 00:00:00 2001 From: Helmut Hummel Date: Wed, 12 Oct 2016 18:02:07 +0200 Subject: [PATCH 14/56] Fix composer.json file * use correct typo3-ter name in replace section * add missing alias map definition --- composer.json | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index bcd0abb86..b3fdfdab7 100644 --- a/composer.json +++ b/composer.json @@ -32,6 +32,13 @@ }, "replace": { "direct_mail": "self.version", - "typo3-ter/direct_mail": "self.version" + "typo3-ter/direct-mail": "self.version" + }, + "extra": { + "typo3/class-alias-loader": { + "class-alias-maps": [ + "Migrations/Code/ClassAliasMap.php" + ] + } } -} \ No newline at end of file +} From 6438abd24d69f129d21669ae9d9edc4c53e66c47 Mon Sep 17 00:00:00 2001 From: Frans Saris Date: Fri, 20 Feb 2015 15:02:06 +0100 Subject: [PATCH 15/56] [BUGFIX] Don't schedule draft mail if fetching new content failed If fetching of new content failed throw an exception with the error from DirectMailUtility::fetchUrlContentsForDirectMailRecord(). This prevents old mail being send to the receivers. And makes the error visible for the admin in the BE. --- Classes/DirectMailUtility.php | 15 ++++++++++----- Classes/Scheduler/MailFromDraft.php | 15 ++++++++++----- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/Classes/DirectMailUtility.php b/Classes/DirectMailUtility.php index 07d50e584..ff2b7e318 100644 --- a/Classes/DirectMailUtility.php +++ b/Classes/DirectMailUtility.php @@ -1,3 +1,4 @@ +<<<<<<< HEAD render(); } - - return $theOutput; + if ($returnArray) { + return array('errors' => $errorMsg, 'warnings' => $warningMsg); + } else { + return $theOutput; + } } diff --git a/Classes/Scheduler/MailFromDraft.php b/Classes/Scheduler/MailFromDraft.php index dc71f58d1..2eea614df 100644 --- a/Classes/Scheduler/MailFromDraft.php +++ b/Classes/Scheduler/MailFromDraft.php @@ -14,10 +14,10 @@ * The TYPO3 project - inspiring people to share! */ -use \TYPO3\CMS\Backend\Utility\BackendUtility; -use \TYPO3\CMS\Core\Utility\GeneralUtility; -use \TYPO3\CMS\Scheduler\Task\AbstractTask; -use \DirectMailTeam\DirectMail\DirectMailUtility; +use DirectMailTeam\DirectMail\DirectMailUtility; +use TYPO3\CMS\Backend\Utility\BackendUtility; +use TYPO3\CMS\Core\Utility\GeneralUtility; +use TYPO3\CMS\Scheduler\Task\AbstractTask; /** * Class tx_directmail_Scheduler_MailFromDraft @@ -85,7 +85,12 @@ public function execute() // fetch the cloned record $mailRecord = BackendUtility::getRecord('sys_dmail', $this->dmailUid); - DirectMailUtility::fetchUrlContentsForDirectMailRecord($mailRecord, $defaultParams); + // fetch mail content + $result = DirectMailUtility::fetchUrlContentsForDirectMailRecord($mailRecord, $defaultParams, TRUE); + + if ($result['errors'] !== array()) { + throw new \Exception('Failed to fetch contents: ' . implode(', ', $result['errors'])); + } $mailRecord = BackendUtility::getRecord('sys_dmail', $this->dmailUid); if ($mailRecord['mailContent'] && $mailRecord['renderedsize'] > 0) { From 1ee21d8fb2d22d6f8a05cc3b1f5eeb359ac9dd4b Mon Sep 17 00:00:00 2001 From: Frans Saris Date: Mon, 6 Jun 2016 16:17:42 +0200 Subject: [PATCH 16/56] [BUGFIX] Remove merge conflict left over --- Classes/DirectMailUtility.php | 1 - 1 file changed, 1 deletion(-) diff --git a/Classes/DirectMailUtility.php b/Classes/DirectMailUtility.php index ff2b7e318..88587e3a8 100644 --- a/Classes/DirectMailUtility.php +++ b/Classes/DirectMailUtility.php @@ -1,4 +1,3 @@ -<<<<<<< HEAD Date: Fri, 27 Feb 2015 10:46:09 +0100 Subject: [PATCH 17/56] [TASK] Check if domain record is set when creating mail from draft with cli request This prevents failing mailFromDraft conversions. And makes the error visible for the admin in the BE. --- Classes/Scheduler/MailFromDraft.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Classes/Scheduler/MailFromDraft.php b/Classes/Scheduler/MailFromDraft.php index 2eea614df..63323ccfb 100644 --- a/Classes/Scheduler/MailFromDraft.php +++ b/Classes/Scheduler/MailFromDraft.php @@ -71,6 +71,11 @@ public function execute() // set the right type (3 => 1, 2 => 0) $draftRecord['type'] -= 2; + // check if domain record is set + if ((TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_CLI) && (int)$draftRecord['type'] !== 1 && empty($draftRecord['use_domain'])) { + throw new \Exception('No domain record set!'); + } + // Insert the new dmail record into the DB $GLOBALS['TYPO3_DB']->exec_INSERTquery('sys_dmail', $draftRecord); $this->dmailUid = $GLOBALS['TYPO3_DB']->sql_insert_id(); From 5bfe793c0571fefbccdcc530f62bc98567f8ffb7 Mon Sep 17 00:00:00 2001 From: Bernhard Kraft Date: Tue, 28 Jun 2016 20:03:15 +0200 Subject: [PATCH 18/56] [BUGFIX] Fix issue with "extractHyperLinks" For some special cases as shown by the unit tests the method "extractHyperLinks" fails to properly extract the appropriate values. The unit tests fail. This patch solves the issue and makes the unit tests working again. Resolves: https://github.com/kartolo/direct_mail/issues/12 Releases: master --- Classes/Dmailer.php | 21 +++++++------ Tests/Unit/Dmailer/DirectMailEngineTest.php | 35 +++++++++------------ 2 files changed, 26 insertions(+), 30 deletions(-) diff --git a/Classes/Dmailer.php b/Classes/Dmailer.php index 040e30322..2b8fc35e2 100755 --- a/Classes/Dmailer.php +++ b/Classes/Dmailer.php @@ -1408,19 +1408,21 @@ public function extractHyperLinks() $dummy = preg_match('/[^>]*/', $codepieces[$i], $reg); // Fetches the attributes for the tag - $attributes = $this->get_tag_attributes($reg[0]); + $attributes = $this->get_tag_attributes($reg[0], false); $hrefData = array(); $hrefData['ref'] = $attributes['href'] ?: $attributes['action']; + $quotes = (substr($hrefData['ref'], 0, 1) === '"') ? '"' : ''; + $hrefData['ref'] = trim($hrefData['ref'], '"'); if ($hrefData['ref']) { // Finds out if the value had quotes around it - $hrefData['quotes'] = (substr($codepieces[$i], strpos($codepieces[$i], $hrefData["ref"]) - 1, 1) == '"') ? '"' : ''; - // subst_str is the string to look for, when substituting lateron - $hrefData['subst_str'] = $hrefData['quotes'] . $hrefData['ref'] . $hrefData['quotes']; + $hrefData['quotes'] = $quotes; + // subst_str is the string to look for when substituting later on + $hrefData['subst_str'] = $quotes . $hrefData['ref'] . $quotes; if ($hrefData['ref'] && substr(trim($hrefData['ref']), 0, 1) != "#" && !strstr($linkList, "|" . $hrefData['subst_str'] . "|")) { $linkList .= "|" . $hrefData['subst_str'] . "|"; $hrefData['absRef'] = $this->absRef($hrefData['ref']); $hrefData['tag'] = $tag; - $hrefData['no_jumpurl'] = intval($attributes['no_jumpurl']) ? 1 : 0; + $hrefData['no_jumpurl'] = intval(trim($attributes['no_jumpurl'], '"')) ? 1 : 0; $this->theParts['html']['hrefs'][] = $hrefData; } } @@ -1509,10 +1511,11 @@ public function tag_regex($tags) * * @param string $tag Tag is either like this "" or * this " OPTION ATTRIB=VALUE>" which means you can omit the tag-name + * @param boolean $removeQuotes When TRUE (default) quotes around a value will get removed * * @return array array with attributes as keys in lower-case */ - public function get_tag_attributes($tag) + public function get_tag_attributes($tag, $removeQuotes = true) { $attributes = array(); $tag = ltrim(preg_replace('/^<[^ ]*/', '', trim($tag))); @@ -1525,9 +1528,9 @@ public function get_tag_attributes($tag) $attrib = $reg[0]; $tag = ltrim(substr($tag, strlen($attrib), $tagLen)); - if (substr($tag, 0, 1) == '=') { + if (substr($tag, 0, 1) === '=') { $tag = ltrim(substr($tag, 1, $tagLen)); - if (substr($tag, 0, 1) == '"') { + if (substr($tag, 0, 1) === '"' && $removeQuotes) { // Quotes around the value $reg = explode('"', substr($tag, 1, $tagLen), 2); $tag = ltrim($reg[1]); @@ -1537,7 +1540,7 @@ public function get_tag_attributes($tag) preg_match('/^([^[:space:]>]*)(.*)/', $tag, $reg); $value = trim($reg[1]); $tag = ltrim($reg[2]); - if (substr($tag, 0, 1) == '>') { + if (substr($tag, 0, 1) === '>') { $tag = ''; } } diff --git a/Tests/Unit/Dmailer/DirectMailEngineTest.php b/Tests/Unit/Dmailer/DirectMailEngineTest.php index d1a5a7ffc..49d2e23b6 100644 --- a/Tests/Unit/Dmailer/DirectMailEngineTest.php +++ b/Tests/Unit/Dmailer/DirectMailEngineTest.php @@ -1,33 +1,26 @@ - * All rights reserved + * It is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License, either version 2 + * of the License, or any later version. * - * This script is part of the TYPO3 project. The TYPO3 project is - * free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * For the full copyright and license information, please read the + * LICENSE.txt file that was distributed with this source code. * - * The GNU General Public License can be found at - * http://www.gnu.org/copyleft/gpl.html. - * - * This script is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * This copyright notice MUST APPEAR in all copies of the script! - ***************************************************************/ + * The TYPO3 project - inspiring people to share! + */ /** - * Testcase for class "dmailer" + * Testcase for class "DirectMailTeam\DirectMail\Dmailer" * * @author Bernhard Kraft + * + * @package TYPO3 + * @subpackage tx_directmail */ class DirectMailEngineTest extends \TYPO3\CMS\Core\Tests\UnitTestCase { @@ -81,7 +74,7 @@ public function extractHyperLinksDataProvider() ) ), 'absolute url (fails currently, #54459)' => array(' - This is a simple test', + This is a simple test', 'http://www.server.com/', array( array( From 380784459fb610537f9d336859ea931269f16dfd Mon Sep 17 00:00:00 2001 From: Frans Saris Date: Fri, 19 Aug 2016 10:06:01 +0200 Subject: [PATCH 19/56] [BUGFIX] Removed $GLOBALS['TSFE']->initFEuser(); from Jumpurl Hook In the new Hook/JumpurlController $GLOBALS['TSFE']->initFEuser(); is called before $GLOBALS['TSFE'] is initiated. Removed the call as this is done after the hook in RequestHandler/handleRequest --- Classes/Hooks/JumpurlController.php | 1 - 1 file changed, 1 deletion(-) diff --git a/Classes/Hooks/JumpurlController.php b/Classes/Hooks/JumpurlController.php index e012d3e75..4d7c7bd9b 100644 --- a/Classes/Hooks/JumpurlController.php +++ b/Classes/Hooks/JumpurlController.php @@ -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); From 92364e32ce557da05aad73209e7732a97aa95129 Mon Sep 17 00:00:00 2001 From: Lars Tode Date: Fri, 2 Sep 2016 20:21:00 +0200 Subject: [PATCH 20/56] [FIX] Changes access to the database to TYPO3_DB --- pi1/class.tx_directmail_pi1.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pi1/class.tx_directmail_pi1.php b/pi1/class.tx_directmail_pi1.php index 92fdcdae9..251234510 100644 --- a/pi1/class.tx_directmail_pi1.php +++ b/pi1/class.tx_directmail_pi1.php @@ -277,9 +277,11 @@ public function getImagesStandard(array &$imagesArray, $uploadPath='uploads/pics public function getImagesFromDam(array &$imagesArray) { $sql = 'SELECT tx_dam.* FROM tx_dam_mm_ref,tx_dam WHERE tx_dam_mm_ref.tablenames="tt_content" AND tx_dam_mm_ref.ident="tx_damttcontent_files" AND tx_dam_mm_ref.uid_foreign="' . $this->cObj->data['uid'] . '" AND tx_dam_mm_ref.uid_local=tx_dam.uid AND tx_dam.deleted=0 ORDER BY sorting_foreign'; - $res = mysql_query($sql); - if (mysql_num_rows($res)>0) { - while (($row = mysql_fetch_assoc($res))) { + /* @var \TYPO3\CMS\Core\Database\DatabaseConnection $db */ + $db = $GLOBALS['TYPO3_DB']; + $res = $db->sql_query($sql); + if ($db->sql_num_rows($res) > 0) { + while ($row = $db->sql_fetch_assoc($res)) { $imagesArray[] = $this->siteUrl . $row['file_path'] . $row['file_name']; } } From d5fd6c4dcb65b4c462b7d8d7acbf34cca6d80f0a Mon Sep 17 00:00:00 2001 From: Minh-Thien Nhan Date: Fri, 2 Sep 2016 20:53:38 +0200 Subject: [PATCH 21/56] [FIX] Removed de locallang files Resolved #11 --- .../Language/de.locallangConfiguration.xlf | 28 - .../Language/de.locallangDirectMail.xlf | 28 - .../Language/de.locallangMailerEngine.xlf | 28 - .../Private/Language/de.locallangNavFrame.xlf | 22 - .../Language/de.locallangRecipientList.xlf | 28 - .../Language/de.locallangStatistics.xlf | 28 - .../de.locallang_csh_Configuration.xlf | 41 - .../Language/de.locallang_csh_DirectMail.xlf | 221 --- .../de.locallang_csh_MailerEngine.xlf | 41 - .../de.locallang_csh_RecipientList.xlf | 102 -- .../Language/de.locallang_csh_Statistics.xlf | 45 - .../de.locallang_csh_web_txdirectmail.xlf | 269 ---- .../Private/Language/de.locallang_mod2-6.xlf | 1337 ----------------- .../Private/Language/de.locallang_tca.xlf | 284 ---- 14 files changed, 2502 deletions(-) delete mode 100644 Resources/Private/Language/de.locallangConfiguration.xlf delete mode 100644 Resources/Private/Language/de.locallangDirectMail.xlf delete mode 100644 Resources/Private/Language/de.locallangMailerEngine.xlf delete mode 100644 Resources/Private/Language/de.locallangNavFrame.xlf delete mode 100644 Resources/Private/Language/de.locallangRecipientList.xlf delete mode 100644 Resources/Private/Language/de.locallangStatistics.xlf delete mode 100644 Resources/Private/Language/de.locallang_csh_Configuration.xlf delete mode 100644 Resources/Private/Language/de.locallang_csh_DirectMail.xlf delete mode 100644 Resources/Private/Language/de.locallang_csh_MailerEngine.xlf delete mode 100644 Resources/Private/Language/de.locallang_csh_RecipientList.xlf delete mode 100644 Resources/Private/Language/de.locallang_csh_Statistics.xlf delete mode 100644 Resources/Private/Language/de.locallang_csh_web_txdirectmail.xlf delete mode 100644 Resources/Private/Language/de.locallang_mod2-6.xlf delete mode 100644 Resources/Private/Language/de.locallang_tca.xlf diff --git a/Resources/Private/Language/de.locallangConfiguration.xlf b/Resources/Private/Language/de.locallangConfiguration.xlf deleted file mode 100644 index 253490277..000000000 --- a/Resources/Private/Language/de.locallangConfiguration.xlf +++ /dev/null @@ -1,28 +0,0 @@ - - - -
- Labels for the main Direct Mail module - module - EXT:direct_mail/mod6/locallang_mod.xml - - Ivan Kartolo - ivan.kartolo@gmail.com - LFEditor -
- - - Edit configuration of the extension - Bearbeiten die Konfigrationen der Erweiterung - - - Edit configuration of the extension - Bearbeiten die Konfigrationen der Erweiterung - - - Configuration - Konfiguration - - -
-
\ No newline at end of file diff --git a/Resources/Private/Language/de.locallangDirectMail.xlf b/Resources/Private/Language/de.locallangDirectMail.xlf deleted file mode 100644 index 453198c22..000000000 --- a/Resources/Private/Language/de.locallangDirectMail.xlf +++ /dev/null @@ -1,28 +0,0 @@ - - - -
- Labels for the main Direct Mail module - module - EXT:direct_mail/mod/locallang.xml - - Ivan Kartolo - ivan.kartolo@gmail.com - LFEditor -
- - - Direct mailing of newsletters to targeted recipients. - Direct mailing von Newslettern an ausgewählte Empfänger. - - - Direct Mailer - Direct Mailer - - - Direct Mail - Direct Mail - - -
-
\ No newline at end of file diff --git a/Resources/Private/Language/de.locallangMailerEngine.xlf b/Resources/Private/Language/de.locallangMailerEngine.xlf deleted file mode 100644 index ed503cc70..000000000 --- a/Resources/Private/Language/de.locallangMailerEngine.xlf +++ /dev/null @@ -1,28 +0,0 @@ - - - -
- Labels for the Direct Mail module - module - EXT:direct_mail/mod/locallang.xml - - Ivan Kartolo - ivan.kartolo@gmail.com - LFEditor -
- - - Show the mailing status of the newsletter - Zeigt der Versandstatus eines Newsletters an - - - Mailing status - Versandstatus eines Newsletters - - - Mailer Engine Status - Versand-Status - - -
-
\ No newline at end of file diff --git a/Resources/Private/Language/de.locallangNavFrame.xlf b/Resources/Private/Language/de.locallangNavFrame.xlf deleted file mode 100644 index 8938849d0..000000000 --- a/Resources/Private/Language/de.locallangNavFrame.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - -
- module - Language labels for module "DirectMailNavFrame" - header, description - Ivan Kartolo - ivan.kartolo@gmail.com - LFEditor -
- - - Direct Mailer - Direct mailing von Newslettern an ausgewählte Empfänger. - - - Direct Mail - Direct Mail - - -
-
\ No newline at end of file diff --git a/Resources/Private/Language/de.locallangRecipientList.xlf b/Resources/Private/Language/de.locallangRecipientList.xlf deleted file mode 100644 index 4e50d5749..000000000 --- a/Resources/Private/Language/de.locallangRecipientList.xlf +++ /dev/null @@ -1,28 +0,0 @@ - - - -
- Labels for the main Direct Mail module - module - EXT:direct_mail/mod/locallang.xml - - Ivan Kartolo - ivan.kartolo@gmail.com - LFEditor -
- - - Import Recipients from a CSV File. - Importieren der Empfängern von einer CSV Datei. - - - Import Recipients (CSV) - Importieren der Empfängern (CSV) - - - Recipients Lists - Empfängerliste - - -
-
\ No newline at end of file diff --git a/Resources/Private/Language/de.locallangStatistics.xlf b/Resources/Private/Language/de.locallangStatistics.xlf deleted file mode 100644 index fb3c5092b..000000000 --- a/Resources/Private/Language/de.locallangStatistics.xlf +++ /dev/null @@ -1,28 +0,0 @@ - - - -
- Labels for the main Direct Mail module - module - EXT:direct_mail/mod/locallang.xml - - Ivan Kartolo - ivan.kartolo@gmail.com - LFEditor -
- - - Shows newsletter statistics - Zeigt Statistiken eines Newsletters - - - Shows newsletter statistics - Zeigt Statistiken eines Newsletters - - - Statistics - Statistiken - - -
-
\ No newline at end of file diff --git a/Resources/Private/Language/de.locallang_csh_Configuration.xlf b/Resources/Private/Language/de.locallang_csh_Configuration.xlf deleted file mode 100644 index 901bb3ebf..000000000 --- a/Resources/Private/Language/de.locallang_csh_Configuration.xlf +++ /dev/null @@ -1,41 +0,0 @@ - - - -
- CSH for Direct Mail Configuration Module - CSH - EXT:direct_mail/Resources/Private/Language/locallang_csh_txdirectmailM6 - _MOD_DirectMailNavFrame_txdirectmailM6 - 1 - Ivan Kartolo - ivan.kartolo@gmail.com - LFEditor -
- - - Direct Mail > Configuration module - Direct Mail > Konfiguration-Modul - - - Set the configuration - Konfigurieren das Direct Mail-Modul - - - Set the configuration for the direct mail module. Please refer to the manual for the detailed information - beziehen Sie bitte sich auf das Handbuch zu ausführlicher Information - - - Available Direct Mail folders - Verfügbare Direct-Mail-Ordner - - - Select the Direct Mail folder you wish to work with. - Wählen Sie den Direct-Mail-Ordner, mit dem Sie arbeiten wollen. - - - Each Direct Mail folder is a specifically configured work area for the Direct Mail module. - Jeder Direct-Mail-Ordner enthält eine eigene Newsletter-Konfiguration. Für unterschiedliche Zwecke oder Empfänger können Sie so unterschiedlich gestaltete Newsletter versenden. - - -
-
\ No newline at end of file diff --git a/Resources/Private/Language/de.locallang_csh_DirectMail.xlf b/Resources/Private/Language/de.locallang_csh_DirectMail.xlf deleted file mode 100644 index 9f9d256d8..000000000 --- a/Resources/Private/Language/de.locallang_csh_DirectMail.xlf +++ /dev/null @@ -1,221 +0,0 @@ - - - -
- CSH for Direct Mail Module - CSH - EXT:direct_mail/Resources/Private/Language/locallang_csh_txdirectmailM2 - _MOD_DirectMailNavFrame_txdirectmailM2 - 1 - Ivan Kartolo - ivan.kartolo@gmail.com - LFEditor -
- - - Direct Mail > Direct Mail module - Web > Direct-Mail-Modul - - - Select the function of the Direct Mail module that you want to use. - Wählen Sie eine Funktion des Direct-Mail-Moduls. - - - - - - - sys_dmail, sys_dmail_group, sys_dmail_category - sys_dmail, sys_dmail_group, sys_dmail_category - - - Select a direct mail - Select a direct mail - - - Assigning categories to a content element means that the element will appear in the mail only if the recipient user has chosen that category in his profile. - Assigning categories to a content element means that the element will appear in the mail only if the recipient user has chosen that category in his profile. - - - - - - - sys_dmail_category - sys_dmail_category - - - Create a new direct mail from newsletter - Create a new direct mail from newsletter - - - No direct mail has been created using the content of the following newsletters. Click on the one you want to use to create a new direct mail. - No direct mail has been created using the content of the following newsletters. Click on the one you want to use to create a new direct mail. - - - sys_dmail - sys_dmail - - - Create a new direct mail from an external URL - Create a new direct mail from an external URL - - - Use this form to create a new direct mail based on content grabbed from an external URL. - Use this form to create a new direct mail based on content grabbed from an external URL. - - - sys_dmail - sys_dmail - - - Create a newsletter - Newsletter anlegen - - - Click on this link if you want to create a new newsletter. - Klicken Sie hier, um eine neue Newsletter-Seite anzulegen. - - - - - - - Direct Mails options menu - Direct Mails options menu - - - Select the action you want to perform on this direct mail. - Select the action you want to perform on this direct mail. - - - - - - - sys_dmail - sys_dmail - - - Available Direct Mail folders - Verfügbare Direct-Mail-Ordner - - - Select the Direct Mail folder you wish to work with. - Wählen Sie den Direct-Mail-Ordner, mit dem Sie arbeiten wollen. - - - Each Direct Mail folder is a specifically configured work area for the Direct Mail module. - Jeder Direct-Mail-Ordner enthält eine eigene Newsletter-Konfiguration. Für unterschiedliche Zwecke oder Empfänger können Sie so unterschiedlich gestaltete Newsletter versenden. - - - The following direct mails have not yet been sent. Click on the one you want to work on. - The following direct mails have not yet been sent. Click on the one you want to work on. - - - sys_dmail - sys_dmail - - - Select a newsletter - Wählen Sie eine Newsletter-Seite. - - - Click on one of these already created newsletters. - Klicken Sie einen der bereits angelegten Newsletter. - - - You may click on one of the listed newsletter to view information about it, categorize its content elements, and eventually use it to create a direct mail. - Sie können einen der aufgelisteten Newsletter anklicken, um Informationen über ihn zu erhalten, ihn zu bearbeiten und einen Versand daraus zu erstellen. - - -
-
\ No newline at end of file diff --git a/Resources/Private/Language/de.locallang_csh_MailerEngine.xlf b/Resources/Private/Language/de.locallang_csh_MailerEngine.xlf deleted file mode 100644 index 371652396..000000000 --- a/Resources/Private/Language/de.locallang_csh_MailerEngine.xlf +++ /dev/null @@ -1,41 +0,0 @@ - - - -
- CSH for Direct Mail Mailer Engine Module - CSH - EXT:direct_mail/Resources/Private/Language/locallang_csh_txdirectmailM5 - _MOD_DirectMailNavFrame_txdirectmailM5 - 1 - Ivan Kartolo - ivan.kartolo@gmail.com - LFEditor -
- - - Direct Mail > Mailer Engine module - Direct Mail > Versand-Status-Modul - - - Show status and queuing jobs of the Mailer Engine - Zeigt Status des Versands und anstehenden Newsletter-Versand an. - - - Show the detailed status and queuing jobs of the Mailer Engine. - Zeigt detaillierte Status des Versand und anstehenden Newsletter-Versand an. - - - Available Direct Mail folders - Verfügbare Direct-Mail-Ordner - - - Select the Direct Mail folder you wish to work with. - Wählen Sie den Direct-Mail-Ordner, mit dem Sie arbeiten wollen. - - - Each Direct Mail folder is a specifically configured work area for the Direct Mail module. - Jeder Direct-Mail-Ordner enthält eine eigene Newsletter-Konfiguration. Für unterschiedliche Zwecke oder Empfänger können Sie so unterschiedlich gestaltete Newsletter versenden. - - -
-
\ No newline at end of file diff --git a/Resources/Private/Language/de.locallang_csh_RecipientList.xlf b/Resources/Private/Language/de.locallang_csh_RecipientList.xlf deleted file mode 100644 index d62f9b136..000000000 --- a/Resources/Private/Language/de.locallang_csh_RecipientList.xlf +++ /dev/null @@ -1,102 +0,0 @@ - - - -
- CSH for Direct Mail Recipient List Module - CSH - EXT:direct_mail/Resources/Private/Language/locallang_csh_txdirectmailM3 - _MOD_DirectMailNavFrame_txdirectmailM3 - 1 - Ivan Kartolo - ivan.kartolo@gmail.com - LFEditor -
- - - Direct Mail > Recipient List module - Direct Mail > Empfängerliste-Modul - - - Manage the recipient list. - Verwalten die Empfängerlisten - - - This module lets you: -- create a new recipient list -- import Addresses records from CSV-File -- link to the editing form of an existing recipient list -- select an existing recipient list; selecting an existing recipient list leads you to a screen that lets you view the number of recipients of each type in the list, with the options to list the recipients or download a csv file. - Mit diesem Modul können Sie: -- neue Empfängerliste erzeugen -- neue Adress-Datensätze von einer CSV-Datei importieren -- vorhandene Empfängerliste editieren -- vorhandene Empfängerliste auswählen; Wird eine Empfängerliste ausgewählt, können Sie die Anzahl der Empfängern, einzelne Empfänger auflisten lassen oder die Liste als CSV Datei herunteladen. - - - - sys_dmail_group - sys_dmail_group - - - Available Direct Mail folders - Verfügbare Direct-Mail-Ordner - - - Select the Direct Mail folder you wish to work with. - Wählen Sie den Direct-Mail-Ordner, mit dem Sie arbeiten wollen. - - - Each Direct Mail folder is a specifically configured work area for the Direct Mail module. - Jeder Direct-Mail-Ordner enthält eine eigene Newsletter-Konfiguration. Für unterschiedliche Zwecke oder Empfänger können Sie so unterschiedlich gestaltete Newsletter versenden. - - - Import CSV into 'Address' table - Import CSV into 'Address' table - - - This option lets you import a csv, or comma-separated, list of address records and create a recipient list containing the imported records. - This option lets you import a csv, or comma-separated, list of address records and create a recipient list containing the imported records. - - - The records to import are entered one per line. Each record to import is a comma-separated list of field values. You may also specify the use of a semicolon(;) or of a colon (:) as separator instead of the comma. - -On the first line you may enter a comma-separated list of field names. This first line provides the structure for the records that follow. If you do not provide a list of field names on the first line, then the structure of the records is assumed to be "name, email". - -Each field name listed on the first line is analyzed as follows: - -1.the field name may one of the field names from the following list: uid, name, title, email, phone, www, address, company, city, zip, country, fax, module_sys_dmail_html, module_sys_dmail_category; - -2.the field name may be omitted in which case the corresponding values will be skipped or omitted; - -3.the field name may start with "user_", assuming that table tt_address was extended with the specified field name; - -4.in addition, fields may be suffixed with "[code]"; in this case, when the value in the imported record is not null, "[+value]" adds that number to the field value and "[=value]" overrides any existing value in the field. - -Example of csv field specification: -;user_date;name;email;zip;phone;user_age[=20] -185;12-02-01;Connie Greffel;c.greffel@get2net.dk;;39905067;x -186;12-02-01;Stine Holm;ravnsbjergholm@hotmail.com;;32 96 70 75; -187;12-02-01;Anette Bentholm;madsenbentholm@mail.net4you.dk;;98373677;x - The records to import are entered one per line. Each record to import is a comma-separated list of field values. You may also specify the use of a semicolon(;) or of a colon (:) as separator instead of the comma. - -On the first line you may enter a comma-separated list of field names. This first line provides the structure for the records that follow. If you do not provide a list of field names on the first line, then the structure of the records is assumed to be "name, email". - -Each field name listed on the first line is analyzed as follows: - -1.the field name may one of the field names from the following list: uid, name, title, email, phone, www, address, company, city, zip, country, fax, module_sys_dmail_html, module_sys_dmail_category; - -2.the field name may be omitted in which case the corresponding values will be skipped or omitted; - -3.the field name may start with "user_", assuming that table tt_address was extended with the specified field name; - -4.in addition, fields may be suffixed with "[code]"; in this case, when the value in the imported record is not null, "[+value]" adds that number to the field value and "[=value]" overrides any existing value in the field. - -Example of csv field specification: -;user_date;name;email;zip;phone;user_age[=20] -185;12-02-01;Connie Greffel;c.greffel@get2net.dk;;39905067;x -186;12-02-01;Stine Holm;ravnsbjergholm@hotmail.com;;32 96 70 75; -187;12-02-01;Anette Bentholm;madsenbentholm@mail.net4you.dk;;98373677;x - - -
-
\ No newline at end of file diff --git a/Resources/Private/Language/de.locallang_csh_Statistics.xlf b/Resources/Private/Language/de.locallang_csh_Statistics.xlf deleted file mode 100644 index 983e31bca..000000000 --- a/Resources/Private/Language/de.locallang_csh_Statistics.xlf +++ /dev/null @@ -1,45 +0,0 @@ - - - -
- CSH for Direct Mail Statistic Module - CSH - EXT:direct_mail/Resources/Private/Language/locallang_csh_txdirectmailM4 - _MOD_DirectMailNavFrametxdirectmailM4 - 1 - Ivan Kartolo - ivan.kartolo@gmail.com - LFEditor -
- - - Direct Mail > Statistics module - Direct Mail > Statistik-Modul - - - Show statictics of sent newsletter. - Zeigt Statistiken eines versendeten Newsletter. - - - Show detailed information of sent newsletter. - Zeigt detaillierte Statistiken eines versendeten Newsletter - - - sys_dmail, sys_dmail_group, sys_dmail_category - sys_dmail, sys_dmail_group, sys_dmail_category - - - Available Direct Mail folders - Verfügbare Direct-Mail-Ordner - - - Select the Direct Mail folder you wish to work with. - Wählen Sie den Direct-Mail-Ordner, mit dem Sie arbeiten wollen. - - - Each Direct Mail folder is a specifically configured work area for the Direct Mail module. - Jeder Direct-Mail-Ordner enthält eine eigene Newsletter-Konfiguration. Für unterschiedliche Zwecke oder Empfänger können Sie so unterschiedlich gestaltete Newsletter versenden. - - -
-
\ No newline at end of file diff --git a/Resources/Private/Language/de.locallang_csh_web_txdirectmail.xlf b/Resources/Private/Language/de.locallang_csh_web_txdirectmail.xlf deleted file mode 100644 index 8aca0ad65..000000000 --- a/Resources/Private/Language/de.locallang_csh_web_txdirectmail.xlf +++ /dev/null @@ -1,269 +0,0 @@ - - - -
- CSH for Direct Mail Module - CSH - EXT:direct_mail/mod/locallang_csh_web_DirectMailNavFrame - _MOD_web_DirectMailNavFrame - 1 - Ivan Kartolo - ivan.kartolo@gmail.com - LFEditor -
- - - Web > Direct Mail module - Web > Direct-Mail-Modul - - - Select the function of the Direct Mail module that you want to use. - Wählen Sie eine Funktion des Direct-Mail-Moduls. - - - - - - - sys_dmail, sys_dmail_group, sys_dmail_category - sys_dmail, sys_dmail_group, sys_dmail_category - - - Select a direct mail - Select a direct mail - - - Assigning categories to a content element means that the element will appear in the mail only if the recipient user has chosen that category in his profile. - Assigning categories to a content element means that the element will appear in the mail only if the recipient user has chosen that category in his profile. - - - - - - - sys_dmail_category - sys_dmail_category - - - Create a new direct mail from newsletter - Create a new direct mail from newsletter - - - No direct mail has been created using the content of the following newsletters. Click on the one you want to use to create a new direct mail. - No direct mail has been created using the content of the following newsletters. Click on the one you want to use to create a new direct mail. - - - sys_dmail - sys_dmail - - - Create a new direct mail from an external URL - Create a new direct mail from an external URL - - - Use this form to create a new direct mail based on content grabbed from an external URL. - Use this form to create a new direct mail based on content grabbed from an external URL. - - - sys_dmail - sys_dmail - - - Create a newsletter - Newsletter anlegen - - - Click on this link if you want to create a new newsletter. - Klicken Sie hier, um eine neue Newsletter-Seite anzulegen. - - - - - - - Direct Mails options menu - Direct Mails options menu - - - Select the action you want to perform on this direct mail. - Select the action you want to perform on this direct mail. - - - - - - - sys_dmail - sys_dmail - - - Available Direct Mail folders - Verfügbare Direct-Mail-Ordner - - - Select the Direct Mail folder you wish to work with. - Wählen Sie den Direct-Mail-Ordner, mit dem Sie arbeiten wollen. - - - Each Direct Mail folder is a specifically configured work area for the Direct Mail module. - Jeder Direct-Mail-Ordner enthält eine eigene Newsletter-Konfiguration. Für unterschiedliche Zwecke oder Empfänger können Sie so unterschiedlich gestaltete Newsletter versenden. - - - Import CSV into 'Address' table - Import CSV into 'Address' table - - - This option lets you import a csv, or comma-separated, list of address records and create a recipient list containing the imported records. - This option lets you import a csv, or comma-separated, list of address records and create a recipient list containing the imported records. - - - - - - - The following direct mails have not yet been sent. Click on the one you want to work on. - The following direct mails have not yet been sent. Click on the one you want to work on. - - - sys_dmail - sys_dmail - - - Select a newsletter - Wählen Sie eine Newsletter-Seite. - - - Click on one of these already created newsletters. - Klicken Sie einen der bereits angelegten Newsletter. - - - You may click on one of the listed newsletter to view information about it, categorize its content elements, and eventually use it to create a direct mail. - Sie können einen der aufgelisteten Newsletter anklicken, um Informationen über ihn zu erhalten, ihn zu bearbeiten und einen Versand daraus zu erstellen. - - -
-
\ No newline at end of file diff --git a/Resources/Private/Language/de.locallang_mod2-6.xlf b/Resources/Private/Language/de.locallang_mod2-6.xlf deleted file mode 100644 index 36d7e35af..000000000 --- a/Resources/Private/Language/de.locallang_mod2-6.xlf +++ /dev/null @@ -1,1337 +0,0 @@ - - - -
- Labels for the main Direct Mail module - module - EXT:direct_mail/mod/locallang.xml - Ivan Kartolo - ivan.kartolo@gmail.com - LFEditor -
- - - Enter the additional URL parameters used to fetch the HTML content from a TYPO3 page. - Gibt die zusätzliche URL-Parameter, die während des Auslesen der HTML-Inhalten einer TYPO3 Seite ein. - - - The specified parameters will be added to the URL used to fetch the HTML content of the direct mail from a TYPO3 page. If in doubt, leave it blank. - Die eingegebene Parameter werden in der URL hinzugefügt, um HTML Inhalten einer TYPO3 Seite auszulesen. Im Zweifel lass es leer. - - - Set default values for mail content format: - Setze Standardwerte des Formats von E-Mail-Inhalten fest: - - - Set default values for mail content fetching options: - Setze Standardwerte für Auslesen der E-Mail-Inhalten fest: - - - Set default values for Direct Mails headers: - Setze Standardwerte des Direct Mail Headers fest: - - - Configure direct mail module - Konfigurieren des Direct Mail-Moduls - - - Default character set for direct mails built from external pages - Standard Zeichensatz des Direct Mails, die auf externe Seite basiert sind - - - Specify the character set used in direct mails when they are built from external pages and character set cannot be auto-detected. - Gibt das Zeichensatz der Direct Mails an, die auf externe Seite basiert sind und das Zeichensatz kann nicht automatisch erkannt werden. - - - Default encoding of direct mails - Standardkodierung des Direct Mails - - - Select the default content transfer encoding of direct mails. - Wähle der Standardkodierung der Direct Mail-Inhalten - - - HTML only - Nur HTML - - - HTTP Password - HTTP Kennwort - - - If mail content is protected by HTTP authentication, enter the password here. - Wenn E-Mail-Inhalte mit HTTP Authentifikation geschützt sind, gibt das Kennwort ein. - - - HTTP Username - HTTP Benutzername - - - If mail content is protected by HTTP authentication, enter the username here. - Wenn E-Mail-Inhalte mit HTTP Authentifikation geschützt sind, gibt der Benutzername ein. - - - - - - - Privacy jumpurl - Anonyme jumpurl - - - Set this option, to anonymize click statistics - Setze diese Option ein, um die Klick-Statistiken zu anonymisieren - - - Set additional module options: - Lege die zusätzliche Moduleinstellungen fest: - - - Set options for content transfer encoding and character set: - Setze die Optionen der Versandkodierung und des Zeichensatzes fest: - - - Set options for links in mail content: - Setze die Einstellungen der Links in E-Mail ein: - - - Enable jump URL's: - Aktiviere Jump URL's: - - - Check this option to enable jump URL's and the collection of click statistics. - Kreuze diese Einstellung an, um die Jump URL's zu aktivieren und Statistiken von Klicks zu sammeln. - - - This configuration determines how QuickMails are handled and further sets the default value for Direct Mails. - Diese Einstellung stellt fest, wie Quickmails behandelt und die Standardwerte der Direct Mails einsetze. - - - Enable jump URL's for mailto links: - Aktivere Jump URL's für mailto-Links: - - - Check this option to enable jump URL's for mailto links. - Kreuze diese Einstellung en, um die Jump URL's für mailto-Links zu aktivieren. - - - Enter the additional URL parameters used to fetch the plain text content from a TYPO3 page. - Gibt die zusätzliche URL-Parameter, die während des Auslesen der Text-Inhalten einer TYPO3 Seite ein. - - - The specified parameters will be added to the URL used to fetch the plain text content of the direct mail from a TYPO3 page. If in doubt, set it either to '&type=99' or, when using TemplaVoila, to '&print=1'. - Die eingegebene Parameter werden in der URL hinzugefügt, um HTML Inhalten einer TYPO3 Seite auszulesen. Im Zweifel, setzt entweder '&type=99' oder '&print=1' (nur TemplaVoila). - - - Plain text and HTML - Text und HTML - - - Plain text only - Nur text - - - High - hoch - - - Low - niedrig - - - Normal - Normal - - - Character set for quick mails - Zeichensatz des Quickmails - - - Specify the character set to use when sending quick mails. - Gibt das Zaichensatz für das Versand von Quickmail an: - - - Encoding for quick mails - Kodierung des Quickmails - - - Select the content transfer encoding to use when sending quick mails. - Select the content transfer encoding to use when sending quick mails. - - - List of UID numbers of test recipient lists: - Liste der UID Nummern von Testempfängern: - - - Alternatively to sending test-mails to individuals, you can choose to send to a whole list. This is the list of recipient lists UID numbers available for this action. - Alternativ können Sie Test-E-Mails an einer Liste verschicken. Es ist die UID-Nummer der Liste, die für das Testversand verfügbar soll. - - - List of UID numbers of test recipients (tt_address): - Liste der UID (tt_address) von Testempfängern: - - - Before sending mails, you should test the mail content by sending test mails to one or more test recipients. The available recipients for testing are determined by this list of UID numbers. So first, find out the UID numbers (tt_address) of the recipients you wish to use for testing, then enter them here in a comma-separated list. - Vor dem Versand sollten Sie die E-Mail überprüfen, in dem Sie die E-Mail an ein oder mehrere Empfängern verschicken. Die verfügbaren Empfänger sind in eine Liste von UID bestimmt. Finde die UID Nummer der Empfängern (tt_address), die als Testempfängern fungieren und gibt in einer komma getrennte Liste ein. - - - Subject for the testmail. - Betreff des Test-Newsletters. - - - This will be prepended to the test newsletter subject - Dies wird vor dem Betreff des Test-Newsletter angehängt. - - - Update configuration - Aktualisiere Konfigurationen - - - Custom-defined table: - Benutzerdefinierte Tabelle: - - - Enter the name of a custom-defined table, with compatible columns defined, which may also be used for direct mails distribution. - Gibt der benutzerdefinierte Tabellenname ein, die für das Versand der Direct Mails benutzt werden soll. - - - URL of HTML content: - HTML URL: - - - Cancel - Abbrechen - - - Create mail - E-Mail erstellen - - - Create a new Direct Mail from a page - Neuen Versand anhand einer Seite erstellen - - - Create a new Direct Mail from external URL - Neuen Versand anhand einer externen URL erstellen - - - Edit - Ändern - - - An error was encountered. - FEHLER - - - Available Direct Mail folders - Für Direct Mail konfigurierte Ordner - - - Pages with HTML frames may not be fetched. - Seiten mit HTML Frame können nicht ausgelesen werden. - - - Caution - Achtung - - - Please check the cronjob or cronjob is not set. - Cronjob prüfen oder Cronjob ist nicht konfiguriert. - - - Last run: - Zuletzt ausgeführt: - - - OK - OK - - - Cronjob is running. - Cronjob läuft. - - - Cron job status - Cron job Status - - - Warning - Warnung - - - Please check the cronjob. - Cronjob prüfen. - - - Current time: - Aktuelle Zeit: - - - delete - Entfernen - - - Delivery begun - Versand-Start - - - Delivery ended - Versand-Ende - - - Invoke Mailer Engine - Versand anstoßen - - - Mailer Engine Invoked! - Versand wurde angestoßen! - - - Log: - Protokoll: - - - If TYPO3 is not configured to automatically invoke the Mailer Engine, you can invoke it by clicking here: - Falls TYPO3 nicht so konfiguriert ist, um automatisch einen Versand anzustoßen, so haben Sie hier die Gelegenheit, dies manuell durchzuführen: - - - Manually Invoke Engine - Manueller Versandstart - - - # sent - # verschickt - - - Scheduled - Planzeit - - - Mail Engine Status - Status - - - Subject - Betreff - - - Make query - Generiere Abfrage - - - Send a testmail - Eine Testmail versenden - - - Module configuration - Modulkonfiguration - - - Categories Conversion - Konvertierung von Kategorien - - - QuickMail - QuickMail - - - Direct Mail Extension - Direct Mail Erweiterung - - - NO - NEIN - - - You cannot create direct mails using pages that are hidden or access-restricted. - Sie besitzen nicht die Möglichkeit, versteckte oder zugriffsbeschränkte Seiten zu verschicken. - - - Cannot edit - mail has been sent - Kein Editieren möglich - E-Mail wurde bereits versandt. - - - Cannot edit - you don't have permissions to edit Direct Mails. - Kein Editieren möglich - Sie haben nicht die Berechtigung, Versandobjekte zu editieren. - - - This type of page cannot be used to create direct mails. Please select a regular page. - Dieser Seitentyp kann nicht als E-Mail versendet werden. Bitte wählen Sie eine reguläre Seite. - - - The HTML content does not contain any direct mail boundaries. - The HTML content does not contain any direct mail boundaries. - - - The HTML content could not be fetched. - Die HTML Inhalten können nicht ausgelesen werden. - - - The plain text content does not contain any direct mail boundaries. - The plain text content does not contain any direct mail boundaries. - - - The plain text content could not be fetched. - Die Text Inhalten können nicht ausgelesen werden. - - - Enter at least one valid URL! - Gibt eine gültige URL ein! - - - Number of records: - Anzahl der Einträge: - - - URL of plain text content: - Plain Text URL: - - - Query - Abfrage - - - Send - Senden - - - Subject: - Betreff: - - - Update query - Aktualisiere Abfrage - - - Information on direct mail record: - Versand - - - Check the following warning. - WARNUNG - - - External Pages - Externe Seite - - - Internal Pages - Interne Seite - - - Direct Mail - Direct Mail - - - Select a newsletter to continue sending: - Wähle ein Newsletter um weiter zu versenden: - - - New Newsletter - Neue Newsletter - - - Quickmail - Quickmail - - - New Quickmail - Neue Quickmail - - - Select newsletter source: - Wählen Sie Quelle des Newsletters aus: - - - Detailed Information - Detaillierte Informationen - - - Page is successfully fetched. - Seite ist erfolgreich ausgelesen. - - - Categories - Kategorien - - - Test Mail - Testversand - - - Mass Send - Massenversand - - - back - zurück - - - next - weiter - - - [write subject] - [Betreff schreiben] - - - YES - JA - - - Ending, parsetime: - Beendet, Laufzeit: - - - Invoked at - Aufgerufen: - - - Job begin - Auftrag begonnen - - - Job end - Auftrag beendet - - - Job No: - Auftrags-Nr.: - - - Nothing to do. - Keine Aufträge. - - - processed... - bearbeitet... - - - Sending - senden - - - mails using records from table - Sende E-Mail an Empfängern von Tabelle - - - sys_dmail record - Inhalt der Tabelle sys_dmail - - - Configuration - Konfigurationen - - - Direct Mail - Direct Mail - - - Mailer Engine - Versand-Status - - - Recipient Lists - Empfängerliste - - - Statistics - Statistiken - - - Download CSV file - Download CSV-Datei - - - Recipient List - Empfängerliste - - - Import CSV into 'ADDRESS' table - Import: CSV-Datei => 'ADDRESS' - Tabelle - - - Back - Zurück - - - Filter email dublettes from csv data. If a dublette is found, only the first entry is imported. - E-Mail-Dubletten in den CSV-Daten herausfiltern. Nur der erste CSV-Datensatz mit einer mehrfach vorkommenden E-Mail-Adresse wird importiert. - - - Only update/import valid emails from csv data. - Nur aktualisieren/importieren, wenn die zu importierende E-Mail ein gültiges Format besitzt. - - - Current file: - Derzeit gewählte Datei: - - - Import is finished. - Importvorgang ist fertig. - - - Field encapsulation character (data fields are encapsed with...): - Datenfelder sind mit diesem Zeichen eingeschlossen: - - - First row of import file has fieldnames: - Erste Datenreihe des CSV Importfiles enthält Feldnamen: - - - Import settings - Import Konfigurationen - - - Upload CSV - Hochladen CSV-Daten - - - Import - Importieren - - - All recipients receive HTML newsletter - Alle Empfängern bekommen HTML Newsletter - - - Categories - Kategorien - - - Assign the following categories to all recipients: - Weist folgende Kategorien an allen empfängern: - - - Add categories - Kategorien hinzufügen - - - Settings - Einstellungen - - - Please select the character set of the import file: - Wählen Sie den Zeichensatz der Import-Datei: - - - Field mapping - Feldzuordnung - - - Additional options - Zusatzoptionen - - - Description - Bezeichnung - - - Mapping error - Zuordnungsfehler - - - Please fix following error(s): - Korrigieren Sie folgenden Fehler: - - - "Email" field has to be mapped. - "Email" Feld muss zugeordnet werden. - - - No mapping is found. You have to map at least "email" field. - Es gib keine Zuordnung. "Email" Feld muss zugeordnet werden. - - - Maps to ... - Zuordnung ... - - - Mapping - Zuordnung - - - # - # - - - Value - Wert - - - Next - Weiter - - - OR - ODER - - - Overwrite existing file: - Bestehende Dateien überschreiben: - - - Paste the CSV data: - Einfügen der CSV-Daten: - - - Ready to import - Bereit zum Importieren - - - - - - - Specify the field which determines the uniqueness of imported users: - Feld, das die Einzigartigkeit der importierten Benutzer feststellt: - - - Remove all Addresses in the storage folder before importing: - Lösche alle vorhandenen Adresse-Datensätze im Speicherort vor dem Import: - - - Double records found in the CSV Data: - doppelte Datensatz in CSV-Daten: - - - Do not insert/update invalid emails found in csv data: - Folgende Einträge werden nicht aktualisiert/importiert, da die E-Mail-Adresse kein gültiges Format besitzt: - - - Insert the following records: - Folgende Einträge werden importiert: - - - Update the following records: - Folgende Einträge werden aktualisiert: - - - Field delimiter (data fields are separated by...): - Trennzeichen zwischen den einzelnen Datenfeldern (Feldtrenner): - - - colon [:] - Doppelpunkt [:] - - - comma [,] - Komma [,] - - - semicolon [;] - Semikolon [;] - - - horizontal tab [TAB] - Tabulator [TAB] - - - Please select the storage folder for the imported users: - Wählen Sie den Speicherort für die importierten Benutzer: - - - update - aktualisieren - - - Update existing user, instead renaming the new user: - Vorhandene Benutzer wird aktualisiert statt neuer Benutzer umzubenennen: - - - Choose a file from your local computer: - Wählen Sie eine CSV Import Datei von Ihrem lokalen Rechner: - - - List all recipients - Empfänger anzeigen - - - Plain List - Liste - - - Recipients from recipient list: - Empfänger der Gruppe: - - - Number of recipients: - Anzahl der Empfänger: - - - Address Table - Tabelle: Address - - - Custom Table - Benutzerdefinierte Tabelle - - - Website User Table - Tabelle: Website User - - - Assign categories to content elements - Ausschluss von Seiteninhalten anhand von Kategorien - - - There are no content elements on the page. - Es wurden keine Seiteninhalte auf der Seite gefunden. - - - Create a newsletter - Newsletter erstellen - - - Click here to create a new page that you can later send as a direct mail. - Klicken Sie hier, um eine neue TYPO3-Seite, die Sie später als Newsletter verschicken können, anzulegen. - - - Edit page - Seite ändern - - - ALL - ALLE - - - ONLY - NUR - - - Attach. - Anhang - - - Column - Spalte - - - Last mod. - Letzte Änderung: - - - Sent? - Verschickt? - - - Size - Größe - - - Subject - Betreff - - - Draft - Entwurf - - - PAGE - SEITE - - - EXT URL - Externe URL - - - Type - Typ - - - Update category settings - Kategorie-Einstellungen ändern - - - There are already %s Direct Mails based on this newsletter. Are you sure you want to create another one? - Für diesen Newsletter wurden bereits %s Versandobjekte erstellt. Sind Sie sicher, dass Sie einen weiteren Versand erstellen möchten? - - - Select a newsletter - Newsletter auswählen - - - There are no pages in the mail module. - Es gibt keine Seiten für diese Extension. - - - View page in HTML format - Seite in HTML-Format anzeigen - - - View page in Text format - Seite in TEXT-Format anzeigen - - - Break lines to 76 char: - Zeile nach 76 Buchstaben umbrechen: - - - Message: - Nachricht: - - - Sender Email: - Absender (E-Mail): - - - Sender Name: - Absender (Name): - - - New recipient list - Neue Versandgruppe - - - Create a new recipient list? - Neue Versandgruppe erstellen? - - - Amount: - Summe: - - - Click here to import CSV - Klicken Sie hier, um eine CSV-Datei einzulesen. - - - Select a recipient list - Auswahl der Versandgruppe - - - Recipient list: - Empfängerliste: - - - Send mail - recipient list - Auswahl der Versandgruppe - - - Send to all subscribers in recipient list - An alle Empfänger der Versandgruppe versenden - - - Send this as test newsletter - Dies ist ein Test-Newsletter - - - Distribution time (hh:mm dd-mm-yyyy): - Zeitpunkt des Versands (SS:MM TT-MM-YY): - - - Please select Direct Mail folder. - Bitte einen Direct Mail Verzeichnis auswählen. - - - Recipients: - Empfänger: - - - Sending mail - Mail verschicken - - - Mail scheduled for distribution - Die E-Mail wurde für den Versand freigeben. - - - The mail was scheduled for distribution at - Planversand der E-Mail: - - - The mail was sent. - Die E-Mail wurde verschickt. - - - The mail was sent to <strong>%s</strong>. - Die E-Mail wurde an <strong>%s</strong> verschickt. - - - The mail was sent to <strong>%s</strong> recipients. - Die E-Mail wurde an <strong>%s</strong> Empfänger verschickt. - - - CSV of returned recipients - CSV-Export der zurückgekommenen Empfänger - - - CSV of returned recipients with error in header - CSV-Datei der zurückgekommenen E-Mails (Fehler in Kopfzeile) - - - CSV of returned recipients with bad host - CSV-Datei der zurückgekommenen E-Mails (Unbekannter Server) - - - CSV of returned recipients with mailbox full - CSV-Datei der zurückgekommenen E-Mails (Postfach voll) - - - CSV of returned recipients for unknown reason - CSV-Datei der zurückgekommenen E-Mails (unbekannter Grund) - - - CSV of returned recipients with unknown recipient - CSV-Datei der zurückgekommenen E-Mails (Empfänger unbekannt) - - - HTML: - HTML: - - - HTML Link # - HTML Link # - - - HTML mails viewed: - Gelesen (HTML-Mails): - - - Bad host: - Falscher Host: - - - Count: - Anzahl: - - - Statistics for direct mail: - Versand-Statistik: - - - Disable returned recipients - Deaktiverung der zurückgekommenen Empfänger - - - Disable returned recipients with error in header - Zurückgekommene E-Mails (Fehler in Kopfzeile) deaktivieren - - - Disable returned recipients with bad host - Zurückgekommene E-Mails (Unbekannter Server) deaktivieren - - - Disable returned recipients with mailbox full - Zurückgekommene E-Mails (Postfach voll) deaktivieren - - - Disable returned recipients for unknown reason - Zurückgekommene E-Mails (unbekannter Grund) deaktivieren - - - Disable returned recipients with unknown recipient - Zurückgekommene E-Mail-Adressen (Empfänger unbekannt) deaktivieren - - - List of recipients from tt_address table: - Liste der tt_address Empfängern: - - - adresses disabled - Adressen deaktiviert - - - Email adresses of returned mails with error in header: - E-Mail-Adressen der zurückgekommen E-Mails (Fehler in Kopfzeile): - - - Email adresses of returned mails with bad host: - E-Mail-Adressen der zurückgekommen E-Mails (Unbekannter Server): - - - Email adresses of returned mails: - E-Mail-Adressen der zurückgekommenen Mails: - - - Email adresses of returned mails with mailbox full: - E-Mail-Adressen der zurückgekommen E-Mails (Postfach voll): - - - Email adresses of returned mails for unknown reason: - E-Mail-Adressen der zurückgekommen E-Mails (unbekannter Grund): - - - Email adresses of returned mails with unknown recipient: - E-Mail-Adressen der zurückgekommen E-Mails (Empfänger unbekannt): - - - Error in Header: - Fehler im Mail-Header: - - - General information: - Allgemeine Informationen: - - - Imagelink: - Bildlink: - - - Total responses/Unique responses: - Angeklickte Links per Empfänger: - - - List returned recipients - Liste der zurückgekommenen Empfänger - - - List returned recipients with error in header - Liste der zurückgekommenen E-Mails (Fehler in Kopfzeile) - - - List returned recipients with bad host - Liste der zurückgekommenen E-Mails (Unbekannter Server) - - - List returned recipients with mailbox full - Liste der zurückgekommenen E-Mails (Postfach voll) - - - List returned recipients for unknown reason - Liste der zurückgekommenen E-Mails (unbekannter Grund) - - - List returned recipients with unknown recipient - Liste der zurückgekommenen E-Mails (Empfänger unbekannt) - - - Mailbox full: - Postfach voll: - - - Mails returned: - Zurückgekommene E-Mails: - - - Mails sent: - Verschickte E-Mails: - - - Choose a newsletter - Wähle ein Newsletter aus - - - Delivery begun - Versand-Start - - - Delivery ended - Versand-Ende - - - Newsletter Statistics - Newsletter Statistiken - - - queuing - in der Warteschlange - - - Scheduled - Planzeit - - - sending - sendend - - - sent - verschickt - - - Status - Status - - - Subject - Betreff - - - # sent - # verschickt - - - Plaintext: - Plaintext: - - - Plaintext Link # - Plaintext Link # - - - Reason unknown: - Grund unbekannt: - - - Re-calculate Cached Data: - Neuberechnung der Daten aus dem Zwischenspeicher (Cache): - - - Re-calculate cached statistics data - Neuberechnung der Daten aus dem Zwischenspeicher (Cache) - - - Recipient unknown: - Unbekannte Empfänger: - - - Responses: - Reaktionen: - - - Link Responses: - Geklickte Links: - - - Total: - Insgesamt: - - - Total mails returned: - Insgesamt zurückgekommen: - - - Total responses (links clicked): - Reaktionen insgesamt (Anzahl Klicks): - - - Unique responses (links clicked): - Anzahl der klickenden Empfänger: - - - List of recipients from fe_users: - Liste der fe_users Empfängern: - - - website users disabled - Website-Benutzer deaktiviert - - - Subscriber Info - Abonnentsinfo - - - Subscriber Profile - Abonnentsprofil - - - Receive HTML based mails - empfange HTML E-Mail - - - Set categories of interest for the subscriber. - Stelle die Kategorien des Abonnents ein. - - - Update profile settings - Aktualisiere Profileinstellungen - - - Testmail - Individual - Individuelle Testmail - - - Select a recipient of the testmail. The mail will be generated based on the profile of the recipient you select. - Bitte geben Sie den Empfänger für die Testmail an. Die hier generierte E-Mail wird auf dem Profil des ausgewählten Empfängers basieren. - - - Testmail - Recipient list - Testmail an eine Versandgruppe - - - Select a recipient list for the testmail. The mails will be generated based on the profiles of the recipients in that list. - Bitte geben Sie die Versandgruppe für die Testmail an. Die hier generierte E-Mail wird auf dem Profil der ausgewählten Versandgruppe basieren. - - - Testmail - Simple - Einfache Testmail versenden - - - A simple testmail includes all mail elements regardless of category. But any USER_fields are not substituted with data. Enter an email-address for the testmail: - Eine einfache Testmail enthält alle Elemente ohne Rücksicht auf die Kategorie. Jedoch werden keine Benutzerdaten ersetzt. Dies ist nur im personalisierten Massenversand möglich. Geben Sie hier den Empfänger für die Testmail an: - - - Do it now - Jetzt konvertieren - - - The direct_mail data in the sys_dmail table need to be update. Please backup the sys_dmail table before clicking the following button. Convert the data? - Die direct_mail Datenformat in der sys_dmail Tabelle muss aktualisiert werden. Bitte sichern Sie die sys_dmail-Tabellen, bevor Sie den folgenden Button klicken. Die Konvertierung durchführen? - - - %d records are converted - %d Datensätze sind konvertiert. - - - Updater - Update - - - Important! - Wichtig! - - - [Click here to open the updater] - [Hier klicken um das Update-Skript auszuführen] - - - For the old data working with direct_mail version 3.0, data must be converted. - Damit die alten Daten mit direct_mail 3.0 funktionieren, müssen die Daten konvertiert werden. - - - Warning! Please read! - Achtung! Bitte lesen! - - - BEFORE
- you click on the "Do it now" buttons.]]> - BEVOR
- Sie den "Jetzt konvertieren" Button klicken.]]>
-
- - Delivery begun/ended: - Versand begonnen/beendet: - - - Direct Mail: - Versand: - - - Flowed text: - Fließender Text: - - - Sender: - Absender: - - - Email format/attachments: - Email-Format/Anhänge: - - - Include media: - Medien einbinden: - - - Recipient total/sent: - Empfänger insgesamt/verschickt: - - - Reply: - Antwort: - - - Yes - Ja - - -
-
\ No newline at end of file diff --git a/Resources/Private/Language/de.locallang_tca.xlf b/Resources/Private/Language/de.locallang_tca.xlf deleted file mode 100644 index 1413a545b..000000000 --- a/Resources/Private/Language/de.locallang_tca.xlf +++ /dev/null @@ -1,284 +0,0 @@ - - - -
- Labels for the Direct Mail tables - database - EXT:direct_mail/Resources/Private/Language/locallang_tca.xml - - Ivan Kartolo - ivan.kartolo@gmail.com - LFEditor -
- - - Subscribe to categories - Kategorien abonnieren - - - Recieve e-mails as HTML? - E-Mails im HTML-Format empfangen? - - - Activate Newsletter - Newsletter aktivieren - - - Direct mails - Direct-Mails - - - Parameters, HTML: - Parameter, HTML: - - - URL for HTML content: - URL für HTML-Inhalt: - - - Attachments: - Anhänge: - - - Fields used in the computation of authentication codes: - Für die Authentifizierung verwendete Felder: - - - Message text character set: - E-Mail-Zeichensatz (character set): - - - Use flowing text format in plain text content: - Fließendes Format (flowed) im Text-Format verwenden: - - - Sender email: - Absender-E-Mail: - - - Sender name: - Absender-Name: - - - Include images and other media in HTML content: - Bilder und andere Medien im HTML-Format einbinden: - - - Is sent: - Gesendet: - - - Redirect not only links longer than 76 characters but ALL links: - Nicht nur Links länger als 76 Zeichen, sondern ALLE Links: - - - Long links redirection url: - Lange Link-Redirect-URL (RDCT): - - - Organization: - Organisation: - - - Mail page: - Seiten senden: - - - Parameters, Plain text: - Parameter, normaler Text: - - - URL for plain text content: - URL für normalen Text: - - - Priority: - Priorität: - - - Low - Niedrig - - - High - Hoch - - - Compiled size: - Übertragungsgröße: - - - Reply email: - Antwort-E-Mail: - - - Reply name: - Antwort-Name: - - - Return Path: - Retouradresse (Return Path): - - - Scheduled time: - Planzeit: - - - Delivery start: - Versand-Start: - - - Delivery end: - Versand-Ende: - - - Format of mail content: - Format des E-Mails: - - - Plain text - Normaler Text - - - HTML - HTML - - - Subject: - Betreff: - - - Content transfer encoding: - E-Mail-Übertragungsformat (transfer encoding): - - - TYPO3 Page - TYPO3-Seite - - - External URL - Externe URL - - - Redirect links longer than 76 characters: - Links länger als 76 Zeichen umleiten (Redirect): - - - Direct Mail Category - Direct-Mail-Kategorie - - - Category: - Kategorie - - - Recipient list - Versandgruppe - - - Configuration - Konfigurationen - - - Separate emails by space/comma/linebreak - Trennung der Emails durch Leerzeichen/Kommata/Zeilenumbruch - - - CSV [name],[email] - CSV [name],[email] - - - Recipients: - Empfänger: - - - Other recipient lists: - Andere Versandgruppen: - - - Must subscribe to one of the categories: - Kategorien müssen übereinstimmen: - - - - Kat 0 - - - - Kat 1 - - - - Kat 2 - - - - Kat 3 - - - - Kat 4 - - - - Kat 5 - - - - Kat 6 - - - - Kat 7 - - - - Kat 8 - - - - Kat 9 - - - Recipients: - Empfänger: - - - From pages - Von Seiten - - - Plain list - Normale Liste - - - Static list - Statische Gruppe - - - Special query - Spezielle Anfrage - - - From other recipient lists - Andere Mailgruppe - - - Types of records: - Tabellen: - - - Address - Adresse - - - Website user - Website-Benutzer - - - From custom-defined table - Benutzerdefinierte Tabelle - - -
-
\ No newline at end of file From 0ee4725eef43806e58ac7b8ecc2eac28c55197cd Mon Sep 17 00:00:00 2001 From: Lars Tode Date: Fri, 2 Sep 2016 23:05:24 +0200 Subject: [PATCH 22/56] [TASK] Moves icons from res/gfs to Resources/Public/Icons --- Configuration/TCA/sys_dmail.php | 2 +- Configuration/TCA/sys_dmail_category.php | 2 +- Configuration/TCA/sys_dmail_group.php | 2 +- .../EnablingClickStatistics/Index.rst | 2 +- .../gfx => Resources/Public/Icons}/attach.gif | Bin {res/gfx => Resources/Public/Icons}/dmail.gif | Bin .../Public/Icons}/dmail_list.gif | Bin .../Public/Icons}/dmailerping.gif | Bin .../Public/Icons}/ext_icon_dmail_folder.gif | Bin .../Icons}/icon_tx_directmail_category.gif | Bin {res/gfx => Resources/Public/Icons}/mail.gif | Bin .../Public/Icons}/mailgroup.gif | Bin .../Public/Icons}/modules_dmail.gif | Bin .../Public/Icons}/modules_dmail__h.gif | Bin .../Public/Icons}/newmail.gif | Bin .../Public/Icons}/preview_html.gif | Bin .../Public/Icons}/preview_txt.gif | Bin ext_emconf.php | 2 +- ext_localconf.php | 24 +++++++++--------- ext_tables.php | 2 +- 20 files changed, 18 insertions(+), 18 deletions(-) rename {res/gfx => Resources/Public/Icons}/attach.gif (100%) rename {res/gfx => Resources/Public/Icons}/dmail.gif (100%) rename {res/gfx => Resources/Public/Icons}/dmail_list.gif (100%) rename {res/gfx => Resources/Public/Icons}/dmailerping.gif (100%) rename {res/gfx => Resources/Public/Icons}/ext_icon_dmail_folder.gif (100%) rename {res/gfx => Resources/Public/Icons}/icon_tx_directmail_category.gif (100%) rename {res/gfx => Resources/Public/Icons}/mail.gif (100%) rename {res/gfx => Resources/Public/Icons}/mailgroup.gif (100%) rename {res/gfx => Resources/Public/Icons}/modules_dmail.gif (100%) rename {res/gfx => Resources/Public/Icons}/modules_dmail__h.gif (100%) rename {res/gfx => Resources/Public/Icons}/newmail.gif (100%) rename {res/gfx => Resources/Public/Icons}/preview_html.gif (100%) rename {res/gfx => Resources/Public/Icons}/preview_txt.gif (100%) diff --git a/Configuration/TCA/sys_dmail.php b/Configuration/TCA/sys_dmail.php index 826f50781..e6741a6dc 100644 --- a/Configuration/TCA/sys_dmail.php +++ b/Configuration/TCA/sys_dmail.php @@ -8,7 +8,7 @@ 'prependAtCopy' => 'LLL:EXT:lang/locallang_general.xlf:LGL.prependAtCopy', 'title' => 'LLL:EXT:direct_mail/Resources/Private/Language/locallang_tca.xlf:sys_dmail', 'delete' => 'deleted', - 'iconfile' => TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('direct_mail') . 'res/gfx/mail.gif', + 'iconfile' => TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('direct_mail') . 'Resources/Public/Icons/mail.gif', 'type' => 'type', 'useColumnsForDefaultValues' => 'from_email,from_name,replyto_email,replyto_name,organisation,priority,encoding,charset,sendOptions,type', 'dividers2tabs' => true, diff --git a/Configuration/TCA/sys_dmail_category.php b/Configuration/TCA/sys_dmail_category.php index 12376ae83..b5156264c 100644 --- a/Configuration/TCA/sys_dmail_category.php +++ b/Configuration/TCA/sys_dmail_category.php @@ -15,7 +15,7 @@ 'enablecolumns' => array( 'disabled' => 'hidden', ), - 'iconfile' => TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('direct_mail') . 'res/gfx/icon_tx_directmail_category.gif', + 'iconfile' => TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('direct_mail') . 'Resources/Public/Icons/icon_tx_directmail_category.gif', ), 'interface' => array( 'showRecordFieldList' => 'hidden,category' diff --git a/Configuration/TCA/sys_dmail_group.php b/Configuration/TCA/sys_dmail_group.php index 872eaa683..3ef44ebb5 100644 --- a/Configuration/TCA/sys_dmail_group.php +++ b/Configuration/TCA/sys_dmail_group.php @@ -8,7 +8,7 @@ 'prependAtCopy' => 'LLL:EXT:lang/locallang_general.xlf:LGL.prependAtCopy', 'title' => 'LLL:EXT:direct_mail/Resources/Private/Language/locallang_tca.xlf:sys_dmail_group', 'delete' => 'deleted', - 'iconfile' => TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('direct_mail') . 'res/gfx/mailgroup.gif', + 'iconfile' => TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('direct_mail') . 'Resources/Public/Icons/mailgroup.gif', 'type' => 'type', ), 'interface' => array( diff --git a/Documentation/Configuration/EnablingClickStatistics/Index.rst b/Documentation/Configuration/EnablingClickStatistics/Index.rst index 975f8147c..c99b6231c 100644 --- a/Documentation/Configuration/EnablingClickStatistics/Index.rst +++ b/Documentation/Configuration/EnablingClickStatistics/Index.rst @@ -41,7 +41,7 @@ Example: :: - + Note that the result of the jumpurl setting on the above HTML line is that the src attribute will be replaced by one that refers to the diff --git a/res/gfx/attach.gif b/Resources/Public/Icons/attach.gif similarity index 100% rename from res/gfx/attach.gif rename to Resources/Public/Icons/attach.gif diff --git a/res/gfx/dmail.gif b/Resources/Public/Icons/dmail.gif similarity index 100% rename from res/gfx/dmail.gif rename to Resources/Public/Icons/dmail.gif diff --git a/res/gfx/dmail_list.gif b/Resources/Public/Icons/dmail_list.gif similarity index 100% rename from res/gfx/dmail_list.gif rename to Resources/Public/Icons/dmail_list.gif diff --git a/res/gfx/dmailerping.gif b/Resources/Public/Icons/dmailerping.gif similarity index 100% rename from res/gfx/dmailerping.gif rename to Resources/Public/Icons/dmailerping.gif diff --git a/res/gfx/ext_icon_dmail_folder.gif b/Resources/Public/Icons/ext_icon_dmail_folder.gif similarity index 100% rename from res/gfx/ext_icon_dmail_folder.gif rename to Resources/Public/Icons/ext_icon_dmail_folder.gif diff --git a/res/gfx/icon_tx_directmail_category.gif b/Resources/Public/Icons/icon_tx_directmail_category.gif similarity index 100% rename from res/gfx/icon_tx_directmail_category.gif rename to Resources/Public/Icons/icon_tx_directmail_category.gif diff --git a/res/gfx/mail.gif b/Resources/Public/Icons/mail.gif similarity index 100% rename from res/gfx/mail.gif rename to Resources/Public/Icons/mail.gif diff --git a/res/gfx/mailgroup.gif b/Resources/Public/Icons/mailgroup.gif similarity index 100% rename from res/gfx/mailgroup.gif rename to Resources/Public/Icons/mailgroup.gif diff --git a/res/gfx/modules_dmail.gif b/Resources/Public/Icons/modules_dmail.gif similarity index 100% rename from res/gfx/modules_dmail.gif rename to Resources/Public/Icons/modules_dmail.gif diff --git a/res/gfx/modules_dmail__h.gif b/Resources/Public/Icons/modules_dmail__h.gif similarity index 100% rename from res/gfx/modules_dmail__h.gif rename to Resources/Public/Icons/modules_dmail__h.gif diff --git a/res/gfx/newmail.gif b/Resources/Public/Icons/newmail.gif similarity index 100% rename from res/gfx/newmail.gif rename to Resources/Public/Icons/newmail.gif diff --git a/res/gfx/preview_html.gif b/Resources/Public/Icons/preview_html.gif similarity index 100% rename from res/gfx/preview_html.gif rename to Resources/Public/Icons/preview_html.gif diff --git a/res/gfx/preview_txt.gif b/Resources/Public/Icons/preview_txt.gif similarity index 100% rename from res/gfx/preview_txt.gif rename to Resources/Public/Icons/preview_txt.gif diff --git a/ext_emconf.php b/ext_emconf.php index ddb34eab7..f41a8a6da 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -49,7 +49,7 @@ 'suggests' => array( ), ), - '_md5_values_when_last_written' => 'a:99:{s:9:"ChangeLog";s:4:"c147";s:20:"class.ext_update.php";s:4:"0ab1";s:31:"class.tx_directmail_gabriel.php";s:4:"6de4";s:33:"class.tx_directmail_scheduler.php";s:4:"1a0e";s:16:"ext_autoload.php";s:4:"2e3e";s:21:"ext_conf_template.txt";s:4:"7c49";s:12:"ext_icon.gif";s:4:"a143";s:17:"ext_localconf.php";s:4:"33b2";s:14:"ext_tables.php";s:4:"bc0a";s:14:"ext_tables.sql";s:4:"2388";s:17:"locallang_tca.xml";s:4:"6e8b";s:35:"Classes/Scheduler/MailFromDraft.php";s:4:"4f4c";s:52:"Classes/Scheduler/MailFromDraft_AdditionalFields.php";s:4:"eaa9";s:21:"Configuration/tca.php";s:4:"0000";s:42:"Interfaces/Scheduler/MailFromDraftHook.php";s:4:"938b";s:40:"Resources/Public/StyleSheets/modules.css";s:4:"bf1f";s:23:"cli/cli_direct_mail.php";s:4:"a2b3";s:14:"doc/manual.sxw";s:4:"811a";s:36:"locallang/locallang_csh_sysdmail.xml";s:4:"f4a1";s:39:"locallang/locallang_csh_sysdmailcat.xml";s:4:"a2b1";s:37:"locallang/locallang_csh_sysdmailg.xml";s:4:"0ecd";s:42:"locallang/locallang_csh_txdirectmailM2.xml";s:4:"2fa2";s:42:"locallang/locallang_csh_txdirectmailM3.xml";s:4:"3846";s:42:"locallang/locallang_csh_txdirectmailM4.xml";s:4:"761f";s:42:"locallang/locallang_csh_txdirectmailM5.xml";s:4:"e511";s:42:"locallang/locallang_csh_txdirectmailM6.xml";s:4:"3f6d";s:44:"locallang/locallang_csh_web_txdirectmail.xml";s:4:"1764";s:30:"locallang/locallang_mod2-6.xml";s:4:"d14a";s:14:"mod1/clear.gif";s:4:"cc11";s:13:"mod1/conf.php";s:4:"f25a";s:14:"mod1/index.php";s:4:"4f8b";s:22:"mod1/locallang_mod.xml";s:4:"9b3c";s:17:"mod1/mod_icon.gif";s:4:"a143";s:22:"mod1/mod_template.html";s:4:"65bd";s:34:"mod2/class.tx_directmail_dmail.php";s:4:"5beb";s:13:"mod2/conf.php";s:4:"f24c";s:14:"mod2/index.php";s:4:"6421";s:22:"mod2/locallang_mod.xml";s:4:"6088";s:17:"mod2/mod_icon.gif";s:4:"a143";s:22:"mod2/mod_template.html";s:4:"f729";s:43:"mod3/class.tx_directmail_recipient_list.php";s:4:"7ad3";s:14:"mod3/clear.gif";s:4:"cc11";s:13:"mod3/conf.php";s:4:"ba64";s:14:"mod3/index.php";s:4:"e742";s:22:"mod3/locallang_mod.xml";s:4:"c2ce";s:17:"mod3/mod_icon.gif";s:4:"a143";s:22:"mod3/mod_template.html";s:4:"2581";s:39:"mod4/class.tx_directmail_statistics.php";s:4:"95da";s:14:"mod4/clear.gif";s:4:"cc11";s:13:"mod4/conf.php";s:4:"2c51";s:14:"mod4/index.php";s:4:"e2b7";s:22:"mod4/locallang_mod.xml";s:4:"fc77";s:17:"mod4/mod_icon.gif";s:4:"a143";s:22:"mod4/mod_template.html";s:4:"2581";s:42:"mod5/class.tx_directmail_mailer_engine.php";s:4:"8129";s:14:"mod5/clear.gif";s:4:"cc11";s:13:"mod5/conf.php";s:4:"4ad5";s:14:"mod5/index.php";s:4:"2077";s:22:"mod5/locallang_mod.xml";s:4:"a0d7";s:17:"mod5/mod_icon.gif";s:4:"a143";s:22:"mod5/mod_template.html";s:4:"2581";s:42:"mod6/class.tx_directmail_configuration.php";s:4:"9037";s:14:"mod6/clear.gif";s:4:"cc11";s:13:"mod6/conf.php";s:4:"2862";s:14:"mod6/index.php";s:4:"c58e";s:22:"mod6/locallang_mod.xml";s:4:"87d6";s:17:"mod6/mod_icon.gif";s:4:"a143";s:31:"pi1/class.tx_directmail_pi1.php";s:4:"ef59";s:17:"pi1/locallang.php";s:4:"ff9e";s:17:"pi1/locallang.xml";s:4:"2d6b";s:36:"pi1/tx_directmail_pi1_plaintext.tmpl";s:4:"2027";s:18:"res/gfx/attach.gif";s:4:"5559";s:17:"res/gfx/dmail.gif";s:4:"4d4f";s:22:"res/gfx/dmail_list.gif";s:4:"8d58";s:23:"res/gfx/dmailerping.gif";s:4:"cc11";s:33:"res/gfx/ext_icon_dmail_folder.gif";s:4:"a143";s:39:"res/gfx/icon_tx_directmail_category.gif";s:4:"9398";s:16:"res/gfx/mail.gif";s:4:"4174";s:21:"res/gfx/mailgroup.gif";s:4:"1cc5";s:25:"res/gfx/modules_dmail.gif";s:4:"a143";s:28:"res/gfx/modules_dmail__h.gif";s:4:"040c";s:19:"res/gfx/newmail.gif";s:4:"ffa9";s:24:"res/gfx/preview_html.gif";s:4:"1e65";s:23:"res/gfx/preview_txt.gif";s:4:"4d9a";s:29:"res/scripts/class.dmailer.php";s:4:"4089";s:32:"res/scripts/class.mailselect.php";s:4:"43dd";s:30:"res/scripts/class.readmail.php";s:4:"c526";s:48:"res/scripts/class.tx_directmail_checkjumpurl.php";s:4:"6bf9";s:45:"res/scripts/class.tx_directmail_container.php";s:4:"b13c";s:44:"res/scripts/class.tx_directmail_importer.php";s:4:"6f7e";s:53:"res/scripts/class.tx_directmail_select_categories.php";s:4:"0c1f";s:42:"res/scripts/class.tx_directmail_static.php";s:4:"171f";s:47:"res/scripts/class.tx_directmail_tsparserext.php";s:4:"a5fe";s:52:"res/scripts/class.tx_directmail_ttnews_plaintext.php";s:4:"c28d";s:28:"res/scripts/returnmail.phpsh";s:4:"c0be";s:27:"static/boundaries/setup.txt";s:4:"9409";s:30:"static/plaintext/constants.txt";s:4:"59ce";s:26:"static/plaintext/setup.txt";s:4:"ee48";s:34:"static/tt_news_plaintext/setup.txt";s:4:"1a31";}', + '_md5_values_when_last_written' => 'a:99:{s:9:"ChangeLog";s:4:"c147";s:20:"class.ext_update.php";s:4:"0ab1";s:31:"class.tx_directmail_gabriel.php";s:4:"6de4";s:33:"class.tx_directmail_scheduler.php";s:4:"1a0e";s:16:"ext_autoload.php";s:4:"2e3e";s:21:"ext_conf_template.txt";s:4:"7c49";s:12:"ext_icon.gif";s:4:"a143";s:17:"ext_localconf.php";s:4:"33b2";s:14:"ext_tables.php";s:4:"bc0a";s:14:"ext_tables.sql";s:4:"2388";s:17:"locallang_tca.xml";s:4:"6e8b";s:35:"Classes/Scheduler/MailFromDraft.php";s:4:"4f4c";s:52:"Classes/Scheduler/MailFromDraft_AdditionalFields.php";s:4:"eaa9";s:21:"Configuration/tca.php";s:4:"0000";s:42:"Interfaces/Scheduler/MailFromDraftHook.php";s:4:"938b";s:40:"Resources/Public/StyleSheets/modules.css";s:4:"bf1f";s:23:"cli/cli_direct_mail.php";s:4:"a2b3";s:14:"doc/manual.sxw";s:4:"811a";s:36:"locallang/locallang_csh_sysdmail.xml";s:4:"f4a1";s:39:"locallang/locallang_csh_sysdmailcat.xml";s:4:"a2b1";s:37:"locallang/locallang_csh_sysdmailg.xml";s:4:"0ecd";s:42:"locallang/locallang_csh_txdirectmailM2.xml";s:4:"2fa2";s:42:"locallang/locallang_csh_txdirectmailM3.xml";s:4:"3846";s:42:"locallang/locallang_csh_txdirectmailM4.xml";s:4:"761f";s:42:"locallang/locallang_csh_txdirectmailM5.xml";s:4:"e511";s:42:"locallang/locallang_csh_txdirectmailM6.xml";s:4:"3f6d";s:44:"locallang/locallang_csh_web_txdirectmail.xml";s:4:"1764";s:30:"locallang/locallang_mod2-6.xml";s:4:"d14a";s:14:"mod1/clear.gif";s:4:"cc11";s:13:"mod1/conf.php";s:4:"f25a";s:14:"mod1/index.php";s:4:"4f8b";s:22:"mod1/locallang_mod.xml";s:4:"9b3c";s:17:"mod1/mod_icon.gif";s:4:"a143";s:22:"mod1/mod_template.html";s:4:"65bd";s:34:"mod2/class.tx_directmail_dmail.php";s:4:"5beb";s:13:"mod2/conf.php";s:4:"f24c";s:14:"mod2/index.php";s:4:"6421";s:22:"mod2/locallang_mod.xml";s:4:"6088";s:17:"mod2/mod_icon.gif";s:4:"a143";s:22:"mod2/mod_template.html";s:4:"f729";s:43:"mod3/class.tx_directmail_recipient_list.php";s:4:"7ad3";s:14:"mod3/clear.gif";s:4:"cc11";s:13:"mod3/conf.php";s:4:"ba64";s:14:"mod3/index.php";s:4:"e742";s:22:"mod3/locallang_mod.xml";s:4:"c2ce";s:17:"mod3/mod_icon.gif";s:4:"a143";s:22:"mod3/mod_template.html";s:4:"2581";s:39:"mod4/class.tx_directmail_statistics.php";s:4:"95da";s:14:"mod4/clear.gif";s:4:"cc11";s:13:"mod4/conf.php";s:4:"2c51";s:14:"mod4/index.php";s:4:"e2b7";s:22:"mod4/locallang_mod.xml";s:4:"fc77";s:17:"mod4/mod_icon.gif";s:4:"a143";s:22:"mod4/mod_template.html";s:4:"2581";s:42:"mod5/class.tx_directmail_mailer_engine.php";s:4:"8129";s:14:"mod5/clear.gif";s:4:"cc11";s:13:"mod5/conf.php";s:4:"4ad5";s:14:"mod5/index.php";s:4:"2077";s:22:"mod5/locallang_mod.xml";s:4:"a0d7";s:17:"mod5/mod_icon.gif";s:4:"a143";s:22:"mod5/mod_template.html";s:4:"2581";s:42:"mod6/class.tx_directmail_configuration.php";s:4:"9037";s:14:"mod6/clear.gif";s:4:"cc11";s:13:"mod6/conf.php";s:4:"2862";s:14:"mod6/index.php";s:4:"c58e";s:22:"mod6/locallang_mod.xml";s:4:"87d6";s:17:"mod6/mod_icon.gif";s:4:"a143";s:31:"pi1/class.tx_directmail_pi1.php";s:4:"ef59";s:17:"pi1/locallang.php";s:4:"ff9e";s:17:"pi1/locallang.xml";s:4:"2d6b";s:36:"pi1/tx_directmail_pi1_plaintext.tmpl";s:4:"2027";s:33:"Resources/Public/Icons/attach.gif";s:4:"5559";s:32:"Resources/Public/Icons/dmail.gif";s:4:"4d4f";s:37:"Resources/Public/Icons/dmail_list.gif";s:4:"8d58";s:38:"Resources/Public/Icons/dmailerping.gif";s:4:"cc11";s:48:"Resources/Public/Icons/ext_icon_dmail_folder.gif";s:4:"a143";s:54:"Resources/Public/Icons/icon_tx_directmail_category.gif";s:4:"9398";s:31:"Resources/Public/Icons/mail.gif";s:4:"4174";s:36:"Resources/Public/Icons/mailgroup.gif";s:4:"1cc5";s:40:"Resources/Public/Icons/modules_dmail.gif";s:4:"a143";s:43:"Resources/Public/Icons/modules_dmail__h.gif";s:4:"040c";s:34:"Resources/Public/Icons/newmail.gif";s:4:"ffa9";s:39:"Resources/Public/Icons/preview_html.gif";s:4:"1e65";s:38:"Resources/Public/Icons/preview_txt.gif";s:4:"4d9a";s:29:"res/scripts/class.dmailer.php";s:4:"4089";s:32:"res/scripts/class.mailselect.php";s:4:"43dd";s:30:"res/scripts/class.readmail.php";s:4:"c526";s:48:"res/scripts/class.tx_directmail_checkjumpurl.php";s:4:"6bf9";s:45:"res/scripts/class.tx_directmail_container.php";s:4:"b13c";s:44:"res/scripts/class.tx_directmail_importer.php";s:4:"6f7e";s:53:"res/scripts/class.tx_directmail_select_categories.php";s:4:"0c1f";s:42:"res/scripts/class.tx_directmail_static.php";s:4:"171f";s:47:"res/scripts/class.tx_directmail_tsparserext.php";s:4:"a5fe";s:52:"res/scripts/class.tx_directmail_ttnews_plaintext.php";s:4:"c28d";s:28:"res/scripts/returnmail.phpsh";s:4:"c0be";s:27:"static/boundaries/setup.txt";s:4:"9409";s:30:"static/plaintext/constants.txt";s:4:"59ce";s:26:"static/plaintext/setup.txt";s:4:"ee48";s:34:"static/tt_news_plaintext/setup.txt";s:4:"1a31";}', 'suggests' => array( ), 'autoload' => array( diff --git a/ext_localconf.php b/ext_localconf.php index 6acc36581..1a3806c91 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -10,18 +10,18 @@ $iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class); $icons = array( - 'directmail-attachment' => array('source' => 'EXT:direct_mail/res/gfx/attach.gif'), - 'directmail-dmail' => array('source' => 'EXT:direct_mail/res/gfx/dmail.gif'), - 'directmail-dmail-list' => array('source' => 'EXT:direct_mail/res/gfx/dmail_list.gif'), - 'directmail-folder' => array('source' => 'EXT:direct_mail/res/gfx/ext_icon_dmail_folder.gif'), - 'directmail-category' => array('source' => 'EXT:direct_mail/res/gfx/icon_tx_directmail_category.gif'), - 'directmail-mail' => array('source' => 'EXT:direct_mail/res/gfx/mail.gif'), - 'directmail-mailgroup' => array('source' => 'EXT:direct_mail/res/gfx/mailgroup.gif'), - 'directmail-page-modules-dmail' => array('source' => 'EXT:direct_mail/res/gfx/modules_dmail.gif'), - 'directmail-page-modules-dmail-inactive' => array('source' => 'EXT:direct_mail/res/gfx/modules_dmail__h.gif'), - 'directmail-dmail-new' => array('source' => 'EXT:direct_mail/res/gfx/newmail.gif'), - 'directmail-dmail-preview-html' => array('source' => 'EXT:direct_mail/res/gfx/preview_html.gif'), - 'directmail-dmail-preview-text' => array('source' => 'EXT:direct_mail/res/gfx/preview_txt.gif'), + 'directmail-attachment' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/attach.gif'), + 'directmail-dmail' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/dmail.gif'), + 'directmail-dmail-list' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/dmail_list.gif'), + 'directmail-folder' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/ext_icon_dmail_folder.gif'), + 'directmail-category' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/icon_tx_directmail_category.gif'), + 'directmail-mail' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/mail.gif'), + 'directmail-mailgroup' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/mailgroup.gif'), + 'directmail-page-modules-dmail' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/modules_dmail.gif'), + 'directmail-page-modules-dmail-inactive' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/modules_dmail__h.gif'), + 'directmail-dmail-new' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/newmail.gif'), + 'directmail-dmail-preview-html' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/preview_html.gif'), + 'directmail-dmail-preview-text' => array('source' => 'EXT:direct_mail/Resources/Public/Icons/preview_txt.gif'), ); diff --git a/ext_tables.php b/ext_tables.php index 1701aa5f7..ae74c6083 100755 --- a/ext_tables.php +++ b/ext_tables.php @@ -151,7 +151,7 @@ } -$GLOBALS['TBE_STYLES']['spritemanager']['singleIcons']['tcarecords-pages-contains-dmail'] = TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'res/gfx/ext_icon_dmail_folder.gif'; +$GLOBALS['TBE_STYLES']['spritemanager']['singleIcons']['tcarecords-pages-contains-dmail'] = TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Icons/ext_icon_dmail_folder.gif'; if (is_array($GLOBALS['TCA']['pages']['ctrl']['typeicon_classes'])) { $GLOBALS['TCA']['pages']['ctrl']['typeicon_classes']['contains-dmail'] = 'tcarecords-pages-contains-dmail'; } From 87e4efe5e9acbb3c8c07a8b11f69e7a36caeaf01 Mon Sep 17 00:00:00 2001 From: Lars Tode Date: Fri, 2 Sep 2016 23:09:56 +0200 Subject: [PATCH 23/56] [TASK] Updates required PHP version --- ext_emconf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext_emconf.php b/ext_emconf.php index f41a8a6da..340cbd44e 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -36,7 +36,7 @@ 'depends' => array( 'cms' => '', 'tt_address' => '', - 'php' => '5.3.0', + 'php' => '5.3.0-5.5.99', 'typo3' => '7.6.0-7.6.99', 'jumpurl' => '7.6.0-7.6.99', ), From 0517341e8f56fe19f2edc9249ceb3cdd033a9b14 Mon Sep 17 00:00:00 2001 From: kraftb Date: Mon, 5 Sep 2016 14:02:09 +0200 Subject: [PATCH 24/56] Updated PHP version requirement As the extension uses the "::class" keyword/operator the PHP version requirement has to get raised to 5.5 --- ext_emconf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext_emconf.php b/ext_emconf.php index 340cbd44e..c398b53b4 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -36,7 +36,7 @@ 'depends' => array( 'cms' => '', 'tt_address' => '', - 'php' => '5.3.0-5.5.99', + 'php' => '5.5.0', 'typo3' => '7.6.0-7.6.99', 'jumpurl' => '7.6.0-7.6.99', ), From 219251d720076be8b179f7f931348f0cfe8d0e5f Mon Sep 17 00:00:00 2001 From: Ivan Kartolo Date: Mon, 12 Sep 2016 21:44:14 +0200 Subject: [PATCH 25/56] [BUGFIX] set FE group per hook Resolves: #24 Releases: master Change-Id: Ie95d092eb93c3db287c179824e7121ffc4e5aa7a --- Classes/Hooks/TypoScriptFrontendController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Hooks/TypoScriptFrontendController.php b/Classes/Hooks/TypoScriptFrontendController.php index 97f1964c7..563fe2318 100644 --- a/Classes/Hooks/TypoScriptFrontendController.php +++ b/Classes/Hooks/TypoScriptFrontendController.php @@ -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 From 342293570147249e865784974775983113c223a0 Mon Sep 17 00:00:00 2001 From: Ruud Silvrants Date: Fri, 14 Oct 2016 14:29:43 +0200 Subject: [PATCH 26/56] [TASK] Adjust iconpath to Resources/Public/Icons --- ext_tables.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ext_tables.php b/ext_tables.php index ae74c6083..9825bd865 100755 --- a/ext_tables.php +++ b/ext_tables.php @@ -168,17 +168,17 @@ $iconRegistry->registerIcon( 'direct_mail_newmail', \TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class, - ['source' => 'EXT:' . $_EXTKEY . '/res/gfx/newmail.gif'] + ['source' => 'EXT:' . $_EXTKEY . '/Resources/Public/Icons/newmail.gif'] ); $iconRegistry->registerIcon( 'direct_mail_preview_html', \TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class, - ['source' => 'EXT:' . $_EXTKEY . '/res/gfx/preview_html.gif'] + ['source' => 'EXT:' . $_EXTKEY . '/Resources/Public/Icons/preview_html.gif'] ); $iconRegistry->registerIcon( 'direct_mail_preview_plain', \TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class, - ['source' => 'EXT:' . $_EXTKEY . '/res/gfx/preview_txt.gif'] + ['source' => 'EXT:' . $_EXTKEY . '/Resources/Public/Icons/preview_txt.gif'] ); \ No newline at end of file From 7c6eeb4c5b725866544025683a2e9bc6dd0f2dfc Mon Sep 17 00:00:00 2001 From: Ruud Silvrants Date: Fri, 14 Oct 2016 14:35:27 +0200 Subject: [PATCH 27/56] [TASK] Add label no_recipient_groups_found to locallang --- Classes/Module/Dmail.php | 2 +- Resources/Private/Language/locallang_mod2-6.xlf | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Classes/Module/Dmail.php b/Classes/Module/Dmail.php index e7c3fd7f7..5e05f7686 100644 --- a/Classes/Module/Dmail.php +++ b/Classes/Module/Dmail.php @@ -902,7 +902,7 @@ public function cmd_finalmail($direct_mail_row) if (count($opt) === 0) { /** @var $flashMessage FlashMessage */ $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', - 'No recipient groups found', + $this->getLanguageService()->getLL('error.no_recipient_groups_found'), '', FlashMessage::ERROR //severity ); diff --git a/Resources/Private/Language/locallang_mod2-6.xlf b/Resources/Private/Language/locallang_mod2-6.xlf index 4027042b3..89fa3f8f2 100644 --- a/Resources/Private/Language/locallang_mod2-6.xlf +++ b/Resources/Private/Language/locallang_mod2-6.xlf @@ -1021,6 +1021,9 @@ By clicking on the "Import" button below, all data will be written in tt_address Yes + + No recipient groups found + \ No newline at end of file From f5025c36521321ef0e6b4e862d0d1f628596e99b Mon Sep 17 00:00:00 2001 From: Malte Koitka Date: Tue, 25 Oct 2016 14:50:33 +0200 Subject: [PATCH 28/56] [FEATURE] Add a new hook for link reponse output --- Classes/Module/Statistics.php | 19 ++++++++++++++++++- Documentation/Configuration/Hooks/Index.rst | 15 +++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/Classes/Module/Statistics.php b/Classes/Module/Statistics.php index 786ec6cb4..7a3e70ff2 100644 --- a/Classes/Module/Statistics.php +++ b/Classes/Module/Statistics.php @@ -839,7 +839,24 @@ public function cmd_stats($row) if ($urlCounter['total']) { $output .= '

' . $this->getLanguageService()->getLL('stats_response_link') . '

'; - $output .= DirectMailUtility::formatTable($tblLines, array('nowrap', 'nowrap width="100"', 'nowrap width="100"', 'nowrap', 'nowrap', 'nowrap', 'nowrap'), 1, array(1, 0, 0, 0, 0, 0, 1)); + + /** + * Hook for cmd_stats_linkResponses + */ + if (is_array ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['direct_mail']['mod4']['cmd_stats_linkResponses'])) { + $hookObjectsArr = array(); + foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['direct_mail']['mod4']['cmd_stats_linkResponses'] as $classRef) { + $hookObjectsArr[] = &GeneralUtility::getUserObj($classRef); + } + + foreach($hookObjectsArr as $hookObj) { + if (method_exists($hookObj, 'cmd_stats_linkResponses')) { + $output .= $hookObj->cmd_stats_linkResponses($tblLines, $this); + } + } + } else { + $output .= DirectMailUtility::formatTable($tblLines, array('nowrap', 'nowrap width="100"', 'nowrap width="100"', 'nowrap', 'nowrap', 'nowrap', 'nowrap'), 1, array(1, 0, 0, 0, 0, 0, 1)); + } } diff --git a/Documentation/Configuration/Hooks/Index.rst b/Documentation/Configuration/Hooks/Index.rst index 21f075bf1..6b5c10149 100755 --- a/Documentation/Configuration/Hooks/Index.rst +++ b/Documentation/Configuration/Hooks/Index.rst @@ -51,6 +51,21 @@ cmd_stats Description This hook can be used to influence the output of the overall statistic output +.. _hooks_cmd_stats_linkResponses: +cmd_stats_linkResponses +''''''''' + +.. container:: table-row + + Property + ``$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['direct_mail']['mod4']['cmd_stats_linkResponses']`` + + Method + ``cmd_stats_linkResponses`` + + Description + This hook can be used to influence the output of the statistics section "link responses" + .. _hooks_renderCType: renderCType ''''''''''' From e1cc7586c2276074f432d78e88d854d6ecf78f37 Mon Sep 17 00:00:00 2001 From: Johannes Kasberger Date: Thu, 27 Oct 2016 14:03:46 +0200 Subject: [PATCH 29/56] [BUGFIX] declare getFEgroupSubgroups as static function Resolves #31 --- Classes/DirectMailUtility.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/DirectMailUtility.php b/Classes/DirectMailUtility.php index 00d10eb62..b88b8ffb4 100644 --- a/Classes/DirectMailUtility.php +++ b/Classes/DirectMailUtility.php @@ -863,7 +863,7 @@ public static function getRecordList(array $listArr, $table, $pageId, $editLinkF * * @return array The all id of fe_groups */ - public function getFEgroupSubgroups($groupId) + public static function getFEgroupSubgroups($groupId) { // get all subgroups of this fe_group // fe_groups having this id in their subgroup field From cf47eaa9607140882cfa86884947929f169c980b Mon Sep 17 00:00:00 2001 From: Ivan Kartolo Date: Fri, 3 Mar 2017 10:36:12 +0100 Subject: [PATCH 30/56] [TASK] set version to 5.1.1 Resolves: #47 Releases: master Change-Id: Ieb758a60b89b1d4322287b4f03c8395c9174dbcb --- ext_emconf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext_emconf.php b/ext_emconf.php index c398b53b4..61416f680 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -15,7 +15,7 @@ 'description' => 'Advanced Direct Mail/Newsletter mailer system with sophisticated options for personalization of emails including response statistics.', 'category' => 'module', 'shy' => 0, - 'version' => '5.1.0-dev', + 'version' => '5.1.1', 'dependencies' => 'cms,tt_address', 'conflicts' => 'sr_direct_mail_ext,it_dmail_fix,plugin_mgm,direct_mail_123', 'priority' => '', From 551a40fc421e36ac73e47e304e941231a64612a4 Mon Sep 17 00:00:00 2001 From: Vladimir Falcon Date: Mon, 6 Mar 2017 13:51:06 +0100 Subject: [PATCH 31/56] [BUGFIX] Fixed back end user permissions when the user does not have access to fileadmin. --- Classes/Importer.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Classes/Importer.php b/Classes/Importer.php index a4f3ecd2e..3838a794b 100644 --- a/Classes/Importer.php +++ b/Classes/Importer.php @@ -967,7 +967,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(); } /** From 6cd447b08d29400a920733b2cad4138bf037fbd1 Mon Sep 17 00:00:00 2001 From: Ivan Kartolo Date: Fri, 10 Mar 2017 17:30:05 +0100 Subject: [PATCH 32/56] Checking if PHP IMAP extension is installed and get only unread mail --- Classes/Module/Statistics.php | 6 +- Classes/Readmail.php | 41 +- Classes/Scheduler/AnalyzeBounceMail.php | 82 +- .../AnalyzeBounceMailAdditionalFields.php | 45 +- .../Private/Language/locallang_mod2-6.xlf | 2109 +++++++++-------- 5 files changed, 1146 insertions(+), 1137 deletions(-) diff --git a/Classes/Module/Statistics.php b/Classes/Module/Statistics.php index 7a3e70ff2..257d643b3 100644 --- a/Classes/Module/Statistics.php +++ b/Classes/Module/Statistics.php @@ -522,7 +522,7 @@ public function cmd_displayPageInfo() } $out.=' - ' . $this->iconFactory->getIconForRecord('sys_dmail', $row)->render() . ' + ' . $this->iconFactory->getIconForRecord('sys_dmail', $row, Icon::SIZE_SMALL)->render() . ' ' . $this->linkDMail_record(GeneralUtility::fixed_lgd_cs($row['subject'], 30) . ' ', $row['uid'], $row['subject']) . '   ' . BackendUtility::datetime($row["scheduled"]) . ' ' . ($row["scheduled_begin"]?BackendUtility::datetime($row["scheduled_begin"]):' ') . ' @@ -855,7 +855,7 @@ public function cmd_stats($row) } } } else { - $output .= DirectMailUtility::formatTable($tblLines, array('nowrap', 'nowrap width="100"', 'nowrap width="100"', 'nowrap', 'nowrap', 'nowrap', 'nowrap'), 1, array(1, 0, 0, 0, 0, 0, 1)); + $output .= DirectMailUtility::formatTable($tblLines, array('nowrap', 'nowrap width="100"', 'nowrap width="100"', 'nowrap', 'nowrap', 'nowrap', 'nowrap'), 1, array(1, 0, 0, 0, 0, 0, 1)); } } @@ -1816,7 +1816,7 @@ public function directMail_compactView($row) $sentRecip = $GLOBALS['TYPO3_DB']->sql_num_rows($GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_dmail_maillog', 'mid=' . $row['uid'] . ' AND response_type = 0', '', 'rid ASC')); $out = ''; - $out .= ''; + $out .= ''; $out .= '' . '' . ''; diff --git a/Classes/Readmail.php b/Classes/Readmail.php index 7a829b767..c2a9f26e0 100644 --- a/Classes/Readmail.php +++ b/Classes/Readmail.php @@ -21,12 +21,12 @@ * Analysis of return mail reason is enhanced by checking more possible reason texts. * Tested on mailing list of approx. 1500 members with most domains in M�xico and reason text in English or Spanish. * - * @author Kasper Sk�rh�j - * @author Stanislas Rolland + * @author Kasper Sk�rh�j + * @author Stanislas Rolland * - * @package TYPO3 - * @subpackage tx_directmail - * @version $Id: class.readmail.php 6012 2007-07-23 12:54:25Z ivankartolo $ + * @package TYPO3 + * @subpackage tx_directmail + * @version $Id: class.readmail.php 6012 2007-07-23 12:54:25Z ivankartolo $ */ class Readmail { @@ -59,9 +59,9 @@ class Readmail * Returns special TYPO3 Message ID (MID) from input TO header * (the return address of the sent mail from Dmailer) * - * @param string $to Email address, return address string + * @param string $to Email address, return address string * - * @return array array with 'mid', 'rtbl' and 'rid' keys are returned. + * @return array array with 'mid', 'rtbl' and 'rid' keys are returned. */ public function find_MIDfromReturnPath($to) { @@ -82,11 +82,10 @@ public function find_MIDfromReturnPath($to) /** * Returns special TYPO3 Message ID (MID) from input mail content * - * @param string $content Mail (header) content + * @param string $content Mail (header) content * - * @return mixed If "X-Typo3MID" header is found and integrity is OK, - * then an array with 'mid', 'rtbl' and 'rid' keys are returned. Otherwise void. - * @internal + * @return mixed If "X-Typo3MID" header is found and integrity is OK, + * then an array with 'mid', 'rtbl' and 'rid' keys are returned. Otherwise void. */ public function find_XTypo3MID($content) { @@ -114,7 +113,7 @@ public function find_XTypo3MID($content) * * @param array $mailParts Output from extractMailHeader() * - * @return string only the content part + * @return string only the content part */ public function getMessage(array $mailParts) { @@ -129,7 +128,7 @@ public function getMessage(array $mailParts) } else { $c=$this->getTextContent( 'Content-Type: ' . $mailParts['content-type'] . ' - ' . $mailParts['CONTENT'] + ' . $mailParts['CONTENT'] ); } } else { @@ -208,10 +207,10 @@ public function getCType($str) * used to find what reason there was for rejecting the mail * Used by the Dmailer, but not exclusively. * - * @param string $c Message Body/text + * @param string $c Message Body/text * - * @return array key/value pairs with analysis result. - * Eg. "reason", "content", "reason_text", "mailserver" etc. + * @return array key/value pairs with analysis result. + * Eg. "reason", "content", "reason_text", "mailserver" etc. */ public function analyseReturnError($c) { @@ -280,9 +279,9 @@ public function analyseReturnError($c) * Try to match reason found in the returned email * with the defined reasons (see $reason_text) * - * @param string $text Content of the returned email + * @param string $text Content of the returned email * - * @return int The error code. + * @return int The error code. */ public function extractReason($text) { @@ -333,7 +332,7 @@ public function decodeHeaderString($str) * @param string $str Value from a header field containing name/email values. * * @return array Array with the name and email in. - * Email is validated, otherwise not set. + * Email is validated, otherwise not set. */ public function extractNameEmail($str) { @@ -430,9 +429,9 @@ public function getGMToffset($GMT) * * @param string $content Raw mail content * @param int $limit A safety limit that will put a upper length - * to how many header chars will be processed. + * to how many header chars will be processed. * Set to zero means that there is no limit. - * (Uses a simple substr() to limit the amount of mail data to process to avoid run-away) + * (Uses a simple substr() to limit the amount of mail data to process to avoid run-away) * * @return array An array where each key/value pair is a header-key/value pair. * The mail BODY is returned in the key 'CONTENT' if $limit is not set! diff --git a/Classes/Scheduler/AnalyzeBounceMail.php b/Classes/Scheduler/AnalyzeBounceMail.php index c15306dcc..0d1a820a7 100644 --- a/Classes/Scheduler/AnalyzeBounceMail.php +++ b/Classes/Scheduler/AnalyzeBounceMail.php @@ -164,15 +164,16 @@ public function execute() $mailServer = $this->connectMailServer(); if ($mailServer instanceof Server) { // we are connected to mail server - // get mails - // TODO: how to get only unread mail - $messages = $mailServer->getMessages($this->maxProcessed); + // get unread mails + $messages = $mailServer->search('UNSEEN', $this->maxProcessed); /** @var Message $message The message object */ foreach ($messages as $i => $message) { // process the mail if ($this->processBounceMail($message)) { // set delete //$message->delete(); + } else { + $message->setFlag('SEEN'); } } @@ -192,51 +193,50 @@ public function execute() private function processBounceMail($message) { /** @var Readmail $readMail */ - $readMail = GeneralUtility::makeInstance('DirectMailTeam\\DirectMail\\Readmail'); + $readMail = GeneralUtility::makeInstance(Readmail::class); // get attachment $attachmentArray = $message->getAttachments(); $midArray = array(); - foreach ($attachmentArray as $v => $attachment) { - //Todo: check attachment mimeType $attachment->mimeType? - $bouncedMail = $attachment->getData(); - // Find mail id - $midArray = $readMail->find_XTypo3MID($bouncedMail); - if (is_array($midArray)) { - // if mid, rid and rtbl are found, then continue - break; + if (is_array($attachmentArray)) { + foreach ($attachmentArray as $v => $attachment) { + $bouncedMail = $attachment->getData(); + // Find mail id + $midArray = $readMail->find_XTypo3MID($bouncedMail); + if (is_array($midArray)) { + // if mid, rid and rtbl are found, then continue + break; + } } - } - - // Extract text content - $cp = $readMail->analyseReturnError($message->getMessageBody()); - - $res = $this->getDatabaseConnection()->exec_SELECTquery( - 'uid,email', - 'sys_dmail_maillog', - 'rid=' . intval($midArray['rid']) . ' AND rtbl="' . - $this->getDatabaseConnection()->quoteStr($midArray['rtbl'], 'sys_dmail_maillog') . '"' . - ' AND mid=' . intval($midArray['mid']) . ' AND response_type=0' - ); + // Extract text content + $cp = $readMail->analyseReturnError($message->getMessageBody()); - // only write to log table, if we found a corresponding recipient record - if ($this->getDatabaseConnection()->sql_num_rows($res)) { - $row = $this->getDatabaseConnection()->sql_fetch_assoc($res); - $midArray['email'] = $row['email']; - $insertFields = array( - 'tstamp' => time(), - 'response_type' => -127, - 'mid' => intval($midArray['mid']), - 'rid' => intval($midArray['rid']), - 'email' => $midArray['email'], - 'rtbl' => $midArray['rtbl'], - 'return_content' => serialize($cp), - 'return_code' => intval($cp['reason']) + $res = $this->getDatabaseConnection()->exec_SELECTquery( + 'uid,email', + 'sys_dmail_maillog', + 'rid=' . intval($midArray['rid']) . ' AND rtbl="' . + $this->getDatabaseConnection()->quoteStr($midArray['rtbl'], 'sys_dmail_maillog') . '"' . + ' AND mid=' . intval($midArray['mid']) . ' AND response_type=0' ); - DebugUtility::debug($insertFields); - return $this->getDatabaseConnection()->exec_INSERTquery('sys_dmail_maillog', $insertFields); - } else { - return false; + + // only write to log table, if we found a corresponding recipient record + if ($this->getDatabaseConnection()->sql_num_rows($res)) { + $row = $this->getDatabaseConnection()->sql_fetch_assoc($res); + $midArray['email'] = $row['email']; + $insertFields = array( + 'tstamp' => time(), + 'response_type' => -127, + 'mid' => intval($midArray['mid']), + 'rid' => intval($midArray['rid']), + 'email' => $midArray['email'], + 'rtbl' => $midArray['rtbl'], + 'return_content' => serialize($cp), + 'return_code' => intval($cp['reason']) + ); + return $this->getDatabaseConnection()->exec_INSERTquery('sys_dmail_maillog', $insertFields); + } else { + return false; + } } } diff --git a/Classes/Scheduler/AnalyzeBounceMailAdditionalFields.php b/Classes/Scheduler/AnalyzeBounceMailAdditionalFields.php index 37cb2d288..b02a3b5ea 100644 --- a/Classes/Scheduler/AnalyzeBounceMailAdditionalFields.php +++ b/Classes/Scheduler/AnalyzeBounceMailAdditionalFields.php @@ -36,7 +36,7 @@ public function __construct() * In this case, it adds an email field * * @param array $taskInfo reference to the array containing the info used in the add/edit form - * @param object $task when editing, reference to the current task object. Null when adding. + * @param AnalyzeBounceMail $task when editing, reference to the current task object. Null when adding. * @param SchedulerModuleController $schedulerModule reference to the calling object (Scheduler's BE module) * * @return array Array containg all the information pertaining to the additional fields @@ -61,8 +61,6 @@ public function getAdditionalFields(array &$taskInfo, $task, SchedulerModuleCont '' . ''; -// TODO: add check SSL - $additionalFields = array(); $additionalFields['server'] = $this->createAdditionalFields('server', $serverHTML); $additionalFields['port'] = $this->createAdditionalFields('port', $portHTML); @@ -78,7 +76,7 @@ public function getAdditionalFields(array &$taskInfo, $task, SchedulerModuleCont * Takes care of saving the additional fields' values in the task's object * * @param array $submittedData An array containing the data submitted by the add/edit task form - * @param AbstractTask $task Reference to the scheduler backend module + * @param AnalyzeBounceMail $task Reference to the scheduler backend module * @return void */ public function saveAdditionalFields(array $submittedData, AbstractTask $task) @@ -100,24 +98,33 @@ public function saveAdditionalFields(array $submittedData, AbstractTask $task) */ public function validateAdditionalFields(array &$submittedData, SchedulerModuleController $schedulerModule) { - // check if we can connect using the given data - /** @var Server $mailServer */ - $mailServer = GeneralUtility::makeInstance( - 'Fetch\\Server', - $submittedData['bounceServer'], - (int)$submittedData['bouncePort'], - $submittedData['bounceService'] - ); + // check if PHP IMAP is installed + if (extension_loaded('imap')) { + // check if we can connect using the given data + /** @var Server $mailServer */ + $mailServer = GeneralUtility::makeInstance( + \Fetch\Server::class, + $submittedData['bounceServer'], + (int)$submittedData['bouncePort'], + $submittedData['bounceService'] + ); - $mailServer->setAuthentication($submittedData['bounceUser'], $submittedData['bouncePassword']); + $mailServer->setAuthentication($submittedData['bounceUser'], $submittedData['bouncePassword']); - try { - $imapStream = $mailServer->getImapStream(); - $return = true; - } catch (\Exception $e) { + try { + $imapStream = $mailServer->getImapStream(); + $return = true; + } catch (\Exception $e) { + $schedulerModule->addMessage( + $this->getLanguangeService()->getLL('scheduler.bounceMail.dataVerification') . + $e->getMessage(), + FlashMessage::ERROR + ); + $return = false; + } + } else { $schedulerModule->addMessage( - $this->getLanguangeService()->getLL('scheduler.bounceMail.dataVerification') . - $e->getMessage(), + $this->getLanguangeService()->getLL('scheduler.bounceMail.phpImapError'), FlashMessage::ERROR ); $return = false; diff --git a/Resources/Private/Language/locallang_mod2-6.xlf b/Resources/Private/Language/locallang_mod2-6.xlf index aa71c396e..06dae8bec 100644 --- a/Resources/Private/Language/locallang_mod2-6.xlf +++ b/Resources/Private/Language/locallang_mod2-6.xlf @@ -10,1059 +10,1062 @@ LFEditor - - Enter the additional URL parameters used to fetch the HTML content from a TYPO3 page. - - - The specified parameters will be added to the URL used to fetch the HTML content of the direct mail from a TYPO3 page. If in doubt, leave it blank. - - - Set default values for mail content format: - - - Set default values for mail content fetching options: - - - Set default values for Direct Mails headers: - - - Configure direct mail module - - - Default character set for direct mails built from external pages - - - Specify the character set used in direct mails when they are built from external pages and character set cannot be auto-detected. - - - Default encoding of direct mails - - - Select the default content transfer encoding of direct mails. - - - HTML only - - - HTTP Password - - - If mail content is protected by HTTP authentication, enter the password here. - - - HTTP Username - - - If mail content is protected by HTTP authentication, enter the username here. - - - - - - Privacy jumpurl - - - Set this option, to anonymize click statistics - - - Set additional module options: - - - Set options for content transfer encoding and character set: - - - Set options for links in mail content: - - - Enable jump URL's: - - - Check this option to enable jump URL's and the collection of click statistics. - - - This configuration determines how QuickMails are handled and further sets the default value for Direct Mails. - - - Enable jump URL's for mailto links: - - - Check this option to enable jump URL's for mailto links. - - - Enter the additional URL parameters used to fetch the plain text content from a TYPO3 page. - - - The specified parameters will be added to the URL used to fetch the plain text content of the direct mail from a TYPO3 page. If in doubt, set it either to '&type=99' or, when using TemplaVoila, to '&print=1'. - - - Plain text and HTML - - - Plain text only - - - High - - - Low - - - Normal - - - Character set for quick mails - - - Specify the character set to use when sending quick mails. - - - Encoding for quick mails - - - Select the content transfer encoding to use when sending quick mails. - - - Frontend User Group - - - If mail content is protected by Frontend user authentication, enter the user group here. - - - - - - List of UID numbers of test recipient lists: - - - Alternatively to sending test-mails to individuals, you can choose to send to a whole list. This is the list of recipient lists UID numbers available for this action. - - - List of UID numbers of test recipients (tt_address): - - - Before sending mails, you should test the mail content by sending test mails to one or more test recipients. The available recipients for testing are determined by this list of UID numbers. So first, find out the UID numbers (tt_address) of the recipients you wish to use for testing, then enter them here in a comma-separated list. - - - Subject for the testmail. - - - This will be prepended to the test newsletter subject - - - Update configuration - - - Custom-defined table: - - - Enter the name of a custom-defined table, with compatible columns defined, which may also be used for direct mails distribution. - - - URL of HTML content: - - - Cancel - - - Create mail - - - Create a new Direct Mail from a page - - - Create a new Direct Mail from external URL - - - Edit - - - An error was encountered. - - - Available Direct Mail folders - - - Pages with HTML frames may not be fetched. - - - Caution - - - Please check the cronjob or cronjob is not set. - - - Last run: - - - OK - - - Cronjob is running. - - - Cron job status - - - Warning - - - Please check the cronjob. - - - Current time: - - - delete - - - Delivery begun - - - Delivery ended - - - Invoke Mailer Engine - - - Mailer Engine Invoked! - - - Log: - - - If TYPO3 is not configured to automatically invoke the Mailer Engine, you can invoke it by clicking here: - - - Manually Invoke Engine - - - # sent - - - Scheduled - - - Mail Engine Status - - - Subject - - - Make query - - - Send a testmail - - - Module configuration - - - Categories Conversion - - - QuickMail - - - Direct Mail Extension - - - NO - - - You cannot create direct mails using pages that are hidden or access-restricted. - - - Cannot edit - mail has been sent - - - Cannot edit - you don't have permissions to edit Direct Mails. - - - This type of page cannot be used to create direct mails. Please select a regular page. - - - The HTML content does not contain any direct mail boundaries. - - - The HTML content could not be fetched. - - - The plain text content does not contain any direct mail boundaries. - - - The plain text content could not be fetched. - - - Enter at least one valid URL! - - - Number of records: - - - URL of plain text content: - - - Query - - - Send - - - Subject: - - - Update query - - - Information on direct mail record: - - - Check the following warning. - - - External Pages - - - Internal Pages - - - Direct Mail - - - Select a newsletter to continue sending: - - - New Newsletter - - - Quickmail - - - New Quickmail - - - Select newsletter source: - - - Detailed Information - - - Page is successfully fetched. - - - Categories - - - Test Mail - - - Mass Send - - - back - - - next - - - [write subject] - - - YES - - - Ending, parsetime: - - - Invoked at - - - Job begin - - - Job end - - - Job No: - - - Nothing to do. - - - processed... - - - Sending - - - mails using records from table - - - sys_dmail record - - - Configuration - - - Direct Mail - - - Mailer Engine - - - Recipient Lists - - - Statistics - - - Download CSV file - - - Recipient List - - - Import CSV into 'ADDRESS' table - - - Back - - - Filter email dublettes from csv data. If a dublette is found, only the first entry is imported. - - - Only update/import valid emails from csv data. - - - Current file: - - - Import is finished. - - - Field encapsulation character (data fields are encapsed with...): - - - First row of import file has fieldnames: - - - Import settings - - - Upload CSV - - - Import - - - All recipients receive HTML newsletter - - - Categories - - - Assign the following categories to all recipients: - - - Add categories - - - Settings - - - Please select the character set of the import file: - - - Field mapping - - - Additional options - - - Description - - - Mapping error - - - Please fix following error(s): - - - "Email" field has to be mapped. - - - No mapping is found. You have to map at least "email" field. - - - Maps to ... - - - Mapping - - - # - - - Value - - - Next - - - OR - - - Overwrite existing file: - - - Paste the CSV data: - - - Ready to import - - - - - - Specify the field which determines the uniqueness of imported users: - - - Remove all Addresses in the storage folder before importing: - - - Double records found in the CSV Data: - - - Do not insert/update invalid emails found in csv data: - - - Insert the following records: - - - Update the following records: - - - Field delimiter (data fields are separated by...): - - - colon [:] - - - comma [,] - - - semicolon [;] - - - horizontal tab [TAB] - - - Please select the storage folder for the imported users: - - - update - - - Update existing user, instead renaming the new user: - - - Choose a file from your local computer: - - - List all recipients - - - Plain List - - - Recipients from recipient list: - - - Number of recipients: - - - Address Table - - - Custom Table - - - Website User Table - - - Assign categories to content elements - - - There are no content elements on the page. - - - Create a newsletter - - - Click here to create a new page that you can later send as a direct mail. - - - Edit page - - - ALL - - - ONLY - - - Attach. - - - Column - - - Last mod. - - - Sent? - - - Size - - - Subject - - - Draft - - - PAGE - - - EXT URL - - - Type - - - Update category settings - - - There are already %s Direct Mails based on this newsletter. Are you sure you want to create another one? - - - Select a newsletter - - - There are no pages in the mail module. - - - View page in HTML format - - - View page in Text format - - - Break lines to 76 char: - - - Message: - - - Sender Email: - - - Sender Name: - - - New recipient list - - - Create a new recipient list? - - - Amount: - - - Click here to import CSV - - - Select a recipient list - - - Save these settings as draft (for recurring sendings) - - - Recipient list: - - - Send mail - recipient list - - - Send to all subscribers in recipient list - - - Send this as test newsletter - - - Distribution time (hh:mm dd-mm-yyyy): - - - Please select Direct Mail folder. - - - Draft saved - - - Your directmail was sent as draft and can now be used from the scheduler. - - - Recipients: - - - Sending mail - - - Mail scheduled for distribution - - - The mail was scheduled for distribution at - - - The mail was sent. - - - The mail was sent to <strong>%s</strong>. - - - The mail was sent to <strong>%s</strong> recipients. - - - CSV of returned recipients - - - CSV of returned recipients with error in header - - - CSV of returned recipients with bad host - - - CSV of returned recipients with mailbox full - - - CSV of returned recipients for unknown reason - - - CSV of returned recipients with unknown recipient - - - HTML: - - - HTML Link # - - - HTML mails viewed: - - - Bad host: - - - Count: - - - Statistics for direct mail: - - - Disable returned recipients - - - Disable returned recipients with error in header - - - Disable returned recipients with bad host - - - Disable returned recipients with mailbox full - - - Disable returned recipients for unknown reason - - - Disable returned recipients with unknown recipient - - - List of recipients from tt_address table: - - - adresses disabled - - - Email adresses of returned mails with error in header: - - - Email adresses of returned mails with bad host: - - - Email adresses of returned mails: - - - Email adresses of returned mails with mailbox full: - - - Email adresses of returned mails for unknown reason: - - - Email adresses of returned mails with unknown recipient: - - - Error in Header: - - - General information: - - - Imagelink: - - - Total responses/Unique responses: - - - List returned recipients - - - List returned recipients with error in header - - - List returned recipients with bad host - - - List returned recipients with mailbox full - - - List returned recipients for unknown reason - - - List returned recipients with unknown recipient - - - Mailbox full: - - - Mails returned: - - - Mails sent: - - - Choose a newsletter - - - Delivery begun - - - Delivery ended - - - Newsletter Statistics - - - queuing - - - Scheduled - - - sending - - - sent - - - Status - - - Subject - - - # sent - - - List of recipients: - - - Plaintext: - - - Plaintext Link # - - - Reason unknown: - - - Re-calculate Cached Data: - - - Re-calculate cached statistics data - - - Recipient unknown: - - - Responses: - - - Link Responses: - - - Total: - - - Total mails returned: - - - Total responses (links clicked): - - - Unique responses (links clicked): - - - List of recipients from fe_users: - - - website users disabled - - - Subscriber Info - - - Subscriber Profile - - - Receive HTML based mails - - - Set categories of interest for the subscriber. - - - Update profile settings - - - Testmail - Individual - - - Select a recipient of the testmail. The mail will be generated based on the profile of the recipient you select. - - - Testmail - Recipient list - - - Select a recipient list for the testmail. The mails will be generated based on the profiles of the recipients in that list. - - - Testmail - Simple - - - A simple testmail includes all mail elements regardless of category. But any USER_fields are not substituted with data. Enter an email-address for the testmail: - - - Do it now - - - The direct_mail data in the sys_dmail table need to be update. Please backup the sys_dmail table before clicking the following button. Convert the data? - - - %d records are converted - - - Updater - - - Important! - - - [Click here to open the updater] - - - For the old data working with direct_mail version 3.0, data must be converted. - - - Warning! Please read! - - - BEFORE
- you click on the "Do it now" buttons.]]> -
- - Delivery begun/ended: - - - Direct Mail: - - - Flowed text: - - - Sender: - - - Email format/attachments: - - - Include media: - - - Recipient total/sent: - - - Reply: - - - Yes - - - Server URL/IP - - - URL or IP of the mail server - - - Port number - - - Port number of the mail server - - - Username - - - Username to authenticate - - - Password - - - Password of the user - - - Type of mailserver - - - IMAP or POP3 - - - Number of bounce mail to be processed - - - Maximum number of bounce mail to be processed on one scheduler cycle - - - - - - No recipient groups found - + + Enter the additional URL parameters used to fetch the HTML content from a TYPO3 page. + + + The specified parameters will be added to the URL used to fetch the HTML content of the direct mail from a TYPO3 page. If in doubt, leave it blank. + + + Set default values for mail content format: + + + Set default values for mail content fetching options: + + + Set default values for Direct Mails headers: + + + Configure direct mail module + + + Default character set for direct mails built from external pages + + + Specify the character set used in direct mails when they are built from external pages and character set cannot be auto-detected. + + + Default encoding of direct mails + + + Select the default content transfer encoding of direct mails. + + + HTML only + + + HTTP Password + + + If mail content is protected by HTTP authentication, enter the password here. + + + HTTP Username + + + If mail content is protected by HTTP authentication, enter the username here. + + + + + + Privacy jumpurl + + + Set this option, to anonymize click statistics + + + Set additional module options: + + + Set options for content transfer encoding and character set: + + + Set options for links in mail content: + + + Enable jump URL's: + + + Check this option to enable jump URL's and the collection of click statistics. + + + This configuration determines how QuickMails are handled and further sets the default value for Direct Mails. + + + Enable jump URL's for mailto links: + + + Check this option to enable jump URL's for mailto links. + + + Enter the additional URL parameters used to fetch the plain text content from a TYPO3 page. + + + The specified parameters will be added to the URL used to fetch the plain text content of the direct mail from a TYPO3 page. If in doubt, set it either to '&type=99' or, when using TemplaVoila, to '&print=1'. + + + Plain text and HTML + + + Plain text only + + + High + + + Low + + + Normal + + + Character set for quick mails + + + Specify the character set to use when sending quick mails. + + + Encoding for quick mails + + + Select the content transfer encoding to use when sending quick mails. + + + Frontend User Group + + + If mail content is protected by Frontend user authentication, enter the user group here. + + + + + + List of UID numbers of test recipient lists: + + + Alternatively to sending test-mails to individuals, you can choose to send to a whole list. This is the list of recipient lists UID numbers available for this action. + + + List of UID numbers of test recipients (tt_address): + + + Before sending mails, you should test the mail content by sending test mails to one or more test recipients. The available recipients for testing are determined by this list of UID numbers. So first, find out the UID numbers (tt_address) of the recipients you wish to use for testing, then enter them here in a comma-separated list. + + + Subject for the testmail. + + + This will be prepended to the test newsletter subject + + + Update configuration + + + Custom-defined table: + + + Enter the name of a custom-defined table, with compatible columns defined, which may also be used for direct mails distribution. + + + URL of HTML content: + + + Cancel + + + Create mail + + + Create a new Direct Mail from a page + + + Create a new Direct Mail from external URL + + + Edit + + + An error was encountered. + + + Available Direct Mail folders + + + Pages with HTML frames may not be fetched. + + + Caution + + + Please check the cronjob or cronjob is not set. + + + Last run: + + + OK + + + Cronjob is running. + + + Cron job status + + + Warning + + + Please check the cronjob. + + + Current time: + + + delete + + + Delivery begun + + + Delivery ended + + + Invoke Mailer Engine + + + Mailer Engine Invoked! + + + Log: + + + If TYPO3 is not configured to automatically invoke the Mailer Engine, you can invoke it by clicking here: + + + Manually Invoke Engine + + + # sent + + + Scheduled + + + Mail Engine Status + + + Subject + + + Make query + + + Send a testmail + + + Module configuration + + + Categories Conversion + + + QuickMail + + + Direct Mail Extension + + + NO + + + You cannot create direct mails using pages that are hidden or access-restricted. + + + Cannot edit - mail has been sent + + + Cannot edit - you don't have permissions to edit Direct Mails. + + + This type of page cannot be used to create direct mails. Please select a regular page. + + + The HTML content does not contain any direct mail boundaries. + + + The HTML content could not be fetched. + + + The plain text content does not contain any direct mail boundaries. + + + The plain text content could not be fetched. + + + Enter at least one valid URL! + + + Number of records: + + + URL of plain text content: + + + Query + + + Send + + + Subject: + + + Update query + + + Information on direct mail record: + + + Check the following warning. + + + External Pages + + + Internal Pages + + + Direct Mail + + + Select a newsletter to continue sending: + + + New Newsletter + + + Quickmail + + + New Quickmail + + + Select newsletter source: + + + Detailed Information + + + Page is successfully fetched. + + + Categories + + + Test Mail + + + Mass Send + + + back + + + next + + + [write subject] + + + YES + + + Ending, parsetime: + + + Invoked at + + + Job begin + + + Job end + + + Job No: + + + Nothing to do. + + + processed... + + + Sending + + + mails using records from table + + + sys_dmail record + + + Configuration + + + Direct Mail + + + Mailer Engine + + + Recipient Lists + + + Statistics + + + Download CSV file + + + Recipient List + + + Import CSV into 'ADDRESS' table + + + Back + + + Filter email dublettes from csv data. If a dublette is found, only the first entry is imported. + + + Only update/import valid emails from csv data. + + + Current file: + + + Import is finished. + + + Field encapsulation character (data fields are encapsed with...): + + + First row of import file has fieldnames: + + + Import settings + + + Upload CSV + + + Import + + + All recipients receive HTML newsletter + + + Categories + + + Assign the following categories to all recipients: + + + Add categories + + + Settings + + + Please select the character set of the import file: + + + Field mapping + + + Additional options + + + Description + + + Mapping error + + + Please fix following error(s): + + + "Email" field has to be mapped. + + + No mapping is found. You have to map at least "email" field. + + + Maps to ... + + + Mapping + + + # + + + Value + + + Next + + + OR + + + Overwrite existing file: + + + Paste the CSV data: + + + Ready to import + + + + + + Specify the field which determines the uniqueness of imported users: + + + Remove all Addresses in the storage folder before importing: + + + Double records found in the CSV Data: + + + Do not insert/update invalid emails found in csv data: + + + Insert the following records: + + + Update the following records: + + + Field delimiter (data fields are separated by...): + + + colon [:] + + + comma [,] + + + semicolon [;] + + + horizontal tab [TAB] + + + Please select the storage folder for the imported users: + + + update + + + Update existing user, instead renaming the new user: + + + Choose a file from your local computer: + + + List all recipients + + + Plain List + + + Recipients from recipient list: + + + Number of recipients: + + + Address Table + + + Custom Table + + + Website User Table + + + Assign categories to content elements + + + There are no content elements on the page. + + + Create a newsletter + + + Click here to create a new page that you can later send as a direct mail. + + + Edit page + + + ALL + + + ONLY + + + Attach. + + + Column + + + Last mod. + + + Sent? + + + Size + + + Subject + + + Draft + + + PAGE + + + EXT URL + + + Type + + + Update category settings + + + There are already %s Direct Mails based on this newsletter. Are you sure you want to create another one? + + + Select a newsletter + + + There are no pages in the mail module. + + + View page in HTML format + + + View page in Text format + + + Break lines to 76 char: + + + Message: + + + Sender Email: + + + Sender Name: + + + New recipient list + + + Create a new recipient list? + + + Amount: + + + Click here to import CSV + + + Select a recipient list + + + Save these settings as draft (for recurring sendings) + + + Recipient list: + + + Send mail - recipient list + + + Send to all subscribers in recipient list + + + Send this as test newsletter + + + Distribution time (hh:mm dd-mm-yyyy): + + + Please select Direct Mail folder. + + + Draft saved + + + Your directmail was sent as draft and can now be used from the scheduler. + + + Recipients: + + + Sending mail + + + Mail scheduled for distribution + + + The mail was scheduled for distribution at + + + The mail was sent. + + + The mail was sent to <strong>%s</strong>. + + + The mail was sent to <strong>%s</strong> recipients. + + + CSV of returned recipients + + + CSV of returned recipients with error in header + + + CSV of returned recipients with bad host + + + CSV of returned recipients with mailbox full + + + CSV of returned recipients for unknown reason + + + CSV of returned recipients with unknown recipient + + + HTML: + + + HTML Link # + + + HTML mails viewed: + + + Bad host: + + + Count: + + + Statistics for direct mail: + + + Disable returned recipients + + + Disable returned recipients with error in header + + + Disable returned recipients with bad host + + + Disable returned recipients with mailbox full + + + Disable returned recipients for unknown reason + + + Disable returned recipients with unknown recipient + + + List of recipients from tt_address table: + + + adresses disabled + + + Email adresses of returned mails with error in header: + + + Email adresses of returned mails with bad host: + + + Email adresses of returned mails: + + + Email adresses of returned mails with mailbox full: + + + Email adresses of returned mails for unknown reason: + + + Email adresses of returned mails with unknown recipient: + + + Error in Header: + + + General information: + + + Imagelink: + + + Total responses/Unique responses: + + + List returned recipients + + + List returned recipients with error in header + + + List returned recipients with bad host + + + List returned recipients with mailbox full + + + List returned recipients for unknown reason + + + List returned recipients with unknown recipient + + + Mailbox full: + + + Mails returned: + + + Mails sent: + + + Choose a newsletter + + + Delivery begun + + + Delivery ended + + + Newsletter Statistics + + + queuing + + + Scheduled + + + sending + + + sent + + + Status + + + Subject + + + # sent + + + List of recipients: + + + Plaintext: + + + Plaintext Link # + + + Reason unknown: + + + Re-calculate Cached Data: + + + Re-calculate cached statistics data + + + Recipient unknown: + + + Responses: + + + Link Responses: + + + Total: + + + Total mails returned: + + + Total responses (links clicked): + + + Unique responses (links clicked): + + + List of recipients from fe_users: + + + website users disabled + + + Subscriber Info + + + Subscriber Profile + + + Receive HTML based mails + + + Set categories of interest for the subscriber. + + + Update profile settings + + + Testmail - Individual + + + Select a recipient of the testmail. The mail will be generated based on the profile of the recipient you select. + + + Testmail - Recipient list + + + Select a recipient list for the testmail. The mails will be generated based on the profiles of the recipients in that list. + + + Testmail - Simple + + + A simple testmail includes all mail elements regardless of category. But any USER_fields are not substituted with data. Enter an email-address for the testmail: + + + Do it now + + + The direct_mail data in the sys_dmail table need to be update. Please backup the sys_dmail table before clicking the following button. Convert the data? + + + %d records are converted + + + Updater + + + Important! + + + [Click here to open the updater] + + + For the old data working with direct_mail version 3.0, data must be converted. + + + Warning! Please read! + + + BEFORE
+ you click on the "Do it now" buttons.]]> +
+ + Delivery begun/ended: + + + Direct Mail: + + + Flowed text: + + + Sender: + + + Email format/attachments: + + + Include media: + + + Recipient total/sent: + + + Reply: + + + Yes + + + Server URL/IP + + + URL or IP of the mail server + + + Port number + + + Port number of the mail server + + + Username + + + Username to authenticate + + + Password + + + Password of the user + + + Type of mailserver + + + IMAP or POP3 + + + Number of bounce mail to be processed + + + Maximum number of bounce mail to be processed on one scheduler cycle + + + + + + No recipient groups found + + + Please install PHP IMAP extension + \ No newline at end of file From 60e4ed3b16f304b9843a56e835b3a1ac681afc69 Mon Sep 17 00:00:00 2001 From: Ivan Kartolo Date: Mon, 13 Mar 2017 11:54:01 +0100 Subject: [PATCH 33/56] Updated documentation --- .../Index.rst | 67 +++++------------- .../Images/manual_html_m2a446403.png | Bin 8857 -> 10307 bytes 2 files changed, 19 insertions(+), 48 deletions(-) diff --git a/Documentation/Configuration/ConfiguringTheAnalysisOfReturnedMails/Index.rst b/Documentation/Configuration/ConfiguringTheAnalysisOfReturnedMails/Index.rst index e5cc1cf6c..cf550f9c2 100644 --- a/Documentation/Configuration/ConfiguringTheAnalysisOfReturnedMails/Index.rst +++ b/Documentation/Configuration/ConfiguringTheAnalysisOfReturnedMails/Index.rst @@ -18,14 +18,12 @@ Configuring the analysis of returned mails ------------------------------------------ -There are probably many ways to configure analysis of returned mails. -We propose an approach based on open Source program fetchmail. For -more information about fetchmail, see `The fetchmail home page -`_ . +The analysis of the return mails can now be set in the scheduler job. +It needs the `PHP-IMAP `_ +extension. -#. Create a mailbox (popbox) for the returned mails, for example: - “bounce@pophost.org”. This mailbox should be located on the same - machine as the TYPO3 installation. +#. Create a mailbox (IMAP or POP) for the returned mails, for example: + “bounce@domain.tld”. #. Use the Module Configuration function of the Direct mail module to configure this same address in the 'Return Path' field in Page TS @@ -33,49 +31,22 @@ more information about fetchmail, see `The fetchmail home page |img-17| -#. fetchmail can read a mailbox and then do something with these mails. - We are going to use fetchmail to “pipe” the returned mails to the - “returnmail.phpsh” script. fetchmail uses a configuration file that - should be outside the web accessible folder. For examble, it may be - positionned on the root: /root/.fetchmailrc. ls -l of this file may - look like this: +#. Now create a task **Analyze bounce mail** in the scheduler module. - :: +#. There you can set following parameter: - -rwx--x--- 1 root root 208 Jun 20 12:50 /root/.fetchmailrc + ====================================== ==================================== + Parameter Description + ====================================== ==================================== + Server URL/IP The URL or IP of the mail server + Port number Port of the mail server + Username Bounce mail address + Password Password of the bounce mail account + Type of mailserver IMAP or POP + Number of bounce mail to be processed How many mail to be fetch in a cycle + ====================================== ==================================== -#. Insert the following line in file .fetchmailrc, substituting variables - my.pophost.org with the name of your mailserver, and username-of- - popbox and password-of-popbox with the name and password of your - bounce mailbox: - - :: - - poll my.pophost.org timeout 40 username "username-of-popbox" password "password-of-popbox" flush mda "/path/to/your/TYPO3/installation/typo3conf/ext/direct_mail/res/scripts/returnmail.phpsh" - -#. Note that the absolute path to the script must be specified. If the - extension is installed as a global extension, substitute typo3conf - with typo3 in the above path. Make sure that script returnmail.phpsh - has sufficient permissions to be run by the server. Note also that - returnmail.phpsh is a shell script and requires the availability of a - PHP binary, "/usr/bin/php”. Depending on your server configuration, - you may have to edit the first line of the script to refer to the - location of the PHP binary. - -#. If you have configured multiple Direct Mail folders each with its own - return mailbox, you will need a similar line for each mailbox. - -#. Use the command “crontab -e” (as root), or cPanel tool, to add the - following cron task. You need only one, even if you have configured - multiple folders of Direct Mail. This example setting will run the - cron task every 10 minutes: - - :: - - */10 * * * * fetchmail> /dev/null - -#. Use the Direct Mail module to send a newsletter to a bouncing address. - Use the Statistics function of the module to verify that the bounced - mail is accounted for in the displayed statistics. +#. If you have more than one bounce account, you have to create a new scheduler + task for every bounce mail account. diff --git a/Documentation/Images/manual_html_m2a446403.png b/Documentation/Images/manual_html_m2a446403.png index cdd93e83c0c9c433155bd90f92f7649887ab5e66..bd7fca7645c57ed4dcec846fc3d681849b77f628 100644 GIT binary patch literal 10307 zcmbt)Wmr^S)Gr+Zl1jILgdm`FC?QC92m{D4Vs0O~1qTxFy*23-ejd6eoKRWwotaLPTGYovC?`K#k!`&Ib z8!7?#Ptjin(DM>w{d-Qz^!dIpM!X^RzsHbf37r3WqF$B@KoeiYdtv$DzmBLbv#Uo` ze}`cwLC4r}Vnxf)efn>*utDJO34Ra#0t>IYCkD+z@5`TMsGuf|`}ZEk|JS6>bbDDX zj#`n=&c}X!GYYZYF_M13rC*4NOY9|3={;h#`3;*uawnmsDazPr8R^S$e#@wy9UOXdXPWFC%3y`eX; zuLl-97<&JYZWI{Kmd&SI(?w;v4EaIW_tJH1Ee3e#ev-$z7dZo8MO-8L)WdhD%JoZE z0s@mI-Tjoj{VmG?Rm}DajeulbpOVbk&huOIt-EWc8pmwOvcB275g>gj=mTW3PQTu; z>m|Zcr%ugRDO-wF7pfN=dyOoATz8uQk(yg~_Hvt6(QJ3TLl=YWh&;EQ584|j@i(jhVucviu_}?BC^>Vtc;DGh)Q4I`vwKB5)2Won$T>Qt#3^2;vje43Ezdxj6VJyy4UD>Bq|cl$xl|0<m4f6-d^YDx8jkoJO5WvOYdHS+RT<+JT|eS3LD@n4;y zxn3t;dXt>mMbA_}NCkJ^I6R1<6H5L$)u{U2XxF`QGA?ctkgvSB5Cf*s%TulBog8K7@;>F%m6V+?E?myacUeuRrEcOqiN zH=u2M0t?#^+nKVLj^E`mO@FqMcyO!vaz zp2K1Z^G)?n1?1k+c?eQD?UrQ0d#^Lj2Pl@8G9kt$Sas%$lqQ#gizMU~l%e=2-dsy#86PVTyQ@>A3XWHMtI(FY@H2r~9&JSby6Mq@#3PZT6ng!zbw+;14%QTJzV`Y7M5jzk+@& zfEL|mPFI*6#CGRh82*t(9K(yRsQ$CSJDo8WmS5fPqs$lDZOD-~<7}Cy@bdb%h*xDM zb+OHH<-noYb{#XwpKn&_DOcZA8a3h1T^_F&q?r0XIV+q< zQ_`gcF*yFSG9gI;R$=8_9Zsu3BH)QuHX>Sqa3{Vdo2cnzad%#%$EJBVm<*rT%=hhL z8oiMDCy|_I&UAnlmz11MdR2q77&))40p4VBeO_nN^T@+^%9Gpn-B$8Yzw(%b>Ik<# zCgyXc!gnDc{uz?S5#xmZ9B?QnxOY{glEH%h?5nATOEv#(hXwv01&p7?BAZ-ghx{^- z{!53zPclrO*w#OpODz1eP)sc(W?>(Uhba~Y{@AR6OqBJr@I}sg{4th_yeRv}o+j7} z5%^={YS~e?(=b;`DCZA<6A92E%>(NyHQ9fst-!|;HI~~QxPGAq&y;MsZnR7lglIHKr8`cA40J?e-ifi%0BsgVfC;=I1XSHhP_8qgt z3zORsGeWByNor}f+CHw>qQ-a&x5w;WgK~sbR9A*cJ0U2_LrLB}n*O=BSssA{idP(z`3|=$f)|o^?@~OVO9dos3l$PsMYc zQ-!tVCD*$Q_HA@)7R$dRP#|U5NUqX(@3PKq(XQaxSh9Q>0fpJoR)xr0p63z(!I<)^R&(~Lc5-P?71~)%+21r2 zFq8}A4Ms%R;+}osZdI2aqx`zI)a2h~2>N0aRbqWOuJcimpG&KPf_VcYaf+9Ny@&~@ zFrz-HoWhGqL?f2v@{3Ppw#^e@ZrR9oXA;1=DuGA?|3wRPWQx5O{HHh>iUu^AT4Q)##D zNuh13yfchVvqL&1(AZRD4gZyNF1&(CCP?iTWH0=wVe!|60W%izR3#W~p~ z7x6tR$*@WZ1kN78D>n0E4+&N#*V#?s-Fj2&(`xg43x@0cKwb7DR}~9d@K|nX5(jp4 zzj7dd!7D7=sS0LfD1xjv3j60sHft>L&YaEJgI%4rtn?DEMI=7;N`*0lNWFhtwas$Y zOvv&R+8J!EPt7w;s<5^?dD^Z+xnWacXm2#BIM;zo@eE3cs!e4Pv>h z!>MPR_xe7E=1zzE9=rf>Kx-XmWo}2mVD@@0H~2<1>(Pn3j5c)CV;dFQr5gEX&6n2J zREeuQ0OdMz6o+4(2p@alPiF{P-QQVkG^{?@vU3IA7Ye>PvC+n!8DkB@Ez_+u&rz^R z`mn2ae;V;oUwo}I;gGGE$54P48B9K1%l9=$0F%P(ro}Wryvj4NzbMvV;Ny&jeLtj5`4~tiY4JLscj&w81c$*+vQuF0k(FDw)k7fBe{IuJY7Tk9}@v2M7n^qa~ z=9fLUSxm3B{AO;vhRO2tB1+qY?50GRTV>;6_bsHeDCO0f;5`s@$PD7pjFFp@`c@_gT^#VDSuc5htUCCh+a6(7`(!) z<(6IU3iQX0uD2Nv=Q1c#%n*RSYk1eF=LxIgoR}*Enfxd}E#&Rm{Y01rwo4QMb<&a> z5_1r53bA(bVQ}iM^kdN7}jb(&8-VFou zY7F8H!u5k(=H**6DFd$(JB+0DeGW_Ua4&Chl{b1f1#P~SIfmdB`*1QEaSS_%jZK&P zmTU`)&Vf=8g>kmDU8mVQ2i*!=s>2A`vo8h|vB!Y!^R4-=8H<{hCnh{fA~51KKMT3X zBv>JfUQQQ}E0fSM^fAoaZqqHd>Hiq0(`7%ZXkDD1ui!FGCnA;6jo4`7k=KFi=Ha`yX>L;2N zLM4iQ%E86JY&ARDrdET23&at~uFiw;YPVnpX#&eL$_4#Oyt;_z*_x_UPKy4e`Se}4 zL5_$g*YgrnQ^>?(H>q%iX&k#srV6osxl#(ZZoV6>(D?N3!hk{Rvu)40Qr&`34;bdJ z-5FDV!5navLfYL$kFxfRn8_7_UGZGCiE2J3SF zT~h*0r|K;^jj$KR`argLNhcsQ`K>0J8dybL5pO@5LOo~Qn}l9pCXE{Ay5e5uSev1p$A!7e-F z2dn3#ASY){O(;-G&D$ZCFpHc>$w+b7*+53{DHX@=mRe-E=u}$T{|*!`oDs>6DZ8!} z6E^k;y(aUNuwG(xyS594|3&1L|A=g<>aQsxDM1$*CPy0U`cqjOB#Z#l3RyF;GdVTm z>Ax9jHqm=*nzPq=wI_1Ac>nXo72|YxSkacSt&%po>Ql#&<_0(J^9jamo~85IZK@i0 zA8`^nhnhyz&u@5xor-=In=m?yRf(OsIt3npfAxi|moxm4Mc-?`lU^GS1k(ls6u>r2 zK#cCm$RsgtaPJSie8hp#D7g4z61_3yAM$tk9cKqw4P4BW;MoFo{{qBhyn{p+Eiqa! z!Jm$c^;jOE-V-@*_Ne}j#D)s8lg8)FjQ+&r-;3Bj-#;&sY*^&~3rdxKgVMsfFO7du zv8poDOFG_Ve@^n-^Jj|#uRD`?8~mE>Ym(A5Y6Ny&=hj6}g*zduOPzhO^psrUZk}3l z!rcpQiC!*SP2?N^e;vcT`k8_I`i3&I@9{*-yY2!z4LXBb&wYeqOZ^6g?B{t{-tR8g z%_P^kZ3}rZS((h&x##w4_tBhzq8-}p+H~gb)o<*&e`|E(bje>=VpBR zo~L>1+X0@O%FzZH360x#Qa4!;@RG$9)Q+!Ft~Pe!5)VWtIuL2$PbN!AXI`4fW_@)= zuT!QoAi{p}#QWe&ZHRD-+vdD#`||P8y0knMe1N=9JE8miT7N380PjIYQlIr1x1h~M z$ymraS@}Q}eQhN)yP_cWfhdkvv6}oVi|2;xMe}f}d~JxY`*y|ra-~BvT((Agik|dC z}DDp@Q!s#&EGQ_F)K6xQaIh1cqqVf{$B_##eDGw-^XjdswZ>iCCOBo3Ou_gfuQ2d z7xjUDKBEktwa|%asx0)7`#Ynznqz%O>+pzpi`vdZnZwTn#e{9`(3dh*XcK5DO&Y2^15XfC7&PaMX$S zg<6T);?9{_D4;r*s!F7oN?VJg(WPR**DhTqB>5R#lXa4YP}!Mc(KP?)d5iViV6R=x zb6x7y=KG=m*+O5fT(6x^ly18}46h!8MAwbn%1&KZu&ZWxyZl~G5iewQ7LPlCI~vDM z6;giHt50JPo`i&_Y_a_;nn_P^LHi7Gb1J{G?Hc816AAM(rjx$?dJKBSA$M&C2zAKZ?A-8K`nqw^QG52}jFb#(}5Dxg2 z3QYP{AuT~4Z4j?y?q^lf^odOh^h>)qRb3ofq(lg~RlHryEo6R(tFxXZl4-45IpF}&TtP0{snKInGASAFUouwkV% z1}d%R3F&*edU+6J1%$AhoH!8DA=TT2LLJDICH1RrpPU`m9ydr=kfGlrd5x>74!!m5 zP|>Nr3>I1+lvM1vIw3!NP1$v>mQ}51Jzo9NmsIemyEp2juTXii(ajEd)~1UCMWYrR z`-l{>1=oFSt2<=z2DiES2EB@-=VOtnFgRqRzdY5?6tfStru06ed+RyC>xH|gdnRm- zWSLCLg*4(U_3MCG2*!9G?LTJq2(&1hXaZllkh+gknaOO$zZ{uZ6h0k`>AZF+3@_$H z5VGp=n|r{7r%FszdB|Cwe!)RV0p<%dR`w!GW56`UDzy=n<6yi-skjc>kjxoWLPmyp{8Jp_OIEx?O2E8oQ$n$N4kr*%u~ZqszNAwpMXT%Npx* zn@;eF81bqZ=miqHc)v91Tfe()!FHTl4iAA#vk3l0KUObfz|Qz(L#5G>Y85}LZie6a z6iN<(v~Yr;705VD1F^MrvbmXbXCZ?ulRQ{+1;Td-^sFad(dfAhS#16TZv9Au!Mu5k#k<1m%j2<)bHLH zn{pX7KBGP#E>S-@EzaqS{t&=o-+ggov*bl1;DaT9zQwr}Y8wX49>(JXeunz`RLNR9 zQX;5ZU00YnIvkEP98_&r+{8eVOU=h#yZ3te6mRsd-10h@M*hA_4SL@Dc!X|0lqeAMni)aUu`M@ zb?o+YM}kvjhD$y{6RNrTuc+K1haqFa*@SbBlTnUGEXwYkGGmPJb0V+tLS+R$)oc|> zZ~2K&5eS(`P2bZkT`^zeGiqXm@t;qOO0o_^YE<%4J8p)(&9N4qrE#{MYQ+`BSG*T3kjqm7t*#|cC;0LBs~JX)7F#J?J`I}#KLb3Sa?P;N`wWVw z+f(>a5}a6fD;}HI)SmrD|CJSLSx8)og$)fyVCrb{@!8sJkf<^VQ4GqaUck06i)NpUdrAK6d${z>*V z@u26dF4q?4h!6j{k?;rw*b?gvDgPp~S`^Oue?Ra3>C^$EBgD1I<^^OVITX)A6T;&* zERwW4=cVlyzu_mbPYeUvvNMrz{nHH^ugc=2JeTPygus6rb73bD3M+@Ps8}$!1`#?MyFHj0X(IO%ID}i02SfiES$tAm_fa&S; zbBNk@Vo#IHxZ=@+NUoQHmYraD&D@Ny;y8LF0cQbFzJTD*upo(P7k0sG){6hq?w z$-swb6h)>^_fIwjlO>IW1Tel#9F5$?y^5oz)VXQ#!~81lO1!u9dcl9$I^??;wN4*z zfqU-lWK9pS-u;&l()qM0q}qSwt{Mg{%Q)Y8ck{U8u+v~;zT?KK)gt7iPPrrhDv{L8 zs6W(ar{KwW)?5{d%mOnqf~FLUPe|dm$+VK>^k7++RZ+6i^a|6rVU2*4=03LH4s5XI z!*d&z?dgh#YV|UgNA)0t*qfH?cbOO67J0a_Hy}h9;qn8!ug?mrx{P1-C`6NiTBW1X zd=%{$jQyLy;2lF`PdMyoFi`T%m6`WkEy((AkG_8ASiR&f;AIFS|8$7^=0h%>@aTY_ zp|R62;`iv&TyG>xcAh~hvVyVR{a5q)&dyA7vPLi@67zl4@_Z7wDA-Qo9ce)&*r2ip z)N254v%|AQ>*50mJUV4Gi&PBNx#Ih%>nw^{UJ=eNIJVu=eji=!2@$CrIoaVY&or82 zmrVt;JOrZ>?_jq9ocIp+86kK)b8vq*nDEdPsCLaBTPR^@>M-Rqq&DWhnGDKcY-7gU z$ABsKd^uX1qat-DMNXb$nYKYx+pT}6pID|3uHQ$2F9(F2#sRI6g3EWm@Fo)ck7h|p zO?9kHiz-C1C|Nbyt=$jLS2%Uy$!pi}+dL-u%&W&|lg>&R0@#43-F0t6{q|1q$A}Hp zi*W_ak``uPN~--4jFf;g035=9zp%~?<7lM8U!r$H-dor2u`^BwO#6g9ZmQIDH9QVa zAu3KK90Qnk4Wlt>^25}v&|r>zOueAfcZ$l23^A%(`)o~e0?%?)MV3UmqcLrowCUbt zGjI;t@AP}MgMKUJVl-9|^uplGHIjP^`$hJf2J6Z6!w@!u_94H;uas-g-X$_BWxcFA zq*z+3f$?jIhRgZL$!E{LSCg($AKU1OlPa2i^1(!QXX>M2tYDu<|J9jo$CST{%BLzd1EE@r!|s zRPgpA>12^$69i{#FEFLiunA?Ktfw}G&p7=iv&7wpjk}xR6VCF~dr64Z3S>;?c=Bs< zMc$Ee7guL%kYqN4VV_O8ORPGN3CCsD$ZspDcn>RRZ)ZVkOb6g!prY~_TplR=kIh$M(!pp7 z>5;F-_)l7XQC9BQv#w#*1Qc1-~avRp>`D-LseRrX$m`k@T+`h$Sy+l6hVLfE` zje_Wk|6Ku}5UD)aR! z-;kP@o3nFbjyNv2XJiWBnLhduLo0kQEIf3f$+37iTU>j8xkJ8U9t99+4^5jg1oW#+ zo>-RPQO^`85F@v%y5y)`Q@C^^$BWhZT+5VU6Gf_mYmG&pgjal$o=yY}a#$tzXau=~$tFmE|6o&Z{PCI^x@h<#7S6p9>nL{4AN6MY~7HoXkSIT_^Z(ukpX z9?f(riZ9e(Z}tU)>rMURLbdESvo&vfa5S-g5vM9@<&fiQ4qP1fv&Mx3PHs>TO~453 zb`!3hK>UZ7OqzHXF3q^a3>5b*e+_4|IM~iW0q@7c?$hU6e#?v?rn8Ks;4INDR?8=h zC0Z9)y{INNX28GiI+icr{d#}4CYVbfsuGM#{1D_ciz;riZv@C9cbitM&vxcqkta5` z^Yx`pIc@IyMXsCUVKxd3fEZm+n$iD8erde3b#Inoe<$mV~sjyxZcFOc?|xM)d=O!Gl>F0)p2y9T0_&{ zhn&>UQEWRo>|@kETBXYPVuF=a0r`kixN-;go#eyD?Fp$>Hf$JvAr=A{8!ruuphmeP?wGn zo0e9ioAkP<2?)vPAjFG9p!O?vhPj^gmwSi!7n!TwqHk>|@MC#&%XD0?FPz0(euSs5 z4(w4p)_5@#qG_p$2Z0t1We9!ia_&(U1&(!9s&w+FURycQ`s%XT^!qFxNhM_waRH!*I5@&r1cLKW97-T6G0=CkpJ< zbmL2(jLKrs9|f-iMP7*L4mH<+V~FV($-rMafJ07WxI7#{d=Y)9vGY!^cR$qsRhRFmq>U*L`1~yBUpoVot&C-z|(@!WZotUmP zDpkuCGtYQfXZUCl6DF%X8Wk4dcYUb9PtbStgpOga5VF6VeS3T5ShLb-Z?v`0R8?K+ zb-HEF9=&e1sL*?3lHux`=(gDCbYk$P&qW*=?XMd|??;|v33Cz4x|Td&WKA8`rEc{r zIrYf>lOZLG3*ZYQ;6SZZ8lEdH-Ep6?vH{!!@Jy5gi51r`7RP69NB_pg+9(8>`2MOI@D#TN0G9_Wobb!sLwqH6o0==ePx%?{lpa3Izr6^xf!7 z(1rM?)Uf~Pp@xG@>{=%HEzCFH_;OLYIp;n+cc^TA+S5DnExodv(}>&>mcHJ3HgES+ zRxRDlJd~SJNo!#P`DuD$w+{x3^e=3^ftYqV(#Z$m?ztPGrvASYc#Gfv9orr2x=Ih} zrDT|C`3tNG`IYUCBl=-)lZ%Fl!KvteRcx9z;&QR zX>_6WqAaZTS!(Lx=!2}s9Df{{8Aie*rwK0xo)z=PDB}OQ8KKG~A^d>6jk4k|qtjoI zahQqsqzJ!HYTgC^JC_n@AUTOokn;liNy(Z7wxqC!Ej{8fy9?NwG(sOZCE gNcL}43K)0929s>@f}>WlXsFL?c{Mqxj9JkC0U~S*>Hq)$ literal 8857 zcmZ{K1z1#F+wLF|(%p?niL{gql7n=2igb4lsC26|(jcAE-K}&tqI4H_hp-KucOf)hy2n2%pN?Jk%0zp^+pKVZ)!T&ZYL>};l{8| z%BUbA43cYPWjYps`rMJm^S9CfxL4 zkTFS+F$*C&7D6WnMyErEDL5oisKfZrqelt%Q~&4Oe>>t|<@)=*f6o1T#Hjc87KL1^ zc1sPI)w|nk*B9uJw>oYotW9$@*y5Lw`a`$G5y$H|Qr4sNO51^SN21pzv7uW@fp ziC3ik@^4Zq5zmOkkMu0f^fDrZXh>1%{GnwnOPDYe@8S!OYHgnhf`2Z#jmFnx?jGRk zLHNC?InZQiNFjt&;6e5hMJPi!5d^Zo*oY1BxIAXgRk(xL$u}wGy~A$^hS3NJAVF|0 ztzeM01VgyLCAXPXlb0IYaIh45%ln2OSpu^sAhe>RV(H_}NHvUIdPg7w-utW$z7f?E z#dJeKdGrLTT}uRU*z*$P;y%b!T)xde*nEE(^$a!IL%uw-9|q~`@0T22`uJhW`DO6X zqQlV?TV%yw6J+C+Ha81n?cb5&g-Y6Sbz7i^DvqUlTRcE81xhj!=vASwlvg6`W)6hiL%FTe@o z?N}|nCXYuuQ+`<$rDMY-^ED>dU9TW-C{F#sQcJVCW43muKWnMW4q%AatQB;Dk z<*3Q^s>XrA!qV~)D=Vw=kjudoQo1d>Ur~emfdR?gDL)ed+Ed*MG*6wD1oe|jGkJ0h zGJZ%UG!d(ygpKY>Vx_Bp+3{yMI|77(0UH7G{P}Y-`0ipO@sp+_A_6odjpDH2-FCz@ zX5f|)7o`roqb>SO!0SEK)ZRLqD`aM5K+qGq5Fop|+ieOglA=TKKBvkLah~Mv_Fp>3 zJH?BH=^jA(e*Hl+J=vZtIuFeV`sEB`dn$3Et@G6XDIdB}44yG#-0QVmw$1Tck*92I zoUQ|JltnAP7Sa~V|8-a04t2VZ(l{#zC=jNnPai;W99UE;t?6`iNq16-v_ zOb!Q2a2|^hNVWB}7cHU^rO*9@f8(3}!L2&Ze`bsSok{-52#GQZbszzB78ujl)$!sQ zKoLZR4n`|(lE!>OOv-tygw?2yJg(mZp-^+>{YcJNU7#xmAM2!~t3CtD=dHXTDXQe-eadR%4_|Km|IK1bW=g7#Nj5Mg$ zQ>A4_CKm&f4puYy3y$jKZAa!*?0OWzHG7>S6Z4wo*~2Y0H7=8?_PRIYQQO|Gch%hz zsXb}XkW?;0`DQpS$R>J?zWPkEmo|*opIaZ;x4t|_s%h(y*To16Wx4!eqB~8+z41*F zpWRT-*N^N;s|Y6Bd_dMm823}ddYv*w$jXl;i37b+jaJ~<;;^o^<^sN^n+Kfs?R1$@ zrCj1Y_>d{vnGmzv@2jKV%Jf>RC^frh>diy^dNQo9!KTYmV+yo#O_{l-QWsYA4G;H@ z;Bp@R!F-!w4+)A25p6-1tbDfES#j4U3TfNL-pH=V!wx}}2mnt|m*ORPe7^qcm$A}u zYhWD%yhe568mBUPXD525Sz(%=lnWLMk0QH923Z~_s#U}md40&x!l87uIu953Neds6 ze3Q@pCYN5vnH??_CXBr%Eogy!NL7<@-I>5O5cYN<9w;d;w%EyyR0CcKg7;&p8cXc# z%#4y{MFcX|rlR5goamQsu7NtwR3CWqXxWu7i~G`XfhrT<&a;BrvZ~Bu)6Ry6ENt=0 z1KlElHOI4>wRtwO5r)aPWd(ARe)^os(R+o2gPY3A2y8kW(G9M9V&HOKYHBY;(fXNMq8avB|T|2Y$rb4|$MrC&1l4&wboX{tQC z-`%8I`;aASmp$#vOM17mabAVX^^k4ftl~;;X5|_7aMSvqKYvOT^lxD5L|>lrKw@!P z!>9-eM>;N?3rw_v(V$5UxvVedD&qCw3o@-}=H`qgXJ65eDv{p3_riMS@gYHd{|;-& z?(pc$Kk(-T((!lQS`L$Kf+nF=%62J@bz5m$Tizv@=3Hfob#%wI%|yO(C(YINEzA6v zrlP7L&&8Mh*3!iM-sd7$R94fafgK%UJiq@0K0Sjz#(Oj{FmTwr#a-vMNA@X3wH)57 z5ZPi84#MQp5`+l@_8*#$(ljL-Z?oQ0h=wWY3?qOc$jd6lLRYm>jpe0TLdyj9_R&%0 zbDrHT{EXUfBfod4s1Q(4P%xs%LZG;~U>9?T*0$XdB9gp=&hxP4t(B+Gi*60&sO1Hg zDXc36hp{Jb4Vph;czb)VqA}6rGdS&=$KECHJF&c$ithHq+J|kF3Lomcd90_GfZ|l0l zIo_P3maIKC!(=|g|8g@n)_ZvT8}{ddo8NC04{xfplU>Bu{BIadmX1TdE?kvYREQcI z(=L4W%Fd^O%`nPR{Y+}gwI*@al_j;YWs-hp=zERjy1N@NPf%^0pjevxsYFmiL!+aM zbD|};2BU;=0f`A-JefO_$n;VAF@Ra+Z^be}#6mg9(x~KdXY;T@WW3)Kaw8+a7ym*3 zQTm|>WUrz1HGC|n<`PeOz^^QGtOcZ+-lH~lksq5CYv|1Y`XJ2i5My!4$QaI@ERB-n%`=_HEjPEY zYu{~x*HTd&EYl&2EieWzK?DT%!p2hzHeo5d|PazA{c{VYwZYC`fipn-$B|cw6 zn<(OrrJ`Dfx@RqDKw2^BZs+8LMg{eHb4qPSG6$>J`0Q+}adwdzA?Y!krd8v_3%s5t zVet28nEK{oQ9=*)9By+*h083O%Qi{S>E7Jx@vMj=GXoN3ryvPW%VL8|J18D6CF-0R z5mOrj*G4;o&60#(Uu926MLBZ0`FX7^`&XE3JOf*VeY`_%SKe zV20FoK6v#wiTm*Eth0)gTe7!{;rBNf)}U2FzSdb9ttlNP}W(l=MVT-L zEY0*5t$LdRhn*=kjIHQrE|D=6SE{|`Sap7P(96~(Yyd%#=f`UEv~_jq+1N1Cptt9j zpM|xWoswqHG~zdk#H!%a{eWpTT_48e-Xr87{QbdhP_2H@fYEF5Ro#KV97^*a3ijV= zR&rQt!#WCA1#K=;^jbCK0n|J$F?9 zc6JY2W`5(Jo8BQbaT|YnWx6qx8m!tWbwLCSHaBWoLT;X$QQfHW8nf%mNQJM^m4c{Jz_yz+mf+N+ zzEPjs(i*bUMIutPVD5TBgN}|K2DhgJo-#VW)-wWLAJWUP1^D?#-g{D`ZP+f9$0t9x z6tlA{oyc)C2{Wt~D|49-GnMUMT#N)+dT>^yMQlE3q_(j&7a$P%PADnQ%_+Y-hj3g^WK#q`u+#W6kLxQ0n~}yjk^Q_4K@SSTM;ikr6UJJhug4 zfHk%^f-{MERSKm!FeO+`jnSsgl06v~J_vuH}4Z*S>AxMv}<^7Y}=geqLO24ex$t^7F}o z5gEd4Ze|Vcv5^3DHo@RYNli^n@5^IR`O(9Pc!z3+?t`=aT&%L1JYXu}zQHVHOtKLG z$Gqn8KRaYfDr(84xOR8qq$)b^@P4*#E*PRGCnuLtlx6S}F}!?j{;8jA5{6Bg)AA9X zU!^4lsQ+N9iH$ZulXlB>GC%|%8$4!MnD}}0t0(KL4}nm6;cM!#>fr6Pv1Mg& zge`Ees0Gk)Xt}a#MX{4K?Y(~zsYj@7Suv!b^z?LZIl5{vAt2auI86Xiw{}Z| z@A72Yzs`$6yN>b&Kxq#jR`Xogy-FCO#N{@laB^~TI9>3pvbsP6k@9_R=`($hINe91 z-A$6GQCFxEZ;qRkBz1RPeW^{1->r%VLm*AfO%josrp0_Go{tj-Iccmo{-D3vTqww9 zN}sTeZTyv-@_uE7Cic2SI@>F%!W04kF=pU~#qi@ti>MAz24#~hE z?fiFRv&U6QMdI@w#F`G7v72BQTC5G8>YVb@b zKFcIbb^WF3u6P3o)+0mR#>?HUaS5Wz^=}pKq%p)1q}d?tOEKt~RH<}t%O%TltH2S* za-6mFU0hwO%|oF1T9}HeE;^0wdtvCr&$4ug#loyudjD-cJ97FCmzXlWsMnhgWodTTQQ)ucX$lM zjV`o1?{m${$SOVAjgpm%P+gtzuI?JA-#&!|CYhEcG+7XZ#pM6S?4+rpE_L_5?dz&h z%-Kea@8~@d%Id|oMC?Z26ndWtbC^#Z6>&Oucy(ZOs+n6kpprP#CJZ_X-yrXsElJjv zrV7x2y3BHzO-Wi=VSk5kymck0;X{A|WUI<~b7A8k<3es9*`#}Y?i}r}Qu_ZcL$w6YPTguExslCwu9Q9N zw4kO1ANN*9R@~^VUtG@&g~@Nl$wX6j%1E&bia`s@dVeLGg(dz7=v3jP$oO#oCPqMdJfCXlQ60 zE)p1kJao>p;~Wt^9rN(@^@RfN{|-n1O+JYCXa5`>AwW!)siGMb(=x21mwuHxz@o^G z&VCz+iRsqyV*wDC2?+N}I<4>gRCVt+0q4=KLE@O@^q~F&Me)JsnHE1sF$OhDiH81D z=3qJ2PmLWcK*d7C>#_VtNRiI-^Yrv2A-J*6OwAc~v$Dwps>AC%IZ0J}!+@4K-04!o zGKaJlev8jS+m2==L948KkotO02WQvrSrLWTcf%q^t62<$LrE`O1$T2)7V472fZ9XH z$|@VXca|&Hd1x%|z{^Y8N-Y%8wfBnO_eais)E$2BXKTbcThPoMB2H{>JW z)TO1Ej$p2)YRu~P91fU;1hHAFLjahM-|gI}o^=5fOF+QdSC_FM9=8jVQjrUe>l2Tz z-ByS}j_fmP1v2zyGg0U`W3(|44K2v=-lO}a^|arJtY!aV4d`m|?UeeKE`+jWS#UmF zcE#bo^q~3omDw4U1Pt@~3Q-Dy3hEPbmz%eBe9+81K2oSIt9Q4#ol8pwb$}RHg{EAQlEKF&+~*rknZ6AZefr9I?+mbh z{}+HY-D}~1oPNkrfh#y@Ym?sc!;v-1^u+=7sX3S_;Pf33ln4N*upGW)w(9YZOyGLC z0r~<(nx959L=hn`l^r>4tfzy%d@-$evzncR`JM_-l$4+pmyb;RLz z2k~fN<^q+~j_JvSepm8L(u-}$Yk-@$Aa`#wCyU>mNRC0(H;$7kQElgI7C1TQnoYyL zI;|z8reXrPF*8+KGV1=a5vwGTpQMm)kOSk0OWC-WPrbDoR%<87i&Z_#CuOcwoR$R@ z*05DW*;9qg9PPQ2@T|D{-|S3%L4R&H_kgYg(2dOnHi~E}=!6CAGggVfj|?(%)hZ8C zkTujhc-327LD4~q6kl#LT9uJa|95rU<0g|*t|QR6!CxQx-*m9~h+pdhvbDyj&;g>e z`SQ4Xz*IJH{%9L&IiAT2qflG32_s?$h7OmD3n4yqcbO!g$^`wKf&kWkdoY$Ai)Z*E zGZ})Nf>j`!<#u}gWf`hSu~$L~fsTU$bobmNJGj0wms~HnwexQ?2r*IEyJkzXPUgpt zAN*N=C-jK34YRELb5&2#l>o3Wog66+;Bf$*d3G-bbL2i*NanTHXdDVTnO%Sn0xhx0 z^JpYX65YeYqiu4Mkd~GR8#QlKhM6~QLY_V@R-8eEv)`}?o% z?nVRzJcPWovwL=Vx)&}LN!H%ki5MCh+VR`><}%ZAJlA3@=aEL4K}jVyXb5oUFWp?7 z;ZjgUu(zCxnWt8m^wL401|A|_#}>r~&19scq$GkaOsD&c;jdzz82=iGLq$gy&r?YK z@ZkdlL}@^9ut`V2qpa5%B{#I29r`d6M@TG59Zg(%Iv157hzFRxx(J3IJn9R3Ro8x7o#8PVbbISHOG^c z6&0Bg5g2Hws2Pim?mH!w_RG-inF@MbTw&kq#NEBUt)*sfux|d#^R?*E5R0i|Z63E> zEf!YRY@q7_^(QttSq5D3jjgRbTA-Lc#_>fltHyw{+4p40?(S~EJs{VhVPWO!H@e~C zDoaTPtpr=?zV6YPO%uzc0c9ApjHrJ7{HX+bT!GM{tdctkiTL>VE)cSGswygC3=9l8 z$wJ*NRZsLnCB#6lqBS)&v7bM)@}$MYWII+)9WRZIefsI-8OT+j z#_|}GF6(}UgTLNbTgw8+B_Jb{$;{0Bxw$F*`}c1NiP*$M>38qm5s;8bw_g8|74UA@ zX1+ni!g^wEZay$PJgvI{+68ay?G?4PwU0ZoMU*@|_;GRT>*|!;+@9m&@>-0%9UC7H z4Pg=%PJQs;0k8p3C4lhy_%XFD=g3B73-AbHV&d?xj0uBVGZiLPmg7&zM0|bf9aTcACTJ4D3w_XiS16a2;S%`>;%B!jf?097#<7LXx zeat8>mOGkswzLd1kr674jf;yDN{fp_;^X53lGgR^3KE8iqB1z=l zc46Mr#u;SkhX`(>%C)4kt^ ztKu#POO!>LWyrX+^z?|LqN05RW9)Cr%F?QG$L zI_z6-f^KiF5Fyt$H;%hAoRBtOX$;hCQk(M6u98}VdPfB_P0{Jm8`Jcl>oR+ml@3T^e zh4Jy2PoF-y7;LldZ58EhkEaQH_YDq)m+Cj>Rw@9M`qdW|GOjlv4mLnN`nj_s3#67T zdzeM|J7~IYjm@ju+glxzFLt`=%?z^fABu`tkx)>^Qv{szO$XxvL(6fp-6FR>Y3b_j zR_+YK?En5f5~Klo3Y3>1Eso9lwS4&oaEh;NeF{~nN?LR`IuAY>S=hzV20a~}7=Mk; zELX8%D^;c0cd>LRd}Vt(YT*X~{rpygRqnrFg7Gi#ztz;NyJn=gA5-nu ztOKsPo_}8pBa)cU%th~qJJm)B|EZ7vyITIQqkmhc|5nofc9fV9aEB;SxM3t^Jq~`M Q0D-)cRFEhYGkX7j01pN>T>t<8 From 490a3a5424d1368ba7b2678b6a30264f3f1c1776 Mon Sep 17 00:00:00 2001 From: Ivan Kartolo Date: Mon, 13 Mar 2017 11:55:06 +0100 Subject: [PATCH 34/56] remove old returmmail script --- res/scripts/returnmail.phpsh | 100 ----------------------------------- 1 file changed, 100 deletions(-) delete mode 100644 res/scripts/returnmail.phpsh diff --git a/res/scripts/returnmail.phpsh b/res/scripts/returnmail.phpsh deleted file mode 100644 index 48d808139..000000000 --- a/res/scripts/returnmail.phpsh +++ /dev/null @@ -1,100 +0,0 @@ -#! /usr/bin/php -q - -* All rights reserved -* -* This script is part of the TYPO3 project. The TYPO3 project is -* free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* The GNU General Public License can be found at -* http://www.gnu.org/copyleft/gpl.html. -* A copy is found in the textfile GPL.txt and important notices to the license -* from the author is found in LICENSE.txt distributed with these scripts. -* -* -* This script is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* This copyright notice MUST APPEAR in all copies of the script! -***************************************************************/ -/** - * Cron tack for return mails analysis - * - * @author Kasper Skaarhoj - * @author Stanislas Rolland - * - * $Id: returnmail.phpsh 9476 2008-07-18 07:58:42Z ivankartolo $ - * - */ - -define('TYPO3_MODE', 'BE'); -define('TYPO3_cliMode', TRUE); - -require __DIR__ . '/../../../../../typo3/sysext/core/Classes/Core/CliBootstrap.php'; -\TYPO3\CMS\Core\Core\CliBootstrap::checkEnvironmentOrDie(); - -require __DIR__ . '/../../../../../typo3/sysext/core/Classes/Core/Bootstrap.php'; -\TYPO3\CMS\Core\Core\Bootstrap::getInstance() - ->baseSetup('typo3conf/ext/direct_mail/res/scripts/') - ->loadConfigurationAndInitialize() - ->loadTypo3LoadedExtAndExtLocalconf(TRUE) - ->applyAdditionalConfigurationSettings() - ->initializeTypo3DbGlobal(); - -// MAIL CONTENT -$filename = 'php://stdin'; - -$content = \TYPO3\CMS\Core\Utility\GeneralUtility::getUrl($filename); -if (trim($content)) { - $readMail = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('DirectMailTeam\\DirectMail\\Readmail'); - - // Split mail into head and content - $mailParts = $readMail->extractMailHeader($content); - // Find id - $midArr = $readMail->find_XTypo3MID($content); - if (!is_array($midArr)) { - $midArr = $readMail->find_MIDfromReturnPath($mailParts['to']); - } - - // Extract text content - $c = trim($readMail->getMessage($mailParts)); - $cp = $readMail->analyseReturnError($c); - - $res = $TYPO3_DB->exec_SELECTquery( - 'uid,email', - 'sys_dmail_maillog', - 'rid=' . intval($midArr['rid']) . ' AND rtbl="' . - $TYPO3_DB->quoteStr($midArr['rtbl'], 'sys_dmail_maillog') . '"' . - ' AND mid=' . intval($midArr['mid']) . ' AND response_type=0' - ); - if (!$TYPO3_DB->sql_num_rows($res)) { - $midArr = array(); - $cp = $mailParts; - } else { - $row = $TYPO3_DB->sql_fetch_assoc($res); - $midArr['email'] = $row['email']; - } - - $insertFields = array( - 'tstamp' => time(), - 'response_type' => -127, - 'mid' => intval($midArr['mid']), - 'rid' => intval($midArr['rid']), - 'email' => $midArr['email'], - 'rtbl' => $midArr['rtbl'], - 'return_content' => serialize($cp), - 'return_code' => intval($cp['reason']) - ); - $TYPO3_DB->exec_INSERTquery('sys_dmail_maillog', $insertFields); -} - -?> From 40d883df291ac088cddab07b884674c6a49234d9 Mon Sep 17 00:00:00 2001 From: Ivan Kartolo Date: Fri, 17 Mar 2017 13:44:32 +0100 Subject: [PATCH 35/56] Fixing some TYPO3 CGL as mentioned by @simonschaufi --- Classes/Scheduler/AnalyzeBounceMail.php | 24 ++++++++++++------- .../AnalyzeBounceMailAdditionalFields.php | 19 ++++++++++----- .../Index.rst | 2 +- 3 files changed, 29 insertions(+), 16 deletions(-) diff --git a/Classes/Scheduler/AnalyzeBounceMail.php b/Classes/Scheduler/AnalyzeBounceMail.php index 0d1a820a7..7a07f80fa 100644 --- a/Classes/Scheduler/AnalyzeBounceMail.php +++ b/Classes/Scheduler/AnalyzeBounceMail.php @@ -1,16 +1,22 @@ getDatabaseConnection()->sql_fetch_assoc($res); $midArray['email'] = $row['email']; $insertFields = array( - 'tstamp' => time(), + 'tstamp' => $GLOBALS['EXEC_TIME'], 'response_type' => -127, 'mid' => intval($midArray['mid']), 'rid' => intval($midArray['rid']), @@ -251,7 +257,7 @@ private function connectMailServer() // check if we can connect using the given data /** @var Server $mailServer */ $mailServer = GeneralUtility::makeInstance( - 'Fetch\\Server', + Server::class, $this->server, (int) $this->port, $this->service diff --git a/Classes/Scheduler/AnalyzeBounceMailAdditionalFields.php b/Classes/Scheduler/AnalyzeBounceMailAdditionalFields.php index b02a3b5ea..5aa4cdd4c 100644 --- a/Classes/Scheduler/AnalyzeBounceMailAdditionalFields.php +++ b/Classes/Scheduler/AnalyzeBounceMailAdditionalFields.php @@ -1,12 +1,19 @@ `_ +It needs the `PHP-IMAP `_ extension. #. Create a mailbox (IMAP or POP) for the returned mails, for example: From 6f016969acc4f3dca7dd8517ff2ea2e0d1024d6d Mon Sep 17 00:00:00 2001 From: Ivan Kartolo Date: Fri, 23 Jun 2017 16:11:37 +0200 Subject: [PATCH 36/56] [BUGFIX] set empty value for attachment wenn SQL is set to strict, SQL shows error since attachment is blob and it needs default value Resolves #52 --- Classes/DirectMailUtility.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Classes/DirectMailUtility.php b/Classes/DirectMailUtility.php index 034dec5f1..9c86f008b 100644 --- a/Classes/DirectMailUtility.php +++ b/Classes/DirectMailUtility.php @@ -967,7 +967,8 @@ public static function createDirectMailRecordFromPage($pageUid, array $parameter 'authcode_fieldList' => $parameters['authcode_fieldList'], 'sendOptions' => $GLOBALS['TCA']['sys_dmail']['columns']['sendOptions']['config']['default'], 'long_link_rdct_url' => self::getUrlBase($parameters['use_domain']), - 'sys_language_uid' => (int)$sysLanguageUid + 'sys_language_uid' => (int)$sysLanguageUid, + 'attachment' => '' ); if ($newRecord['sys_language_uid'] > 0) { From 375d3828b4b7615d0028dcad99f1c258b82769c3 Mon Sep 17 00:00:00 2001 From: Ivan Kartolo Date: Fri, 23 Jun 2017 16:25:16 +0200 Subject: [PATCH 37/56] [Release] Release version 5.2.0 last feature release of direct_mail 5.2.0 for TYPO3 7.6 LTS. Any development hereafter will be focusing the TYPO3 8.7 LTS. New feature is the rewrite of bounce handling. The bounce handling is now run from the scheduler module. It's need the PHP IMAP extension. --- ext_emconf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext_emconf.php b/ext_emconf.php index f466eb191..48002edea 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -15,7 +15,7 @@ 'description' => 'Advanced Direct Mail/Newsletter mailer system with sophisticated options for personalization of emails including response statistics.', 'category' => 'module', 'shy' => 0, - 'version' => '5.1.1', + 'version' => '5.2.0', 'dependencies' => 'cms,tt_address', 'conflicts' => 'sr_direct_mail_ext,it_dmail_fix,plugin_mgm,direct_mail_123', 'priority' => '', From 49e8e6a9adf9826550c3c9a45f64e51e216fe697 Mon Sep 17 00:00:00 2001 From: Ivan Kartolo Date: Tue, 27 Jun 2017 15:49:08 +0200 Subject: [PATCH 38/56] [BUGFIX] Remove jumpurl max version restriction Resolves: #63 --- ext_emconf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext_emconf.php b/ext_emconf.php index 48002edea..bc61f2cb1 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -38,7 +38,7 @@ 'tt_address' => '', 'php' => '5.5.0', 'typo3' => '7.6.0-7.6.99', - 'jumpurl' => '7.6.0-7.6.99', + 'jumpurl' => '7.6.0', ), 'conflicts' => array( 'sr_direct_mail_ext' => '', From eeebed5acd3b912938997cd138fe813604748590 Mon Sep 17 00:00:00 2001 From: Ivan Kartolo Date: Tue, 27 Jun 2017 15:56:55 +0200 Subject: [PATCH 39/56] [BUGFIX] Marked processed mail deleted and expunge the deleted mail Resolves: #64 Releases: --- Classes/Scheduler/AnalyzeBounceMail.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/Scheduler/AnalyzeBounceMail.php b/Classes/Scheduler/AnalyzeBounceMail.php index 7a07f80fa..cabcd8b14 100644 --- a/Classes/Scheduler/AnalyzeBounceMail.php +++ b/Classes/Scheduler/AnalyzeBounceMail.php @@ -177,14 +177,14 @@ public function execute() // process the mail if ($this->processBounceMail($message)) { // set delete - //$message->delete(); + $message->delete(); } else { $message->setFlag('SEEN'); } } // expunge to delete permanently - //$mailServer->expunge(); + $mailServer->expunge(); return true; } else { return false; From 261c90aa00430338d5d7d2595823a013085c4e72 Mon Sep 17 00:00:00 2001 From: rsternec Date: Thu, 20 Jul 2017 11:06:43 +0200 Subject: [PATCH 40/56] Update DirectMailUtility.php Add user-agent when fetching content of a page --- Classes/DirectMailUtility.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/DirectMailUtility.php b/Classes/DirectMailUtility.php index 9c86f008b..1d36db21b 100644 --- a/Classes/DirectMailUtility.php +++ b/Classes/DirectMailUtility.php @@ -1181,7 +1181,7 @@ public static function fetchUrlContentsForDirectMailRecord(array $row, array $pa $htmlmail->includeMedia = $row['includeMedia']; if ($plainTextUrl) { - $mailContent = GeneralUtility::getURL(self::addUserPass($plainTextUrl, $params)); + $mailContent = GeneralUtility::getURL(self::addUserPass($plainTextUrl, $params), 0, array('User-Agent: Direct Mail')); $htmlmail->addPlain($mailContent); if (!$mailContent || !$htmlmail->theParts['plain']['content']) { $errorMsg[] = $GLOBALS["LANG"]->getLL('dmail_no_plain_content'); From 9b8d57dffb8d66c78272f043f751d2ddcd98aa32 Mon Sep 17 00:00:00 2001 From: Ivan Kartolo Date: Mon, 11 Sep 2017 14:17:19 +0200 Subject: [PATCH 41/56] close the imap connection --- Classes/Scheduler/AnalyzeBounceMail.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Classes/Scheduler/AnalyzeBounceMail.php b/Classes/Scheduler/AnalyzeBounceMail.php index cabcd8b14..15df386a6 100644 --- a/Classes/Scheduler/AnalyzeBounceMail.php +++ b/Classes/Scheduler/AnalyzeBounceMail.php @@ -185,6 +185,7 @@ public function execute() // expunge to delete permanently $mailServer->expunge(); + imap_close($mailServer->getImapStream()); return true; } else { return false; From a5d16e987451872c65ffd46e3c900de35f2909da Mon Sep 17 00:00:00 2001 From: Ivan Kartolo Date: Mon, 11 Sep 2017 20:46:06 +0200 Subject: [PATCH 42/56] [BUGFIX] added default value. some default values are not set. this causes SQL error if the server is run in strict mode Resolves #75 --- Classes/DirectMailUtility.php | 3 ++- Configuration/TCA/sys_dmail.php | 2 ++ ext_tables.sql | 8 ++++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Classes/DirectMailUtility.php b/Classes/DirectMailUtility.php index 9c86f008b..30de057ba 100644 --- a/Classes/DirectMailUtility.php +++ b/Classes/DirectMailUtility.php @@ -968,7 +968,8 @@ public static function createDirectMailRecordFromPage($pageUid, array $parameter 'sendOptions' => $GLOBALS['TCA']['sys_dmail']['columns']['sendOptions']['config']['default'], 'long_link_rdct_url' => self::getUrlBase($parameters['use_domain']), 'sys_language_uid' => (int)$sysLanguageUid, - 'attachment' => '' + 'attachment' => '', + 'mailContent' => '' ); if ($newRecord['sys_language_uid'] > 0) { diff --git a/Configuration/TCA/sys_dmail.php b/Configuration/TCA/sys_dmail.php index e6741a6dc..982967909 100644 --- a/Configuration/TCA/sys_dmail.php +++ b/Configuration/TCA/sys_dmail.php @@ -12,6 +12,7 @@ 'type' => 'type', 'useColumnsForDefaultValues' => 'from_email,from_name,replyto_email,replyto_name,organisation,priority,encoding,charset,sendOptions,type', 'dividers2tabs' => true, + 'languageField' => 'sys_language_uid' ), 'interface' => array( 'showRecordFieldList' => 'sys_language_uid,type,plainParams,HTMLParams,subject,from_name,from_email,replyto_name,replyto_email,return_path,organisation,attachment,priority,encoding,charset,sendOptions,includeMedia,flowedFormat,issent,renderedsize,use_domain,use_rdct,long_link_mode,authcode_fieldList' @@ -21,6 +22,7 @@ 'exclude' => 1, 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language', 'config' => array( + 'default' => '0', 'type' => 'select', 'foreign_table' => 'sys_language', 'foreign_table_where' => 'ORDER BY sys_language.title', diff --git a/ext_tables.sql b/ext_tables.sql index 05f7180a7..82f0b5b5e 100755 --- a/ext_tables.sql +++ b/ext_tables.sql @@ -56,7 +56,7 @@ CREATE TABLE sys_dmail ( deleted tinyint(4) unsigned DEFAULT '0' NOT NULL, type tinyint(4) unsigned DEFAULT '0' NOT NULL, page int(11) unsigned DEFAULT '0' NOT NULL, - attachment tinyblob NOT NULL, + attachment tinyblob NULL, subject varchar(120) DEFAULT '' NOT NULL, from_email varchar(80) DEFAULT '' NOT NULL, from_name varchar(80) DEFAULT '' NOT NULL, @@ -73,9 +73,9 @@ CREATE TABLE sys_dmail ( plainParams varchar(80) DEFAULT '' NOT NULL, issent tinyint(4) unsigned DEFAULT '0' NOT NULL, renderedsize int(11) unsigned DEFAULT '0' NOT NULL, - mailContent mediumblob NOT NULL, + mailContent mediumblob NULL, scheduled int(10) unsigned DEFAULT '0' NOT NULL, - query_info mediumblob NOT NULL, + query_info mediumblob NULL, scheduled_begin int(10) unsigned DEFAULT '0' NOT NULL, scheduled_end int(10) unsigned DEFAULT '0' NOT NULL, return_path varchar(80) DEFAULT '' NOT NULL, @@ -136,7 +136,7 @@ CREATE TABLE sys_dmail_maillog ( email varchar(255) DEFAULT '' NOT NULL, rtbl char(1) DEFAULT '' NOT NULL, tstamp int(11) unsigned DEFAULT '0' NOT NULL, - url tinyblob NOT NULL, + url tinyblob NULL, size int(11) unsigned DEFAULT '0' NOT NULL, parsetime int(11) unsigned DEFAULT '0' NOT NULL, response_type tinyint(4) DEFAULT '0' NOT NULL, From 5f191115ce728481827e4d5c46d41fea4e8777d7 Mon Sep 17 00:00:00 2001 From: Christian Toffolo Date: Fri, 15 Sep 2017 16:18:34 +0200 Subject: [PATCH 43/56] Update for TYPO3 8 LTS (#60) * [TASK] save last dmail source in tmp for debug * [TASK] Updates for TYPO3 8 LTS * [TASK] Migration for Breaking: #78384 - Frontend ignores TCA in ext_tables.php (cherry picked from commit 002cf38b07db5ea4fce737d39513205443c413f3) * [TASK] Update composer.json --- Classes/DirectMailUtility.php | 55 ++++++++++++++++++- Classes/Dmailer.php | 14 ++++- Classes/Importer.php | 4 +- Classes/Module/Configuration.php | 20 ++++++- Classes/Module/Dmail.php | 27 +++++++-- Classes/Module/MailerEngine.php | 25 +++++++-- Classes/Module/RecipientList.php | 15 ++++- Classes/Module/Statistics.php | 15 ++++- .../Plugin/DirectMail.php | 4 +- Configuration/TCA/Overrides/pages.php | 4 ++ Configuration/TCA/Overrides/sys_template.php | 6 ++ Configuration/TCA/sys_dmail_category.php | 2 +- Configuration/TypoScript/plaintext/setup.txt | 3 +- Migrations/Code/ClassAliasMap.php | 1 + Resources/Public/StyleSheets/modules.css | 4 +- composer.json | 7 ++- ext_emconf.php | 6 +- ext_tables.php | 7 --- 18 files changed, 175 insertions(+), 44 deletions(-) rename pi1/class.tx_directmail_pi1.php => Classes/Plugin/DirectMail.php (99%) create mode 100644 Configuration/TCA/Overrides/sys_template.php diff --git a/Classes/DirectMailUtility.php b/Classes/DirectMailUtility.php index 479098db9..ef640159a 100644 --- a/Classes/DirectMailUtility.php +++ b/Classes/DirectMailUtility.php @@ -19,6 +19,7 @@ use TYPO3\CMS\Core\Imaging\Icon; use TYPO3\CMS\Core\Imaging\IconFactory; use TYPO3\CMS\Core\Messaging\FlashMessage; +use TYPO3\CMS\Core\Messaging\FlashMessageService; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\MathUtility; @@ -1217,10 +1218,18 @@ public static function fetchUrlContentsForDirectMailRecord(array $row, array $pa } } + /** @var FlashMessageService $flashMessageService */ + $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class); + $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier(); + if (!count($errorMsg)) { // Update the record: $htmlmail->theParts['messageid'] = $htmlmail->messageid; $mailContent = base64_encode(serialize($htmlmail->theParts)); + + // !ian save last dmail source in tmp for debug + file_put_contents('/tmp/dmail.php', var_export($htmlmail->theParts, true)); + $updateData = array( 'issent' => 0, 'charset' => $htmlmail->charset, @@ -1241,7 +1250,8 @@ public static function fetchUrlContentsForDirectMailRecord(array $row, array $pa $GLOBALS['LANG']->getLL('dmail_warning'), FlashMessage::WARNING ); - $theOutput .= $flashMessage->render(); + $defaultFlashMessageQueue->enqueue($flashMessage); + $theOutput .= $defaultFlashMessageQueue->renderFlashMessages(); } } else { /* @var $flashMessage FlashMessage */ @@ -1250,7 +1260,8 @@ public static function fetchUrlContentsForDirectMailRecord(array $row, array $pa $GLOBALS['LANG']->getLL('dmail_error'), FlashMessage::ERROR ); - $theOutput .= $flashMessage->render(); + $defaultFlashMessageQueue->enqueue($flashMessage); + $theOutput .= $defaultFlashMessageQueue->renderFlashMessages(); } if ($returnArray) { return array('errors' => $errorMsg, 'warnings' => $warningMsg); @@ -1569,4 +1580,44 @@ public static function implodeTSParams(array $p, $k = '') } return $implodeParams; } + + /** + * Takes a clear-text message body for a plain text email, finds all 'http://' links and if they are longer than 76 chars they are converted to a shorter URL with a hash parameter. The real parameter is stored in the database and the hash-parameter/URL will be redirected to the real parameter when the link is clicked. + * This function is about preserving long links in messages. + * + * @param string $message Message content + * @param string $urlmode URL mode; "76" or "all + * @param string $index_script_url URL of index script (see makeRedirectUrl()) + * @return string Processed message content + * @see makeRedirectUrl() + * @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8. Use mailer API instead + */ + public static function substUrlsInPlainText($message, $urlmode = '76', $index_script_url = '') + { + switch ((string)$urlmode) { + case '': + $lengthLimit = false; + break; + case 'all': + $lengthLimit = 0; + break; + case '76': + + default: + $lengthLimit = (int)$urlmode; + } + if ($lengthLimit === false) { + // No processing + $messageSubstituted = $message; + } else { + $messageSubstituted = preg_replace_callback( + '/(http|https):\\/\\/.+(?=[\\]\\.\\?]*([\\! \'"()<>]+|$))/iU', + function (array $matches) use ($lengthLimit, $index_script_url) { + return GeneralUtility::makeRedirectUrl($matches[0], $lengthLimit, $index_script_url); + }, + $message + ); + } + return $messageSubstituted; + } } diff --git a/Classes/Dmailer.php b/Classes/Dmailer.php index 2b8fc35e2..dd350689c 100755 --- a/Classes/Dmailer.php +++ b/Classes/Dmailer.php @@ -15,9 +15,10 @@ */ use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Core\Html\HtmlParser; +use TYPO3\CMS\Core\Service\MarkerBasedTemplateService; use TYPO3\CMS\Backend\Utility\BackendUtility; use TYPO3\CMS\Core\Utility\MathUtility; +use DirectMailTeam\DirectMail\DirectMailUtility; /** * Class, doing the sending of Direct-mails, eg. through a cron-job @@ -112,6 +113,11 @@ class Dmailer */ public $simulateUsergroup; + /** + * @var MarkerBasedTemplateService + */ + protected $templateService; + /** * Preparing the Email. Headers are set in global variables * @@ -249,7 +255,9 @@ public function replaceMailMarkers($content, array $recipRow, array $markers) } } - return HtmlParser::substituteMarkerArray($content, $markers); + // initialize Marker Support + $this->templateService = GeneralUtility::makeInstance(MarkerBasedTemplateService::class); + return $this->templateService->substituteMarkerArray($content, $markers); } @@ -310,7 +318,7 @@ public function dmailer_sendAdvanced(array $recipRow, $tableNameChar) if ($this->mailHasContent) { $tempContent_Plain = $this->replaceMailMarkers($tempContent_Plain, $recipRow, $additionalMarkers); if (trim($this->dmailer['sys_dmail_rec']['use_rdct']) || trim($this->dmailer['sys_dmail_rec']['long_link_mode'])) { - $tempContent_Plain = GeneralUtility::substUrlsInPlainText($tempContent_Plain, $this->dmailer['sys_dmail_rec']['long_link_mode']?'all':'76', $this->dmailer['sys_dmail_rec']['long_link_rdct_url']); + $tempContent_Plain = DirectMailUtility::substUrlsInPlainText($tempContent_Plain, $this->dmailer['sys_dmail_rec']['long_link_mode']?'all':'76', $this->dmailer['sys_dmail_rec']['long_link_rdct_url']); } $this->theParts['plain']['content'] = $this->encodeMsg($tempContent_Plain); $returnCode|=2; diff --git a/Classes/Importer.php b/Classes/Importer.php index 3838a794b..49f0d41af 100644 --- a/Classes/Importer.php +++ b/Classes/Importer.php @@ -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 @@ -994,7 +995,6 @@ 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']); $this->fileProcessor->setActionPermissions($userPermissions); $this->fileProcessor->dontCheckForUnique = 1; @@ -1063,7 +1063,6 @@ 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']); $this->fileProcessor->setActionPermissions(); $this->fileProcessor->dontCheckForUnique = 1; @@ -1075,6 +1074,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; diff --git a/Classes/Module/Configuration.php b/Classes/Module/Configuration.php index b430d77c8..9b8049d98 100644 --- a/Classes/Module/Configuration.php +++ b/Classes/Module/Configuration.php @@ -22,6 +22,7 @@ use TYPO3\CMS\Backend\Utility\BackendUtility; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Messaging\FlashMessage; +use TYPO3\CMS\Core\Messaging\FlashMessageService; use DirectMailTeam\DirectMail\DirectMailUtility; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; @@ -76,6 +77,10 @@ class Configuration extends BaseScriptClass */ protected $iconFactory; + /** @var FlashMessageService $flashMessageService */ + protected $flashMessageService; + protected $defaultFlashMessageQueue; + /** * The name of the module * @@ -122,6 +127,10 @@ public function init() // initialize IconFactory $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class); + // initialize FlashMessageService + $this->flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class); + $this->defaultFlashMessageQueue = $this->flashMessageService->getMessageQueueByIdentifier(); + // initialize backend user language if ($this->getLanguageService()->lang && ExtensionManagementUtility::isLoaded('static_info_tables')) { $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( @@ -285,6 +294,11 @@ function toggleDisplay(toggleId, e, countBox) { // $pidrec=BackendUtility::getRecord('pages', intval($this->pageinfo['pid'])); $module=$pidrec['module']; } + + /** @var FlashMessageService $flashMessageService */ + $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class); + $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier(); + if ($module == 'dmail') { // Direct mail module if (($this->pageinfo['doktype'] == 254) && ($this->pageinfo['module'] == 'dmail')) { @@ -300,7 +314,8 @@ function toggleDisplay(toggleId, e, countBox) { // $this->getLanguageService()->getLL('dmail_newsletters'), FlashMessage::WARNING ); - $markers['FLASHMESSAGES'] = $flashMessage->render(); + $this->defaultFlashMessageQueue->enqueue($flashMessage); + $markers['FLASHMESSAGES'] = $this->defaultFlashMessageQueue->renderFlashMessages(); } } else { $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', @@ -308,7 +323,8 @@ function toggleDisplay(toggleId, e, countBox) { // $this->getLanguageService()->getLL('header_conf'), FlashMessage::WARNING ); - $markers['FLASHMESSAGES'] = $flashMessage->render(); + $this->defaultFlashMessageQueue->enqueue($flashMessage); + $markers['FLASHMESSAGES'] = $this->defaultFlashMessageQueue->renderFlashMessages(); } diff --git a/Classes/Module/Dmail.php b/Classes/Module/Dmail.php index 5e05f7686..8ee14d2fb 100644 --- a/Classes/Module/Dmail.php +++ b/Classes/Module/Dmail.php @@ -25,6 +25,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\MathUtility; use TYPO3\CMS\Core\Messaging\FlashMessage; +use TYPO3\CMS\Core\Messaging\FlashMessageService; use DirectMailTeam\DirectMail\DirectMailUtility; use TYPO3\CMS\Core\Imaging\IconFactory; use TYPO3\CMS\Core\Imaging\Icon; @@ -76,6 +77,10 @@ class Dmail extends BaseScriptClass */ protected $iconFactory; + /** @var FlashMessageService $flashMessageService */ + protected $flashMessageService; + protected $defaultFlashMessageQueue; + protected $currentStep = 1; /** @@ -107,6 +112,10 @@ public function init() // initialize IconFactory $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class); + // initialize FlashMessageService + $this->flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class); + $this->defaultFlashMessageQueue = $this->flashMessageService->getMessageQueueByIdentifier(); + // get the config from pageTS $temp = BackendUtility::getModTSconfig($this->id, 'mod.web_modules.dmail'); if (!is_array($temp['properties'])) { @@ -338,15 +347,18 @@ function toggleDisplay(toggleId, e, countBox) { // $this->getLanguageService()->getLL('dmail_newsletters'), FlashMessage::WARNING ); - $markers['FLASHMESSAGES'] = $flashMessage->render(); + $this->defaultFlashMessageQueue->enqueue($flashMessage); + $markers['FLASHMESSAGES'] = $this->defaultFlashMessageQueue->renderFlashMessages(); } } else { + /* @var $flashMessage FlashMessage */ $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $this->getLanguageService()->getLL('select_folder'), $this->getLanguageService()->getLL('header_directmail'), FlashMessage::WARNING ); - $markers['FLASHMESSAGES'] = $flashMessage->render(); + $this->defaultFlashMessageQueue->enqueue($flashMessage); + $markers['FLASHMESSAGES'] = $this->defaultFlashMessageQueue->renderFlashMessages(); } $this->content = $this->doc->startPage($this->getLanguageService()->getLL('title')); @@ -423,7 +435,7 @@ public function createDMail_quick(array $indata) // link in the mail $message = '' . $indata['message'] . ''; if (trim($this->params['use_rdct'])) { - $message = GeneralUtility::substUrlsInPlainText($message, $this->params['long_link_mode']?'all':'76', + $message = DirectMailUtility::substUrlsInPlainText($message, $this->params['long_link_mode']?'all':'76', DirectMailUtility::getUrlBase($this->params['use_domain'])); } if ($indata['breakLines']) { @@ -702,7 +714,8 @@ public function moduleContent() $this->getLanguageService()->getLL('dmail_wiz2_fetch_success'), FlashMessage::OK ); - $markers['FLASHMESSAGES'] = $flashMessage->render(); + $this->defaultFlashMessageQueue->enqueue($flashMessage); + $markers['FLASHMESSAGES'] = $this->defaultFlashMessageQueue->renderFlashMessages(); } if (is_array($row)) { @@ -906,7 +919,8 @@ public function cmd_finalmail($direct_mail_row) '', FlashMessage::ERROR //severity ); - $groupInput = $flashMessage->render(); + $this->defaultFlashMessageQueue->enqueue($flashMessage); + $groupInput = $this->defaultFlashMessageQueue->renderFlashMessages(); } elseif (count($opt) === 1) { $groupInput = ''; if (!$hookSelectDisabled) { @@ -1121,7 +1135,8 @@ public function cmd_send_mail($row) ); } - return $flashMessage->render(); + $this->defaultFlashMessageQueue->enqueue($flashMessage); + return $this->defaultFlashMessageQueue->renderFlashMessages(); } /** diff --git a/Classes/Module/MailerEngine.php b/Classes/Module/MailerEngine.php index 977d56dcf..cfb1af6d4 100644 --- a/Classes/Module/MailerEngine.php +++ b/Classes/Module/MailerEngine.php @@ -21,6 +21,7 @@ use TYPO3\CMS\Backend\Utility\BackendUtility; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Messaging\FlashMessage; +use TYPO3\CMS\Core\Messaging\FlashMessageService; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; @@ -62,6 +63,10 @@ class MailerEngine extends \TYPO3\CMS\Backend\Module\BaseScriptClass */ protected $iconFactory; + /** @var FlashMessageService $flashMessageService */ + protected $flashMessageService; + protected $defaultFlashMessageQueue; + /** * The name of the module * @@ -91,6 +96,10 @@ public function init() // initialize IconFactory $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class); + // initialize FlashMessageService + $this->flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class); + $this->defaultFlashMessageQueue = $this->flashMessageService->getMessageQueueByIdentifier(); + $temp = BackendUtility::getModTSconfig($this->id, 'mod.web_modules.dmail'); if (!is_array($temp['properties'])) { $temp['properties'] = array(); @@ -224,7 +233,8 @@ function jumpToUrlD(URL) { // $this->getLanguageService()->getLL('dmail_newsletters'), FlashMessage::WARNING ); - $markers['FLASHMESSAGES'] = $flashMessage->render(); + $this->defaultFlashMessageQueue->enqueue($flashMessage); + $markers['FLASHMESSAGES'] = $this->defaultFlashMessageQueue->renderFlashMessages(); } } else { $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', @@ -232,7 +242,8 @@ function jumpToUrlD(URL) { // $this->getLanguageService()->getLL('header_mailer'), FlashMessage::WARNING ); - $markers['FLASHMESSAGES'] = $flashMessage->render(); + $this->defaultFlashMessageQueue->enqueue($flashMessage); + $markers['FLASHMESSAGES'] = $this->defaultFlashMessageQueue->renderFlashMessages(); } $this->content = $this->doc->startPage($this->getLanguageService()->getLL('title')); @@ -336,8 +347,8 @@ public function cmd_cronMonitor() } - $currentDate = ' / ' . $this->getLanguageService()->getLL('dmail_mailerengine_current_time') . ' ' . BackendUtility::datetime(time()) . '
'; - $lastRun = '
' . $this->getLanguageService()->getLL('dmail_mailerengine_cron_lastrun') . ($lastExecutionTime ? BackendUtility::datetime($lastExecutionTime) : '-') . $currentDate; + $currentDate = ' / ' . $this->getLanguageService()->getLL('dmail_mailerengine_current_time') . ' ' . BackendUtility::datetime(time()) . '. '; + $lastRun = ' ' . $this->getLanguageService()->getLL('dmail_mailerengine_cron_lastrun') . ($lastExecutionTime ? BackendUtility::datetime($lastExecutionTime) : '-') . $currentDate; switch ($mailerStatus) { case -1: $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', @@ -362,7 +373,8 @@ public function cmd_cronMonitor() break; default: } - return $flashMessage->render(); + $this->defaultFlashMessageQueue->enqueue($flashMessage); + return $this->defaultFlashMessageQueue->renderFlashMessages(); } /** @@ -384,7 +396,8 @@ public function cmd_mailerengine() $this->getLanguageService()->getLL('dmail_mailerengine_invoked'), FlashMessage::INFO ); - $invokeMessage = $flashMessage->render(); + $this->defaultFlashMessageQueue->enqueue($flashMessage); + $invokeMessage = $this->defaultFlashMessageQueue->renderFlashMessages(); } // Invoke engine diff --git a/Classes/Module/RecipientList.php b/Classes/Module/RecipientList.php index 702bc2c61..d7e0da273 100644 --- a/Classes/Module/RecipientList.php +++ b/Classes/Module/RecipientList.php @@ -22,6 +22,7 @@ use TYPO3\CMS\Backend\Utility\BackendUtility; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Messaging\FlashMessage; +use TYPO3\CMS\Core\Messaging\FlashMessageService; use DirectMailTeam\DirectMail\DirectMailUtility; /** @@ -76,6 +77,10 @@ class RecipientList extends \TYPO3\CMS\Backend\Module\BaseScriptClass */ protected $iconFactory; + /** @var FlashMessageService $flashMessageService */ + protected $flashMessageService; + protected $defaultFlashMessageQueue; + /** * The name of the module * @@ -105,6 +110,10 @@ public function init() // initialize IconFactory $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class); + // initialize FlashMessageService + $this->flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class); + $this->defaultFlashMessageQueue = $this->flashMessageService->getMessageQueueByIdentifier(); + $temp = BackendUtility::getModTSconfig($this->id, 'mod.web_modules.dmail'); if (!is_array($temp['properties'])) { $temp['properties'] = array(); @@ -243,7 +252,8 @@ function jumpToUrlD(URL) { // $this->getLanguageService()->getLL('dmail_newsletters'), FlashMessage::WARNING ); - $markers['FLASHMESSAGES'] = $flashMessage->render(); + $this->defaultFlashMessageQueue->enqueue($flashMessage); + $markers['FLASHMESSAGES'] = $this->defaultFlashMessageQueue->renderFlashMessages(); } } else { /* @var $flashMessage FlashMessage */ @@ -252,7 +262,8 @@ function jumpToUrlD(URL) { // $this->getLanguageService()->getLL('header_recip'), FlashMessage::WARNING ); - $markers['FLASHMESSAGES'] = $flashMessage->render(); + $this->defaultFlashMessageQueue->enqueue($flashMessage); + $markers['FLASHMESSAGES'] = $this->defaultFlashMessageQueue->renderFlashMessages(); } $this->content = $this->doc->startPage($this->getLanguageService()->getLL('mailgroup_header')); diff --git a/Classes/Module/Statistics.php b/Classes/Module/Statistics.php index 257d643b3..cfc1c2a3a 100644 --- a/Classes/Module/Statistics.php +++ b/Classes/Module/Statistics.php @@ -21,6 +21,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\MathUtility; use TYPO3\CMS\Core\Messaging\FlashMessage; +use TYPO3\CMS\Core\Messaging\FlashMessageService; use TYPO3\CMS\Backend\Utility\IconUtility; use DirectMailTeam\DirectMail\DirectMailUtility; use Psr\Http\Message\ResponseInterface; @@ -76,6 +77,10 @@ class Statistics extends \TYPO3\CMS\Backend\Module\BaseScriptClass */ protected $iconFactory; + /** @var FlashMessageService $flashMessageService */ + protected $flashMessageService; + protected $defaultFlashMessageQueue; + /** * The name of the module * @@ -105,6 +110,10 @@ public function init() // initialize IconFactory $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class); + // initialize FlashMessageService + $this->flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class); + $this->defaultFlashMessageQueue = $this->flashMessageService->getMessageQueueByIdentifier(); + // get TS Params $temp = BackendUtility::getModTSconfig($this->id, 'mod.web_modules.dmail'); if (!is_array($temp['properties'])) { @@ -257,7 +266,8 @@ function jumpToUrlD(URL) { // $this->getLanguageService()->getLL('dmail_newsletters'), FlashMessage::WARNING ); - $markers['FLASHMESSAGES'] = $flashMessage->render(); + $this->defaultFlashMessageQueue->enqueue($flashMessage); + $markers['FLASHMESSAGES'] = $this->defaultFlashMessageQueue->renderFlashMessages(); } } else { $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', @@ -265,7 +275,8 @@ function jumpToUrlD(URL) { // $this->getLanguageService()->getLL('header_stat'), FlashMessage::WARNING ); - $markers['FLASHMESSAGES'] = $flashMessage->render(); + $this->defaultFlashMessageQueue->enqueue($flashMessage); + $markers['FLASHMESSAGES'] = $this->defaultFlashMessageQueue->renderFlashMessages(); $markers['CONTENT'] = '

' . $this->getLanguageService()->getLL('stats_overview_header') . '

'; } diff --git a/pi1/class.tx_directmail_pi1.php b/Classes/Plugin/DirectMail.php similarity index 99% rename from pi1/class.tx_directmail_pi1.php rename to Classes/Plugin/DirectMail.php index 251234510..5d9b34e16 100644 --- a/pi1/class.tx_directmail_pi1.php +++ b/Classes/Plugin/DirectMail.php @@ -1,4 +1,6 @@ */ -class tx_directmail_pi1 extends AbstractPlugin +class DirectMail extends AbstractPlugin { /** diff --git a/Configuration/TCA/Overrides/pages.php b/Configuration/TCA/Overrides/pages.php index 307442f00..1283cf706 100644 --- a/Configuration/TCA/Overrides/pages.php +++ b/Configuration/TCA/Overrides/pages.php @@ -6,3 +6,7 @@ // pages modified $GLOBALS['TCA']['pages']['columns']['module']['config']['items'][] = array('LLL:EXT:direct_mail/Resources/Private/Language/locallang_tca.xlf:pages.module.I.5', 'dmail'); + +if (is_array($GLOBALS['TCA']['pages']['ctrl']['typeicon_classes'])) { + $GLOBALS['TCA']['pages']['ctrl']['typeicon_classes']['contains-dmail'] = 'tcarecords-pages-contains-dmail'; +} diff --git a/Configuration/TCA/Overrides/sys_template.php b/Configuration/TCA/Overrides/sys_template.php new file mode 100644 index 000000000..bf5958830 --- /dev/null +++ b/Configuration/TCA/Overrides/sys_template.php @@ -0,0 +1,6 @@ + array( 'showRecordFieldList' => 'hidden,category' ), - 'feInterface' => $TCA['sys_dmail_category']['feInterface'], + 'feInterface' => $GLOBALS['TCA']['sys_dmail_category']['feInterface'], 'columns' => array( 'sys_language_uid' => array( 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language', diff --git a/Configuration/TypoScript/plaintext/setup.txt b/Configuration/TypoScript/plaintext/setup.txt index 1f82871e0..d1e8ca43e 100644 --- a/Configuration/TypoScript/plaintext/setup.txt +++ b/Configuration/TypoScript/plaintext/setup.txt @@ -6,8 +6,7 @@ plugin.tx_directmail_pi1 = USER plugin.tx_directmail_pi1 { - includeLibs = typo3conf/ext/direct_mail/pi1/class.tx_directmail_pi1.php - userFunc = tx_directmail_pi1->main + userFunc = DirectMailTeam\DirectMail\Plugin\DirectMail->main siteUrl = {$plugin.tx_directmail_pi1.siteUrl} flowedFormat = {$plugin.tx_directmail_pi1.flowedFormat} diff --git a/Migrations/Code/ClassAliasMap.php b/Migrations/Code/ClassAliasMap.php index 14cb077f4..3629f9fab 100644 --- a/Migrations/Code/ClassAliasMap.php +++ b/Migrations/Code/ClassAliasMap.php @@ -1,5 +1,6 @@ 'DirectMailTeam\\DirectMail\\Plugin\\DirectMail', 'tx_directmail_checkjumpurl' => 'DirectMailTeam\\DirectMail\\Checkjumpurl', 'tx_directmail_container' => 'DirectMailTeam\\DirectMail\\Container', 'tx_directmail_static' => 'DirectMailTeam\\DirectMail\\DirectMailUtility', diff --git a/Resources/Public/StyleSheets/modules.css b/Resources/Public/StyleSheets/modules.css index fecb6ee20..f195da554 100644 --- a/Resources/Public/StyleSheets/modules.css +++ b/Resources/Public/StyleSheets/modules.css @@ -41,12 +41,12 @@ div.toggleTitle a img { .t3-wizard-steps { margin: 0px 10px 0px 0px; - padding-left: 30px; - padding-right: 30px; float: left; clear: both; line-height: 22px; background-image: none; + background-color: #ddd; + padding: 5px; } .t3-wizard-steps span { font-size: 22px; diff --git a/composer.json b/composer.json index 1e2629133..ea78dc806 100644 --- a/composer.json +++ b/composer.json @@ -22,8 +22,9 @@ "issues": "https://forge.typo3.org/projects/extension-direct_mail" }, "require": { - "typo3/cms-core": ">=7.6,<8.0", - "typo3-ter/jumpurl": ">=7.6" + "typo3/cms-core": "^8.7", + "typo3-ter/jumpurl": "~7.7.0", + "typo3-ter/tt-address": "^3.2" }, "autoload": { "psr-4": { @@ -42,4 +43,4 @@ ] } } -} +} \ No newline at end of file diff --git a/ext_emconf.php b/ext_emconf.php index bc61f2cb1..7904b30e2 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -15,7 +15,7 @@ 'description' => 'Advanced Direct Mail/Newsletter mailer system with sophisticated options for personalization of emails including response statistics.', 'category' => 'module', 'shy' => 0, - 'version' => '5.2.0', + 'version' => '6.0.0', 'dependencies' => 'cms,tt_address', 'conflicts' => 'sr_direct_mail_ext,it_dmail_fix,plugin_mgm,direct_mail_123', 'priority' => '', @@ -37,8 +37,8 @@ 'cms' => '', 'tt_address' => '', 'php' => '5.5.0', - 'typo3' => '7.6.0-7.6.99', - 'jumpurl' => '7.6.0', + 'typo3' => '8.7.0-8.99.99', + 'jumpurl' => '7.7.0-7.7.99', ), 'conflicts' => array( 'sr_direct_mail_ext' => '', diff --git a/ext_tables.php b/ext_tables.php index 9825bd865..ce1d2062b 100755 --- a/ext_tables.php +++ b/ext_tables.php @@ -6,10 +6,6 @@ $extPath = TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY); -TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript/boundaries/', 'Direct Mail Content Boundaries'); -TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript/plaintext/', 'Direct Mail Plain text'); -TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript/tt_news_plaintext/', 'Direct Mail News Plain text'); - // Category field disabled by default in backend forms. TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(' TCEFORM.tt_content.module_sys_dmail_category.disabled = 1 @@ -152,9 +148,6 @@ $GLOBALS['TBE_STYLES']['spritemanager']['singleIcons']['tcarecords-pages-contains-dmail'] = TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Icons/ext_icon_dmail_folder.gif'; -if (is_array($GLOBALS['TCA']['pages']['ctrl']['typeicon_classes'])) { - $GLOBALS['TCA']['pages']['ctrl']['typeicon_classes']['contains-dmail'] = 'tcarecords-pages-contains-dmail'; -} if (TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger(TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getExtensionVersion('tt_address')) <= TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger('2.3.5')) { include_once(TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY)."Configuration/TCA/Overrides/tt_address.php"); From 02d17caf3a1b52bed529c1a0623986692190ee41 Mon Sep 17 00:00:00 2001 From: Ivan Kartolo Date: Mon, 18 Sep 2017 16:43:06 +0200 Subject: [PATCH 44/56] [TASK] cleanup code for compatibility TYPO3 7 and 8 LTS Set dependency version to 7 and 8 LTS. Cleanup some code to work with SQL strict Resolves #78 --- Classes/DirectMailUtility.php | 18 +++++++++--------- Classes/Module/Dmail.php | 27 +++++++++++++++++---------- composer.json | 4 ++-- ext_emconf.php | 6 +++--- ext_tables.sql | 10 +++++----- 5 files changed, 36 insertions(+), 29 deletions(-) diff --git a/Classes/DirectMailUtility.php b/Classes/DirectMailUtility.php index ef640159a..3696479a8 100644 --- a/Classes/DirectMailUtility.php +++ b/Classes/DirectMailUtility.php @@ -228,7 +228,7 @@ public static function getIdList($table, $pidList, $groupUid, $cat) BackendUtility::BEenableFields($table) . BackendUtility::deleteClause($table) . $addWhere, - $switchTable . '.email' + $switchTable . '.uid, ' . $switchTable . '.email' ); } else { $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( @@ -239,7 +239,7 @@ public static function getIdList($table, $pidList, $groupUid, $cat) BackendUtility::BEenableFields($switchTable) . BackendUtility::deleteClause($switchTable) . $addWhere, - $switchTable . '.email' + $switchTable . '.uid, ' . $switchTable . '.email' ); } } else { @@ -259,7 +259,7 @@ public static function getIdList($table, $pidList, $groupUid, $cat) BackendUtility::deleteClause($table) . BackendUtility::deleteClause('sys_dmail_group') . $addWhere, - $switchTable . '.email' + $switchTable . '.uid, ' . $switchTable . '.email' ); } else { $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( @@ -274,7 +274,7 @@ public static function getIdList($table, $pidList, $groupUid, $cat) BackendUtility::deleteClause($switchTable) . BackendUtility::deleteClause('sys_dmail_group') . $addWhere, - $switchTable . '.email' + $switchTable . '.uid, ' . $switchTable . '.email' ); } } @@ -333,7 +333,7 @@ public static function getStaticIdList($table, $uid) BackendUtility::deleteClause($table) . BackendUtility::deleteClause('sys_dmail_group') . $addWhere, - $switchTable . '.email' + $switchTable . '.uid, ' . $switchTable . '.email' ); } else { $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( @@ -347,7 +347,7 @@ public static function getStaticIdList($table, $uid) BackendUtility::deleteClause($switchTable) . BackendUtility::deleteClause('sys_dmail_group') . $addWhere, - $switchTable . '.email' + $switchTable . '.uid, ' . $switchTable . '.email' ); } @@ -367,7 +367,7 @@ public static function getStaticIdList($table, $uid) ' AND sys_dmail_group_mm.tablenames=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($table, $table) . BackendUtility::BEenableFields($table) . BackendUtility::deleteClause($table) - ); + ); list($groupId) = $GLOBALS['TYPO3_DB']->sql_fetch_row($res); $GLOBALS['TYPO3_DB']->sql_free_result($res); @@ -391,8 +391,8 @@ public static function getStaticIdList($table, $uid) BackendUtility::deleteClause($switchTable) . BackendUtility::BEenableFields($table) . BackendUtility::deleteClause($table) . - $addWhere, - $switchTable . '.email' + $addWhere, + $switchTable . '.uid, ' . $switchTable . '.email' ); while (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))) { diff --git a/Classes/Module/Dmail.php b/Classes/Module/Dmail.php index 8ee14d2fb..9e425e578 100644 --- a/Classes/Module/Dmail.php +++ b/Classes/Module/Dmail.php @@ -19,6 +19,7 @@ use Psr\Http\Message\ServerRequestInterface; use TYPO3\CMS\Backend\Configuration\TranslationConfigurationProvider; use TYPO3\CMS\Backend\Module\BaseScriptClass; +use TYPO3\CMS\Core\Messaging\FlashMessageQueue; use TYPO3\CMS\Core\Utility\ArrayUtility; use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; use TYPO3\CMS\Backend\Utility\BackendUtility; @@ -79,6 +80,8 @@ class Dmail extends BaseScriptClass /** @var FlashMessageService $flashMessageService */ protected $flashMessageService; + + /** @var FlashMessageQueue $defaultFlashMessageQueue */ protected $defaultFlashMessageQueue; protected $currentStep = 1; @@ -114,6 +117,7 @@ public function init() // initialize FlashMessageService $this->flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class); + /** @var FlashMessageQueue defaultFlashMessageQueue */ $this->defaultFlashMessageQueue = $this->flashMessageService->getMessageQueueByIdentifier(); // get the config from pageTS @@ -476,9 +480,9 @@ public function compileQuickMail(array $row, $message) $htmlmail->addPlain($message); if (!$message || !$htmlmail->theParts['plain']['content']) { - $errorMsg .= '
' . $this->getLanguageService()->getLL('dmail_no_plain_content') . ''; + $errorMsg .= ' ' . $this->getLanguageService()->getLL('dmail_no_plain_content') . ''; } elseif (!strstr(base64_decode($htmlmail->theParts['plain']['content']), ''; public $boundaryEnd = ''; @@ -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 diff --git a/Classes/DirectMailUtility.php b/Classes/DirectMailUtility.php index 3696479a8..58b36e5c8 100644 --- a/Classes/DirectMailUtility.php +++ b/Classes/DirectMailUtility.php @@ -112,7 +112,7 @@ public static function cleanPlainList(array $plainlist) * * ); */ - $plainlist = array_map("unserialize", array_unique(array_map("serialize", $plainlist))); + $plainlist = array_map('unserialize', array_unique(array_map('serialize', $plainlist))); return $plainlist; } @@ -204,16 +204,16 @@ public static function getIdList($table, $pidList, $groupUid, $cat) // Direct Mail needs an email address! $emailIsNotNull = ' AND ' . $switchTable . '.email !=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('', $switchTable); - // fe user group uid should be in list of fe users list of user groups -// $field = $switchTable.'.usergroup'; -// $command = $table.'.uid'; + // fe user group uid should be in list of fe users list of user groups + // $field = $switchTable.'.usergroup'; + // $command = $table.'.uid'; // This approach, using standard SQL, does not work, // even when fe_users.usergroup is defined as varchar(255) instead of tinyblob // $usergroupInList = ' AND ('.$field.' LIKE \'%,\'||'.$command.'||\',%\' OR '.$field.' LIKE '.$command.'||\',%\' OR '.$field.' LIKE \'%,\'||'.$command.' OR '.$field.'='.$command.')'; // The following will work but INSTR and CONCAT are available only in mySQL $usergroupInList = ' AND INSTR( CONCAT(\',\',fe_users.usergroup,\',\'),CONCAT(\',\',fe_groups.uid ,\',\') )'; - $mmTable = $GLOBALS["TCA"][$switchTable]['columns']['module_sys_dmail_category']['config']['MM']; + $mmTable = $GLOBALS['TCA'][$switchTable]['columns']['module_sys_dmail_category']['config']['MM']; $cat = intval($cat); if ($cat < 1) { if ($table == 'fe_groups') { @@ -282,7 +282,7 @@ public static function getIdList($table, $pidList, $groupUid, $cat) while (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))) { $outArr[] = $row['uid']; } - $GLOBALS["TYPO3_DB"]->sql_free_result($res); + $GLOBALS['TYPO3_DB']->sql_free_result($res); return $outArr; } @@ -312,8 +312,8 @@ public static function getStaticIdList($table, $uid) // $usergroupInList = ' AND ('.$field.' LIKE \'%,\'||'.$command.'||\',%\' OR '.$field.' LIKE '.$command.'||\',%\' OR '.$field.' LIKE \'%,\'||'.$command.' OR '.$field.'='.$command.')'; // for fe_users and fe_group, only activated modulde_sys_dmail_newsletter - if ($switchTable == "fe_users") { - $addWhere = ' AND ' . $switchTable . ".module_sys_dmail_newsletter = 1"; + if ($switchTable == 'fe_users') { + $addWhere = ' AND ' . $switchTable . '.module_sys_dmail_newsletter = 1'; } $usergroupInList = ' AND INSTR( CONCAT(\',\',fe_users.usergroup,\',\'),CONCAT(\',\',fe_groups.uid ,\',\') )'; @@ -447,7 +447,7 @@ public static function getSpecialQueryIdList(MailSelect &$queryGenerator, $table */ public static function getMailGroups($list, array $parsedGroups, $perms_clause) { - $groupIdList = GeneralUtility::intExplode(",", $list); + $groupIdList = GeneralUtility::intExplode(',', $list); $groups = array(); $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( @@ -499,8 +499,8 @@ public static function rearrangeCsvValues(array $lines, $fieldList) // overrides any existing value in the field $first = $lines[0]; $fieldListArr = explode(',', $fieldList); - if ($GLOBALS["TYPO3_CONF_VARS"]['EXTCONF']['direct_mail']['addRecipFields']) { - $fieldListArr = array_merge($fieldListArr, explode(',', $GLOBALS["TYPO3_CONF_VARS"]['EXTCONF']['direct_mail']['addRecipFields'])); + if ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['direct_mail']['addRecipFields']) { + $fieldListArr = array_merge($fieldListArr, explode(',', $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['direct_mail']['addRecipFields'])); } $fieldName = 1; $fieldOrder = array(); @@ -515,11 +515,11 @@ public static function rearrangeCsvValues(array $lines, $fieldList) break; } } - // If not field list, then: + // If not field list, then: if (!$fieldName) { $fieldOrder = array(array('name'),array('email')); } - // Re-map values + // Re-map values reset($lines); if ($fieldName) { // Advance pointer if the first line was field names @@ -602,7 +602,7 @@ public static function makeCategories($table, array $row, $sysLanguageUid) $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( '*', 'sys_dmail_category', - 'sys_dmail_category.pid IN (' . str_replace(",", "','", $GLOBALS['TYPO3_DB']->fullQuoteStr($pidList, 'sys_dmail_category')) . ')' . + 'sys_dmail_category.pid IN (' . str_replace(',', "','", $GLOBALS['TYPO3_DB']->fullQuoteStr($pidList, 'sys_dmail_category')) . ')' . ' AND l18n_parent=0' . BackendUtility::BEenableFields('sys_dmail_category') . BackendUtility::deleteClause('sys_dmail_category') @@ -612,7 +612,7 @@ public static function makeCategories($table, array $row, $sysLanguageUid) $categories[$localizedRowCat['uid']] = htmlspecialchars($localizedRowCat['category']); } } - $GLOBALS["TYPO3_DB"]->sql_free_result($res); + $GLOBALS['TYPO3_DB']->sql_free_result($res); } } return $categories; @@ -633,20 +633,20 @@ public static function makeCategories($table, array $row, $sysLanguageUid) public static function getRecordOverlay($table, array $row, $sys_language_content, $OLmode = '') { if ($row['uid']>0 && $row['pid']>0) { - if ($GLOBALS["TCA"][$table] && $GLOBALS["TCA"][$table]['ctrl']['languageField'] && $GLOBALS["TCA"][$table]['ctrl']['transOrigPointerField']) { - if (!$GLOBALS["TCA"][$table]['ctrl']['transOrigPointerTable']) { + if ($GLOBALS['TCA'][$table] && $GLOBALS['TCA'][$table]['ctrl']['languageField'] && $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']) { + if (!$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerTable']) { // Will try to overlay a record only // if the sys_language_content value is larger that zero. if ($sys_language_content > 0) { // Must be default language or [All], otherwise no overlaying: - if ($row[$GLOBALS["TCA"][$table]['ctrl']['languageField']]<=0) { + if ($row[$GLOBALS['TCA'][$table]['ctrl']['languageField']]<=0) { // Select overlay record: $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( '*', $table, 'pid=' . intval($row['pid']) . - ' AND ' . $GLOBALS["TCA"][$table]['ctrl']['languageField'] . '=' . intval($sys_language_content) . - ' AND ' . $GLOBALS["TCA"][$table]['ctrl']['transOrigPointerField'] . '=' . intval($row['uid']) . + ' AND ' . $GLOBALS['TCA'][$table]['ctrl']['languageField'] . '=' . intval($sys_language_content) . + ' AND ' . $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'] . '=' . intval($row['uid']) . BackendUtility::BEenableFields($table) . BackendUtility::deleteClause($table), '', @@ -654,18 +654,18 @@ public static function getRecordOverlay($table, array $row, $sys_language_conten '1' ); $olrow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res); - $GLOBALS["TYPO3_DB"]->sql_free_result($res); + $GLOBALS['TYPO3_DB']->sql_free_result($res); - // Merge record content by traversing all fields: + // Merge record content by traversing all fields: if (is_array($olrow)) { foreach ($row as $fN => $fV) { if ($fN!='uid' && $fN!='pid' && isset($olrow[$fN])) { - if ($GLOBALS["TCA"][$table]['l10n_mode'][$fN]!='exclude' && ($GLOBALS["TCA"][$table]['l10n_mode'][$fN]!='mergeIfNotBlank' || strcmp(trim($olrow[$fN]), ''))) { + if ($GLOBALS['TCA'][$table]['l10n_mode'][$fN]!='exclude' && ($GLOBALS['TCA'][$table]['l10n_mode'][$fN]!='mergeIfNotBlank' || strcmp(trim($olrow[$fN]), ''))) { $row[$fN] = $olrow[$fN]; } } } - } elseif ($OLmode === 'hideNonTranslated' && $row[$GLOBALS["TCA"][$table]['ctrl']['languageField']] == 0) { + } elseif ($OLmode === 'hideNonTranslated' && $row[$GLOBALS['TCA'][$table]['ctrl']['languageField']] == 0) { // Unset, if non-translated records should be hidden. // ONLY done if the source record really is default language and not [All] in which case it is allowed. unset($row); @@ -673,13 +673,13 @@ public static function getRecordOverlay($table, array $row, $sys_language_conten // Otherwise, check if sys_language_content is different from the value of the record // that means a japanese site might try to display french content. - } elseif ($sys_language_content!=$row[$GLOBALS["TCA"][$table]['ctrl']['languageField']]) { + } elseif ($sys_language_content!=$row[$GLOBALS['TCA'][$table]['ctrl']['languageField']]) { unset($row); } } else { // When default language is displayed, // we never want to return a record carrying another language!: - if ($row[$GLOBALS["TCA"][$table]['ctrl']['languageField']]>0) { + if ($row[$GLOBALS['TCA'][$table]['ctrl']['languageField']]>0) { unset($row); } } @@ -714,11 +714,11 @@ public static function formatTable(array $tableLines, array $cellParams, $header $rowA = array(); for ($k=0; $k<$cols; $k++) { $v = $r[$k]; - $v = strlen($v) ? ($cellcmd[$k]?$v:htmlspecialchars($v)) : " "; + $v = strlen($v) ? ($cellcmd[$k]?$v:htmlspecialchars($v)) : ' '; if ($first) { $rowA[] = '
'; } else { - $rowA[] = '' . $v . ''; + $rowA[] = '' . $v . ''; } } $lines[] = '' . implode('', $rowA) . ''; @@ -836,7 +836,7 @@ public static function getRecordList(array $listArr, $table, $pageId, $editLinkF ], 'returnUrl' => $returnUrl ]; - $editLink = ''; } @@ -851,7 +851,7 @@ public static function getRecordList(array $listArr, $table, $pageId, $editLinkF } } if (count($lines)) { - $out = $GLOBALS["LANG"]->getLL('dmail_number_records') . ' ' . $count . '
'; + $out = $GLOBALS['LANG']->getLL('dmail_number_records') . ' ' . $count . '
'; $out .= '
' . $this->iconFactory->getIconForRecord('sys_dmail', $row)->render() . htmlspecialchars($row['subject']) . '
' . $this->iconFactory->getIconForRecord('sys_dmail', $row, Icon::SIZE_SMALL)->render() . htmlspecialchars($row['subject']) . '
' . $this->getLanguageService()->getLL('view_from') . '' . htmlspecialchars($row['from_name'] . ' <' . htmlspecialchars($row['from_email']) . '>') . '' . $fromInfo . '
' . $v . '
' . + $editLink = '' . $iconFactory->getIcon('actions-open', Icon::SIZE_SMALL) . '
' . implode(LF, $lines) . '
'; } return $out; @@ -868,11 +868,11 @@ public static function getFEgroupSubgroups($groupId) { // get all subgroups of this fe_group // fe_groups having this id in their subgroup field - $res = $GLOBALS["TYPO3_DB"]->exec_SELECT_mm_query( - "DISTINCT fe_groups.uid", - "fe_groups", - "sys_dmail_group_mm", - "sys_dmail_group", + $res = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query( + 'DISTINCT fe_groups.uid', + 'fe_groups', + 'sys_dmail_group_mm', + 'sys_dmail_group', ' AND INSTR( CONCAT(\',\',fe_groups.subgroup,\',\'),\',' . intval($groupId) . ',\' )' . BackendUtility::BEenableFields('fe_groups') . BackendUtility::deleteClause('fe_groups') @@ -980,7 +980,7 @@ public static function createDirectMailRecordFromPage($pageUid, array $parameter } - // If params set, set default values: + // If params set, set default values: $paramsToOverride = array('sendOptions', 'includeMedia', 'flowedFormat', 'HTMLParams', 'plainParams'); foreach ($paramsToOverride as $param) { if (isset($parameters[$param])) { @@ -1012,7 +1012,7 @@ public static function createDirectMailRecordFromPage($pageUid, array $parameter $newRecord['charset'] = self::getCharacterSetOfPage($pageRecord['uid']); } - // save to database + // save to database if ($newRecord['page'] && $newRecord['sendOptions']) { $tcemainData = array( 'sys_dmail' => array( @@ -1046,7 +1046,7 @@ public static function getLanguageParam($sysLanguageUid, array $params) // fallback: L == sys_language_uid } else { - $param = "&L=" . $sysLanguageUid; + $param = '&L=' . $sysLanguageUid; } return $param; @@ -1088,7 +1088,7 @@ public static function createDirectMailRecordFromExternalURL($subject, $external ); - // If params set, set default values: + // If params set, set default values: $paramsToOverride = array('sendOptions', 'includeMedia', 'flowedFormat', 'HTMLParams', 'plainParams'); foreach ($paramsToOverride as $param) { if (isset($parameters[$param])) { @@ -1100,7 +1100,7 @@ public static function createDirectMailRecordFromExternalURL($subject, $external } $urlParts = @parse_url($externalUrlPlain); - // No plain text url + // No plain text url if (!$externalUrlPlain || $urlParts === false || !$urlParts['host']) { $newRecord['plainParams'] = ''; $newRecord['sendOptions']&=254; @@ -1108,7 +1108,7 @@ public static function createDirectMailRecordFromExternalURL($subject, $external $newRecord['plainParams'] = $externalUrlPlain; } - // No html url + // No html url $urlParts = @parse_url($externalUrlHtml); if (!$externalUrlHtml || $urlParts === false || !$urlParts['host']) { $newRecord['sendOptions']&=253; @@ -1116,7 +1116,7 @@ public static function createDirectMailRecordFromExternalURL($subject, $external $newRecord['HTMLParams'] = $externalUrlHtml; } - // save to database + // save to database if ($newRecord['pid'] && $newRecord['sendOptions']) { $tcemainData = array( 'sys_dmail' => array( @@ -1156,10 +1156,10 @@ public static function fetchUrlContentsForDirectMailRecord(array $row, array $pa $htmlUrl = $urls['htmlUrl']; $urlBase = $urls['baseUrl']; - // Make sure long_link_rdct_url is consistent with use_domain. + // Make sure long_link_rdct_url is consistent with use_domain. $row['long_link_rdct_url'] = $urlBase; - // Compile the mail + // Compile the mail /* @var $htmlmail Dmailer */ $htmlmail = GeneralUtility::makeInstance('DirectMailTeam\\DirectMail\\Dmailer'); if ($params['enable_jump_url']) { @@ -1186,17 +1186,17 @@ public static function fetchUrlContentsForDirectMailRecord(array $row, array $pa $mailContent = GeneralUtility::getURL(self::addUserPass($plainTextUrl, $params), 0, array('User-Agent: Direct Mail')); $htmlmail->addPlain($mailContent); if (!$mailContent || !$htmlmail->theParts['plain']['content']) { - $errorMsg[] = $GLOBALS["LANG"]->getLL('dmail_no_plain_content'); + $errorMsg[] = $GLOBALS['LANG']->getLL('dmail_no_plain_content'); } elseif (!strstr($htmlmail->theParts['plain']['content'], '', $bContent, 2); - // Remove useless HTML comments + // Remove useless HTML comments if (substr($this->dmailer['boundaryParts_html'][$bKey][0], 1) == 'END') { $this->dmailer['boundaryParts_html'][$bKey][1] = $this->removeHTMLComments($this->dmailer['boundaryParts_html'][$bKey][1]); } - // Now, analyzing which media files are used in this part of the mail: + // Now, analyzing which media files are used in this part of the mail: $mediaParts = explode('cid:part', $this->dmailer['boundaryParts_html'][$bKey][1]); reset($mediaParts); next($mediaParts); @@ -233,14 +233,14 @@ public function replaceMailMarkers($content, array $recipRow, array $markers) $markers['###USER_' . $substField . '###'] = $subst; } - // uppercase fields with uppercased values + // uppercase fields with uppercased values $uppercaseFieldsArray = array('name', 'firstname'); foreach ($uppercaseFieldsArray as $substField) { $subst = $this->getLanguageService()->csConvObj->conv($recipRow[$substField], $this->getLanguageService()->charSet, $this->charset); $markers['###USER_' . strtoupper($substField) . '###'] = strtoupper($subst); } - // Hook allows to manipulate the markers to add salutation etc. + // Hook allows to manipulate the markers to add salutation etc. if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/direct_mail']['res/scripts/class.dmailer.php']['mailMarkersHook'])) { $mailMarkersHook =& $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/direct_mail']['res/scripts/class.dmailer.php']['mailMarkersHook']; if (is_array($mailMarkersHook)) { @@ -311,7 +311,7 @@ public function dmailer_sendAdvanced(array $recipRow, $tableNameChar) } } - // Plain + // Plain $this->theParts['plain']['content'] = ''; if ($this->flag_plain) { $tempContent_Plain = $this->dmailer_getBoundaryParts($this->dmailer['boundaryParts_plain'], $recipRow['sys_dmail_categories_list']); @@ -373,7 +373,7 @@ public function dmailer_sendSimple($addressList) $this->theParts['plain']['content'] = ''; } - $recipients = explode(",", $addressList); + $recipients = explode(',', $addressList); foreach ($recipients as $recipient) { $this->sendTheMail($recipient); } @@ -409,7 +409,7 @@ public function dmailer_getBoundaryParts($cArray, $userCategories) } elseif ($key == 'END') { $returnVal .= $cP[1]; $this->mediaList .= $cP['mediaList']; - // There is content and it is not just the header and footer content, or it is the only content because we have no direct mail boundaries. + // There is content and it is not just the header and footer content, or it is the only content because we have no direct mail boundaries. if (($cP[1] && !($bKey == 0 || $bKey == $boundaryMax)) || count($cArray) == 1) { $this->mailHasContent = true; } @@ -480,7 +480,7 @@ public function dmailer_masssend_list(array $query_info, $mid) foreach ($query_info['id_lists'] as $table => $listArr) { if (is_array($listArr)) { $ct = 0; - // Find tKey + // Find tKey if ($table=='tt_address' || $table=='fe_users') { $tKey = substr($table, 0, 1); } elseif ($table=='PLAINLIST') { @@ -489,7 +489,7 @@ public function dmailer_masssend_list(array $query_info, $mid) $tKey='u'; } - // Send mails + // Send mails $sendIds = $this->dmailer_getSentMails($mid, $tKey); if ($table == 'PLAINLIST') { $sendIdsArr = explode(',', $sendIds); @@ -528,7 +528,7 @@ public function dmailer_masssend_list(array $query_info, $mid) $returnVal = false; break; } - // We are NOT finished! + // We are NOT finished! $this->shipOfMail($mid, $recipRow, $tKey); $ct++; $c++; @@ -611,7 +611,7 @@ public static function convertFields(array $recipRow) $recipRow['phone'] = $recipRow['telephone']; } - // Firstname must be more that 1 character + // Firstname must be more that 1 character $recipRow['firstname'] = trim(strtok(trim($recipRow['name']), ' ')); if (strlen($recipRow['firstname']) < 2 || preg_match('|[^[:alnum:]]$|', $recipRow['firstname'])) { $recipRow['firstname'] = $recipRow['name']; @@ -644,11 +644,11 @@ public function dmailer_setBeginEnd($mid, $key) switch ($key) { case 'begin': $subject = $this->getLanguageService()->getLL('dmailer_mid') . ' ' . $mid . ' ' . $this->getLanguageService()->getLL('dmailer_job_begin'); - $message = $this->getLanguageService()->getLL('dmailer_job_begin') . ': ' . date("d-m-y h:i:s"); + $message = $this->getLanguageService()->getLL('dmailer_job_begin') . ': ' . date('d-m-y h:i:s'); break; case 'end': $subject = $this->getLanguageService()->getLL('dmailer_mid') . ' ' . $mid . ' ' . $this->getLanguageService()->getLL('dmailer_job_end'); - $message = $this->getLanguageService()->getLL('dmailer_job_end') . ': ' . date("d-m-y h:i:s"); + $message = $this->getLanguageService()->getLL('dmailer_job_end') . ': ' . date('d-m-y h:i:s'); break; default: // do nothing @@ -877,7 +877,7 @@ public function start($user_dmailer_sendPerCycle = 50, $user_dmailer_lang = 'en' $this->linebreak = CRLF; } - // Mailer engine parameters + // Mailer engine parameters $this->sendPerCycle = $user_dmailer_sendPerCycle; $this->user_dmailerLang = $user_dmailer_lang; if (!$this->nonCron) { @@ -948,9 +948,9 @@ public function setContent(&$mailer) // set the attachment from $this->dmailer['sys_dmail_rec']['attachment'] // comma separated files if (!empty($this->dmailer['sys_dmail_rec']['attachment'])) { - $files = explode(",", $this->dmailer['sys_dmail_rec']['attachment']); + $files = explode(',', $this->dmailer['sys_dmail_rec']['attachment']); foreach ($files as $file) { - $mailer->attach(\Swift_Attachment::fromPath(PATH_site . "uploads/tx_directmail/" . $file)); + $mailer->attach(\Swift_Attachment::fromPath(PATH_site . 'uploads/tx_directmail/' . $file)); } } } @@ -987,7 +987,7 @@ public function sendTheMail($recipient, $recipRow = null) $header->addTextHeader('Organization', $this->organisation); } - // Hook to edit or add the mail headers + // Hook to edit or add the mail headers if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/direct_mail']['res/scripts/class.dmailer.php']['mailHeadersHook'])) { $mailHeadersHook =& $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/direct_mail']['res/scripts/class.dmailer.php']['mailHeadersHook']; if (is_array($mailHeadersHook)) { @@ -1054,11 +1054,11 @@ public function addHTML($file) return false; } if ($this->extractFramesInfo()) { - return "Document was a frameset. Stopped"; + return 'Document was a frameset. Stopped'; } $this->extractHyperLinks(); $this->substHREFsInHTML(); - $this->setHTML($this->encodeMsg($this->theParts["html"]["content"])); + $this->setHTML($this->encodeMsg($this->theParts['html']['content'])); return true; } @@ -1160,7 +1160,8 @@ public function substHREFsInHTML() $this->theParts['html']['content'] = str_replace( $val['subst_str'], $val['quotes'] . $substVal . $val['quotes'], - $this->theParts['html']['content']); + $this->theParts['html']['content'] + ); } } @@ -1212,7 +1213,7 @@ public function substHTTPurlsInPlainText($content) return $content; } - $textpieces = explode("http://", $content); + $textpieces = explode('http://', $content); $pieces = count($textpieces); $textstr = $textpieces[0]; for ($i = 1; $i < $pieces; $i++) { @@ -1224,7 +1225,7 @@ public function substHTTPurlsInPlainText($content) } $parts = array(); - $parts[0] = "http://" . substr($textpieces[$i], 0, $len); + $parts[0] = 'http://' . substr($textpieces[$i], 0, $len); $parts[1] = substr($textpieces[$i], $len); if (strpos($parts[0], '&no_jumpurl=1') !== false) { @@ -1326,8 +1327,8 @@ public function extractMediaLinks() $imageData['quotes'] = (substr($codepieces[$i], strpos($codepieces[$i], $imageData['ref']) - 1, 1) == '"') ? '"' : ''; // subst_str is the string to look for, when substituting lateron $imageData['subst_str'] = $imageData['quotes'] . $imageData['ref'] . $imageData['quotes']; - if ($imageData['ref'] && !strstr($imageList, "|" . $imageData["subst_str"] . "|")) { - $imageList .= "|" . $imageData['subst_str'] . "|"; + if ($imageData['ref'] && !strstr($imageList, '|' . $imageData['subst_str'] . '|')) { + $imageList .= '|' . $imageData['subst_str'] . '|'; $imageData['absRef'] = $this->absRef($imageData['ref']); $imageData['tag'] = $tag; $imageData['use_jumpurl'] = $attributes['dmailerping'] ? 1 : 0; @@ -1354,9 +1355,9 @@ public function extractMediaLinks() $imageData['quotes'] = (substr($codepieces[$i], strpos($codepieces[$i], $imageData['ref']) - 1, 1) == '"') ? '"' : ''; // subst_str is the string to look for, when substituting lateron $imageData['subst_str'] = $imageData['quotes'] . $imageData['ref'] . $imageData['quotes']; - if ($imageData['ref'] && !strstr($imageList, "|" . $imageData["subst_str"] . "|")) { - $imageList .= "|" . $imageData["subst_str"] . "|"; - $imageData['absRef'] = $this->absRef($imageData["ref"]); + if ($imageData['ref'] && !strstr($imageList, '|' . $imageData['subst_str'] . '|')) { + $imageList .= '|' . $imageData['subst_str'] . '|'; + $imageData['absRef'] = $this->absRef($imageData['ref']); $this->theParts['html']['media'][] = $imageData; } } @@ -1382,8 +1383,8 @@ public function extractMediaLinks() case 'jpeg': // do like jpg case 'jpg': - if ($imageData['ref'] && !strstr($imageList, "|" . $imageData["subst_str"] . "|")) { - $imageList .= "|" . $imageData['subst_str'] . "|"; + if ($imageData['ref'] && !strstr($imageList, '|' . $imageData['subst_str'] . '|')) { + $imageList .= '|' . $imageData['subst_str'] . '|'; $imageData['absRef'] = $this->absRef($imageData['ref']); $this->theParts['html']['media'][] = $imageData; } @@ -1411,7 +1412,7 @@ public function extractHyperLinks() $len = strlen($codepieces[0]); $pieces = count($codepieces); for ($i = 1; $i < $pieces; $i++) { - $tag = strtolower(strtok(substr($htmlContent, $len + 1, 10), " ")); + $tag = strtolower(strtok(substr($htmlContent, $len + 1, 10), ' ')); $len += strlen($tag) + strlen($codepieces[$i]) + 2; $dummy = preg_match('/[^>]*/', $codepieces[$i], $reg); @@ -1426,8 +1427,8 @@ public function extractHyperLinks() $hrefData['quotes'] = $quotes; // subst_str is the string to look for when substituting later on $hrefData['subst_str'] = $quotes . $hrefData['ref'] . $quotes; - if ($hrefData['ref'] && substr(trim($hrefData['ref']), 0, 1) != "#" && !strstr($linkList, "|" . $hrefData['subst_str'] . "|")) { - $linkList .= "|" . $hrefData['subst_str'] . "|"; + if ($hrefData['ref'] && substr(trim($hrefData['ref']), 0, 1) != '#' && !strstr($linkList, '|' . $hrefData['subst_str'] . '|')) { + $linkList .= '|' . $hrefData['subst_str'] . '|'; $hrefData['absRef'] = $this->absRef($hrefData['ref']); $hrefData['tag'] = $tag; $hrefData['no_jumpurl'] = intval(trim($attributes['no_jumpurl'], '"')) ? 1 : 0; @@ -1445,8 +1446,8 @@ public function extractHyperLinks() $hrefData['quotes'] = "'"; // subst_str is the string to look for, when substituting lateron $hrefData['subst_str'] = $hrefData['quotes'] . $hrefData['ref'] . $hrefData['quotes']; - if ($hrefData['ref'] && !strstr($linkList, "|" . $hrefData['subst_str'] . "|")) { - $linkList .= "|" . $hrefData['subst_str'] . "|"; + if ($hrefData['ref'] && !strstr($linkList, '|' . $hrefData['subst_str'] . '|')) { + $linkList .= '|' . $hrefData['subst_str'] . '|'; $hrefData['absRef'] = $this->absRef($hrefData['ref']); $this->theParts['html']['hrefs'][] = $hrefData; } @@ -1584,7 +1585,7 @@ public function absRef($ref) } else { // If the reference is relative, the path is added, // in order for us to fetch the content - if (substr($this->theParts['html']['path'], -1) == "/") { + if (substr($this->theParts['html']['path'], -1) == '/') { // if the last char is a /, then prepend the ref $ref = $this->theParts['html']['path'] . $ref; } else { diff --git a/Classes/Hooks/JumpurlController.php b/Classes/Hooks/JumpurlController.php index 4d7c7bd9b..60e68da76 100644 --- a/Classes/Hooks/JumpurlController.php +++ b/Classes/Hooks/JumpurlController.php @@ -143,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'); diff --git a/Classes/Hooks/TtnewsPlaintextHook.php b/Classes/Hooks/TtnewsPlaintextHook.php index 55efcb517..d79c300e8 100644 --- a/Classes/Hooks/TtnewsPlaintextHook.php +++ b/Classes/Hooks/TtnewsPlaintextHook.php @@ -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); @@ -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.']); @@ -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); @@ -223,6 +223,6 @@ public function renderAuthor($row, $type=0) return implode(LF, $lines); } } - return ""; + return ''; } } diff --git a/Classes/Importer.php b/Classes/Importer.php index 49f0d41af..f5bb67a5d 100644 --- a/Classes/Importer.php +++ b/Classes/Importer.php @@ -103,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(); @@ -157,7 +157,7 @@ public function cmd_displayImport() } } - $out = ""; + $out = ''; switch ($stepCurrent) { case 'conf': // get list of sysfolder @@ -647,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(); @@ -806,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(); @@ -831,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; @@ -870,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']; @@ -937,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)) : " "; + $v = strlen($v) ? ($cellcmd[$k]?$v:htmlspecialchars($v)) : ' '; if ($first) { $v = '' . $v . ''; } @@ -980,7 +980,7 @@ public function userTempFolder() */ public function writeTempFile() { - $newfile = ""; + $newfile = ''; $userPermissions = $GLOBALS['BE_USER']->getFilePermissions(); unset($this->fileProcessor); diff --git a/Classes/MailSelect.php b/Classes/MailSelect.php index b41aa50bf..51fe4e220 100644 --- a/Classes/MailSelect.php +++ b/Classes/MailSelect.php @@ -27,7 +27,6 @@ */ class MailSelect extends QueryGenerator { - public $allowedTables = array('tt_address','fe_users'); /** @@ -43,11 +42,11 @@ public function mkTableSelect($name, $cur) { $out = ''.implode(chr(10),$opt).''; + $groupInput = ''; } - // Set up form: - $msg = ""; + // Set up form: + $msg = ''; $msg .= ''; $msg .= ''; $msg .= ''; @@ -985,17 +991,17 @@ public function cmd_send_mail($row) $htmlmail->start(); $htmlmail->dmailer_prepare($row); - // send out non-personalized emails + // send out non-personalized emails $simpleMailMode = GeneralUtility::_GP('mailingMode_simple'); $sentFlag = false; if ($simpleMailMode) { // step 4, sending simple test emails - // setting Testmail flag + // setting Testmail flag $htmlmail->testmail = $this->params['testmail']; - // Fixing addresses: + // Fixing addresses: $addresses = GeneralUtility::_GP('SET'); $addressList = $addresses['dmail_test_email'] ? $addresses['dmail_test_email'] : $this->MOD_SETTINGS['dmail_test_email']; $addresses = preg_split('|[' . LF . ',;]|', $addressList); @@ -1079,7 +1085,7 @@ public function cmd_send_mail($row) } else { // step 5, sending personalized emails to the mailqueue - // prepare the email for sending with the mailqueue + // prepare the email for sending with the mailqueue $recipientGroups = GeneralUtility::_GP('mailgroup_uid'); if (GeneralUtility::_GP('mailingMode_mailGroup') && $this->sys_dmail_uid && is_array($recipientGroups)) { // Update the record: @@ -1101,7 +1107,7 @@ public function cmd_send_mail($row) $updateFields['subject'] = $this->params['testmail'] . ' ' . $row['subject']; } - // create a draft version of the record + // create a draft version of the record if (GeneralUtility::_GP('savedraft')) { if ($row['type'] == 0) { $updateFields['type'] = 2; @@ -1133,7 +1139,7 @@ public function cmd_send_mail($row) } } - // Setting flags and update the record: + // Setting flags and update the record: if ($sentFlag && $this->CMD == 'send_mail_final') { $GLOBALS['TYPO3_DB']->exec_UPDATEquery( 'sys_dmail', @@ -1185,7 +1191,7 @@ protected function sendTestMailToTable(array $idLists, $table, Dmailer $htmlmail */ public function cmd_testmail() { - $theOutput = ""; + $theOutput = ''; if ($this->params['test_tt_address_uids']) { $intList = implode(',', GeneralUtility::intExplode(',', $this->params['test_tt_address_uids'])); @@ -1226,7 +1232,7 @@ public function cmd_testmail() $msg .='' . $this->iconFactory->getIconForRecord('sys_dmail_group', $row, Icon::SIZE_SMALL) . htmlspecialchars($row['title']) . '
'; - // Members: + // Members: $result = $this->cmd_compileMailGroup(array($row['uid'])); $msg.=' @@ -1302,13 +1308,13 @@ public function getRecordList(array $listArr, $table, $editLinkFlag=1, $testMail foreach ($listArr as $row) { $tableIcon = ''; $editLink = ''; - $testLink = ""; + $testLink = ''; if ($row['uid']) { $tableIcon = ''; if ($editLinkFlag) { $requestUri = GeneralUtility::getIndpEnv('REQUEST_URI') . '&CMD=send_test&sys_dmail_uid=' . $this->sys_dmail_uid . '&pages_uid=' . $this->pages_uid; - $editLink = ''; } @@ -1389,7 +1395,7 @@ protected function cmd_compileMailGroup(array $groups) */ if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['direct_mail']['mod2']['cmd_compileMailGroup'])) { $hookObjectsArr = array(); - $temporaryList = ""; + $temporaryList = ''; foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['direct_mail']['mod2']['cmd_compileMailGroup'] as $classRef) { $hookObjectsArr[] = &GeneralUtility::getUserObj($classRef); @@ -1572,8 +1578,8 @@ public function update_specialQuery(array $mailGroup) 'query' => $this->MOD_SETTINGS['queryConfig'] ); $updateResult = $GLOBALS['TYPO3_DB']->exec_UPDATEquery( - "sys_dmail_group", - "uid = " . intval($mailGroup['uid']), + 'sys_dmail_group', + 'uid = ' . intval($mailGroup['uid']), $updateFields ); $GLOBALS['TYPO3_DB']->sql_free_result($updateResult); @@ -1649,7 +1655,7 @@ public function makeCategoriesForm(array $row) if ($colPosVal != $row['colPos']) { $out .= ''; - $colPosVal = $row["colPos"]; + $colPosVal = $row['colPos']; } $out .= ''; $out .= ''; - while (($row = $GLOBALS["TYPO3_DB"]->sql_fetch_assoc($res))) { - $countres = $GLOBALS["TYPO3_DB"]->exec_SELECTquery( + while (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))) { + $countres = $GLOBALS['TYPO3_DB']->exec_SELECTquery( 'count(*)', 'sys_dmail_maillog', 'mid=' . intval($row['uid']) . ' AND response_type=0' . ' AND html_sent>0' ); - list($count) = $GLOBALS["TYPO3_DB"]->sql_fetch_row($countres); + list($count) = $GLOBALS['TYPO3_DB']->sql_fetch_row($countres); $out .=' @@ -450,7 +456,7 @@ public function cmd_mailerengine() } $out = $invokeMessage . '
' . $this->iconFactory->getIconForRecord($table, $row, Icon::SIZE_SMALL) . '' . + $editLink = '' . $this->iconFactory->getIcon('actions-open', Icon::SIZE_SMALL) . '
' . $this->getLanguageService()->getLL('nl_l_column') . ': ' . BackendUtility::getProcessedValue('tt_content', 'colPos', $row['colPos']) . '
' . $this->iconFactory->getIconForRecord('tt_content', $row, Icon::SIZE_SMALL) . @@ -1667,7 +1673,7 @@ public function makeCategoriesForm(array $row) $this->categories = DirectMailUtility::makeCategories('tt_content', $row, $this->sys_language_uid); reset($this->categories); foreach ($this->categories as $pKey => $pVal) { - $checkBox .= '' . + $checkBox .= '' . ' ' . htmlspecialchars($pVal) . '
'; } @@ -1723,7 +1729,7 @@ public function makeFormExternal($boxId, $totalBox, $open=false) $output .= '' . $imgSrc . $this->getLanguageService()->getLL('dmail_wiz1_external_page') . ''; $output .= '
'; - // Create + // Create $out = $this->getLanguageService()->getLL('dmail_HTML_url') . '
formWidth(40) . ' />
' . $this->getLanguageService()->getLL('dmail_plaintext_url') . '
@@ -1731,7 +1737,7 @@ public function makeFormExternal($boxId, $totalBox, $open=false) $this->getLanguageService()->getLL('dmail_subject') . '
' . 'formWidth(40) . ' />
' . (($this->error == 'no_valid_url')?('
' . $this->getLanguageService()->getLL('dmail_no_valid_url') . '

'):'') . - ' + ' '; $output.= '

' . $this->getLanguageService()->getLL('dmail_dovsk_crFromUrl') . BackendUtility::cshItem($this->cshTable, 'create_directmail_from_url', $GLOBALS['BACK_PATH']) . '

'; $output.= $out; @@ -1830,7 +1836,7 @@ public function cmd_quickmail() $senderName = ($indata['senderName']?$indata['senderName']:$GLOBALS['BE_USER']->user['realName']); $senderMail = ($indata['senderEmail']?$indata['senderEmail']:$GLOBALS['BE_USER']->user['email']); - // Set up form: + // Set up form: $theOutput.= ''; $theOutput.= $this->getLanguageService()->getLL('quickmail_sender_name') . '
doc->formWidth() . ' />
'; $theOutput.= $this->getLanguageService()->getLL('quickmail_sender_email') . '
doc->formWidth() . ' />
'; @@ -1884,13 +1890,23 @@ public function cmd_news() $plainIcon = $this->iconFactory->getIcon('direct_mail_preview_plain', Icon::SIZE_SMALL, $langIconOverlay); $createIcon = $this->iconFactory->getIcon('direct_mail_newmail', Icon::SIZE_SMALL, $langIconOverlay); - $previewHTMLLink .= '' . $htmlIcon . ''; - $previewTextLink .= '' . $plainIcon . ''; - $createLink .= '' . $createIcon . ''; + $previewHTMLLink .= '' . $htmlIcon . ''; + $previewTextLink .= '' . $plainIcon . ''; + $createLink .= '' . $createIcon . ''; } switch ($this->params['sendOptions']) { @@ -1909,7 +1925,7 @@ public function cmd_news() $outLines[] = [ (count($languages) > 1 ? $pageIcon : '' . $pageIcon . ''), $createLink, - '' . $this->iconFactory->getIcon('actions-open', Icon::SIZE_SMALL) . '', + '' . $this->iconFactory->getIcon('actions-open', Icon::SIZE_SMALL) . '', $previewLink ]; } @@ -1927,10 +1943,11 @@ public function cmd_news() * @param $pageUid * @return array */ - protected function getAvailablePageLanguages($pageUid) { + protected function getAvailablePageLanguages($pageUid) + { static $languages; $languageUids = []; - if ($languages === NULL) { + if ($languages === null) { $languages = GeneralUtility::makeInstance(TranslationConfigurationProvider::class)->getSystemLanguages(); } // loop trough all sys languages and check if there is matching page translation @@ -1989,7 +2006,7 @@ protected function renderRecordDetailsTable(array $row) $editParams = BackendUtility::editOnClick('&edit[sys_dmail][' . $row['uid'] . ']=edit', $GLOBALS['BACK_PATH'], $requestUri); - $content = '' . + $content = '' . $this->iconFactory->getIcon('actions-open', Icon::SIZE_SMALL) . '' . $this->getLanguageService()->getLL('dmail_edit') . ''; } else { diff --git a/Classes/Module/MailerEngine.php b/Classes/Module/MailerEngine.php index cfb1af6d4..e70a2bf4f 100644 --- a/Classes/Module/MailerEngine.php +++ b/Classes/Module/MailerEngine.php @@ -106,30 +106,30 @@ public function init() } $this->params = $temp['properties']; $this->implodedParams = DirectMailUtility::implodeTSParams($this->params); - if ($this->params['userTable'] && is_array($GLOBALS["TCA"][$this->params['userTable']])) { + if ($this->params['userTable'] && is_array($GLOBALS['TCA'][$this->params['userTable']])) { $this->userTable = $this->params['userTable']; $this->allowedTables[] = $this->userTable; } $this->MOD_MENU['dmail_mode'] = BackendUtility::unsetMenuItems($this->params, $this->MOD_MENU['dmail_mode'], 'menu.dmail_mode'); - // initialize backend user language + // initialize backend user language if ($this->getLanguageService()->lang && ExtensionManagementUtility::isLoaded('static_info_tables')) { - $res = $GLOBALS["TYPO3_DB"]->exec_SELECTquery( + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( 'sys_language.uid', 'sys_language LEFT JOIN static_languages ON sys_language.static_lang_isocode=static_languages.uid', - 'static_languages.lg_typo3=' . $GLOBALS["TYPO3_DB"]->fullQuoteStr($this->getLanguageService()->lang, 'static_languages') . + 'static_languages.lg_typo3=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->getLanguageService()->lang, 'static_languages') . BackendUtility::BEenableFields('sys_language') . BackendUtility::deleteClause('sys_language') . BackendUtility::deleteClause('static_languages') ); - while (($row = $GLOBALS["TYPO3_DB"]->sql_fetch_assoc($res))) { + while (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))) { $this->sys_language_uid = $row['uid']; } - $GLOBALS["TYPO3_DB"]->sql_free_result($res); + $GLOBALS['TYPO3_DB']->sql_free_result($res); } - // load contextual help + // load contextual help $this->cshTable = '_MOD_' . $this->MCONF['name']; - if ($GLOBALS["BE_USER"]->uc['edit_showFieldHelp']) { + if ($GLOBALS['BE_USER']->uc['edit_showFieldHelp']) { $this->getLanguageService()->loadSingleTableDescription($this->cshTable); } } @@ -169,10 +169,10 @@ public function main() $this->pageinfo = BackendUtility::readPageAccess($this->id, $this->perms_clause); $access = is_array($this->pageinfo) ? 1 : 0; - if (($this->id && $access) || ($GLOBALS["BE_USER"]->user['admin'] && !$this->id)) { + if (($this->id && $access) || ($GLOBALS['BE_USER']->user['admin'] && !$this->id)) { // Draw the header. $this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate'); - $this->doc->backPath = $GLOBALS["BACK_PATH"]; + $this->doc->backPath = $GLOBALS['BACK_PATH']; $this->doc->setModuleTemplate('EXT:direct_mail/Resources/Private/Templates/Module.html'); $this->doc->form='
'; @@ -204,10 +204,10 @@ function jumpToUrlD(URL) { // $docHeaderButtons = array( 'PAGEPATH' => $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.php:labels.path') . ': ' . GeneralUtility::fixed_lgd_cs($this->pageinfo['_thePath'], 50), 'SHORTCUT' => '', - 'CSH' => BackendUtility::cshItem($this->cshTable, '', $GLOBALS["BACK_PATH"]) + 'CSH' => BackendUtility::cshItem($this->cshTable, '', $GLOBALS['BACK_PATH']) ); - // shortcut icon - if ($GLOBALS["BE_USER"]->mayMakeShortcut()) { + // shortcut icon + if ($GLOBALS['BE_USER']->mayMakeShortcut()) { $docHeaderButtons['SHORTCUT'] = $this->doc->makeShortcutIcon('id', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']); } @@ -216,19 +216,20 @@ function jumpToUrlD(URL) { // $pidrec=BackendUtility::getRecord('pages', intval($this->pageinfo['pid'])); $module=$pidrec['module']; } - // Render content: + // Render content: if ($module == 'dmail') { if (GeneralUtility::_GP('cmd') == 'delete') { $this->deleteDMail(GeneralUtility::_GP('uid')); } - // Direct mail module + // Direct mail module if ($this->pageinfo['doktype'] == 254 && $this->pageinfo['module'] == 'dmail') { $markers['CONTENT'] = '

' . $this->getLanguageService()->getLL('header_mailer') . '

' . $this->cmd_cronMonitor() . $this->cmd_mailerengine(); } elseif ($this->id != 0) { /* @var $flashMessage FlashMessage */ - $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', + $flashMessage = GeneralUtility::makeInstance( + 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $this->getLanguageService()->getLL('dmail_noRegular'), $this->getLanguageService()->getLL('dmail_newsletters'), FlashMessage::WARNING @@ -237,7 +238,8 @@ function jumpToUrlD(URL) { // $markers['FLASHMESSAGES'] = $this->defaultFlashMessageQueue->renderFlashMessages(); } } else { - $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', + $flashMessage = GeneralUtility::makeInstance( + 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $this->getLanguageService()->getLL('select_folder'), $this->getLanguageService()->getLL('header_mailer'), FlashMessage::WARNING @@ -252,7 +254,7 @@ function jumpToUrlD(URL) { // // If no access or if ID == zero $this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate'); - $this->doc->backPath = $GLOBALS["BACK_PATH"]; + $this->doc->backPath = $GLOBALS['BACK_PATH']; $this->content .= $this->doc->startPage($this->getLanguageService()->getLL('title')); $this->content .= $this->doc->header($this->getLanguageService()->getLL('title')); @@ -280,13 +282,13 @@ public function printContent() public function deleteDMail($uid) { $table = 'sys_dmail'; - if ($GLOBALS["TCA"][$table]['ctrl']['delete']) { - $res = $GLOBALS["TYPO3_DB"]->exec_UPDATEquery( + if ($GLOBALS['TCA'][$table]['ctrl']['delete']) { + $res = $GLOBALS['TYPO3_DB']->exec_UPDATEquery( $table, 'uid = ' . $uid, - array($GLOBALS["TCA"][$table]['ctrl']['delete'] => 1) + array($GLOBALS['TCA'][$table]['ctrl']['delete'] => 1) ); - $GLOBALS["TYPO3_DB"]->sql_free_result($res); + $GLOBALS['TYPO3_DB']->sql_free_result($res); } } @@ -300,11 +302,11 @@ public function cmd_cronMonitor() $content = ''; $mailerStatus = 0; $lastExecutionTime = 0; - $logContent = ""; + $logContent = ''; - // seconds - $cronInterval = $GLOBALS["TYPO3_CONF_VARS"]['EXTCONF']['direct_mail']['cronInt'] * 60; + // seconds + $cronInterval = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['direct_mail']['cronInt'] * 60; $lastCronjobShouldBeNewThan = (time() - $cronInterval); $filename = PATH_site . 'typo3temp/tx_directmail_dmailer_log.txt'; @@ -320,11 +322,11 @@ public function cmd_cronMonitor() * -1 = cron stopped */ - // cron running or error (die function in dmailer_log) + // cron running or error (die function in dmailer_log) if (file_exists(PATH_site . 'typo3temp/tx_directmail_cron.lock')) { $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_dmail_maillog', 'response_type = 0', 'tstamp DESC'); $lastSend = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res); - $GLOBALS["TYPO3_DB"]->sql_free_result($res); + $GLOBALS['TYPO3_DB']->sql_free_result($res); if (($lastSend['tstamp'] < time()) && ($lastSend['tstamp'] > $lastCronjobShouldBeNewThan)) { // cron is sending @@ -351,21 +353,24 @@ public function cmd_cronMonitor() $lastRun = ' ' . $this->getLanguageService()->getLL('dmail_mailerengine_cron_lastrun') . ($lastExecutionTime ? BackendUtility::datetime($lastExecutionTime) : '-') . $currentDate; switch ($mailerStatus) { case -1: - $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', + $flashMessage = GeneralUtility::makeInstance( + 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $this->getLanguageService()->getLL('dmail_mailerengine_cron_warning') . ': ' . ($error ? $error : $this->getLanguageService()->getLL('dmail_mailerengine_cron_warning_msg')) . $lastRun, $this->getLanguageService()->getLL('dmail_mailerengine_cron_status'), FlashMessage::ERROR ); break; case 0: - $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', + $flashMessage = GeneralUtility::makeInstance( + 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $this->getLanguageService()->getLL('dmail_mailerengine_cron_caution') . ': ' . $this->getLanguageService()->getLL('dmail_mailerengine_cron_caution_msg') . $lastRun, $this->getLanguageService()->getLL('dmail_mailerengine_cron_status'), FlashMessage::WARNING ); break; case 1: - $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', + $flashMessage = GeneralUtility::makeInstance( + 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $this->getLanguageService()->getLL('dmail_mailerengine_cron_ok') . ': ' . $this->getLanguageService()->getLL('dmail_mailerengine_cron_ok_msg') . $lastRun, $this->getLanguageService()->getLL('dmail_mailerengine_cron_status'), FlashMessage::OK @@ -385,13 +390,14 @@ public function cmd_cronMonitor() */ public function cmd_mailerengine() { - $invokeMessage = ""; + $invokeMessage = ''; - // enable manual invocation of mailer engine; enabled by default + // enable manual invocation of mailer engine; enabled by default $enableTrigger = ! (isset($this->params['menu.']['dmail_mode.']['mailengine.']['disable_trigger']) && $this->params['menu.']['dmail_mode.']['mailengine.']['disable_trigger']); if ($enableTrigger && GeneralUtility::_GP('invokeMailerEngine')) { /* @var $flashMessage FlashMessage */ - $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', + $flashMessage = GeneralUtility::makeInstance( + 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', '' . $this->getLanguageService()->getLL('dmail_mailerengine_log') . '
' . nl2br($this->invokeMEngine()), $this->getLanguageService()->getLL('dmail_mailerengine_invoked'), FlashMessage::INFO @@ -404,12 +410,12 @@ public function cmd_mailerengine() if ($enableTrigger) { $out = '

' . $this->getLanguageService()->getLL('dmail_mailerengine_manual_explain') . '

' . $this->getLanguageService()->getLL('dmail_mailerengine_invoke_now') . '

'; $invokeMessage .= '
'; - $invokeMessage .= $this->doc->section(BackendUtility::cshItem($this->cshTable, 'mailerengine_invoke', $GLOBALS["BACK_PATH"]) . $this->getLanguageService()->getLL('dmail_mailerengine_manual_invoke'), $out, 1, 1, 0, true); + $invokeMessage .= $this->doc->section(BackendUtility::cshItem($this->cshTable, 'mailerengine_invoke', $GLOBALS['BACK_PATH']) . $this->getLanguageService()->getLL('dmail_mailerengine_manual_invoke'), $out, 1, 1, 0, true); $invokeMessage .= '
'; } // Display mailer engine status - $res = $GLOBALS["TYPO3_DB"]->exec_SELECTquery( + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( 'uid,pid,subject,scheduled,scheduled_begin,scheduled_end', 'sys_dmail', 'pid=' . intval($this->id) . @@ -429,15 +435,15 @@ public function cmd_mailerengine()
 ' . $this->getLanguageService()->getLL('dmail_mailerengine_delete') . ' 
' . $this->iconFactory->getIconForRecord('sys_dmail', $row, Icon::SIZE_SMALL)->render() . ' ' . $this->linkDMail_record(htmlspecialchars(GeneralUtility::fixed_lgd_cs($row['subject'], 100)) . '  ', $row['uid']) . '
' . $out . '
'; - return $this->doc->section(BackendUtility::cshItem($this->cshTable, 'mailerengine_status', $GLOBALS["BACK_PATH"]) . $this->getLanguageService()->getLL('dmail_mailerengine_status'), $out, 1, 1, 0, true); + return $this->doc->section(BackendUtility::cshItem($this->cshTable, 'mailerengine_status', $GLOBALS['BACK_PATH']) . $this->getLanguageService()->getLL('dmail_mailerengine_status'), $out, 1, 1, 0, true); } /** @@ -467,7 +473,7 @@ public function deleteLink($uid) if (!$dmail['scheduled_begin']) { return '' . $icon . ''; } - return ""; + return ''; } /** diff --git a/Classes/Module/NavFrame.php b/Classes/Module/NavFrame.php index 1edec65ea..00fcc2881 100644 --- a/Classes/Module/NavFrame.php +++ b/Classes/Module/NavFrame.php @@ -135,7 +135,8 @@ function hilight_row(frameSetModule,highLightID) { // top.fsMod.navFrameHighlightedID[frameSetModule] = highLightID; theObj = document.getElementById(highLightID); } - '); + ' + ); } /** diff --git a/Classes/Module/RecipientList.php b/Classes/Module/RecipientList.php index d7e0da273..24a22e649 100644 --- a/Classes/Module/RecipientList.php +++ b/Classes/Module/RecipientList.php @@ -126,10 +126,10 @@ public function init() } $this->MOD_MENU['dmail_mode'] = BackendUtility::unsetMenuItems($this->params, $this->MOD_MENU['dmail_mode'], 'menu.dmail_mode'); - // initialize the query generator + // initialize the query generator $this->queryGenerator = GeneralUtility::makeInstance('DirectMailTeam\\DirectMail\\MailSelect'); - // initialize backend user language + // initialize backend user language if ($this->getLanguageService()->lang && ExtensionManagementUtility::isLoaded('static_info_tables')) { $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( 'sys_language.uid', @@ -143,7 +143,7 @@ public function init() $this->sys_language_uid = $row['uid']; } } - // load contextual help + // load contextual help $this->cshTable = '_MOD_' . $this->MCONF['name']; if ($GLOBALS['BE_USER']->uc['edit_showFieldHelp']) { $this->getLanguageService()->loadSingleTableDescription($this->cshTable); @@ -227,7 +227,7 @@ function jumpToUrlD(URL) { // 'SHORTCUT' => '', 'CSH' => BackendUtility::cshItem($this->cshTable, '', $GLOBALS['BACK_PATH']) ); - // shortcut icon + // shortcut icon if ($GLOBALS['BE_USER']->mayMakeShortcut()) { $docHeaderButtons['SHORTCUT'] = $this->doc->makeShortcutIcon('id', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']); } @@ -239,7 +239,7 @@ function jumpToUrlD(URL) { // $module = $pidrec['module']; } - // Render content: + // Render content: if ($module == 'dmail') { // Direct mail module if ($this->pageinfo['doktype']==254 && $this->pageinfo['module']=='dmail') { @@ -247,7 +247,8 @@ function jumpToUrlD(URL) { // $this->moduleContent(); } elseif ($this->id != 0) { /* @var $flashMessage FlashMessage */ - $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', + $flashMessage = GeneralUtility::makeInstance( + 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $this->getLanguageService()->getLL('dmail_noRegular'), $this->getLanguageService()->getLL('dmail_newsletters'), FlashMessage::WARNING @@ -257,7 +258,8 @@ function jumpToUrlD(URL) { // } } else { /* @var $flashMessage FlashMessage */ - $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', + $flashMessage = GeneralUtility::makeInstance( + 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $this->getLanguageService()->getLL('select_folder'), $this->getLanguageService()->getLL('header_recip'), FlashMessage::WARNING @@ -373,14 +375,14 @@ public function showExistingRecipientLists() $out =' ' . $out . '
'; $theOutput = $this->doc->section(BackendUtility::cshItem($this->cshTable, 'select_mailgroup', $GLOBALS['BACK_PATH']) . $this->getLanguageService()->getLL('recip_select_mailgroup'), $out, 1, 1, 0, true); - // New: + // New: $out = '' . $this->iconFactory->getIconForRecord('sys_dmail_group', array(), Icon::SIZE_SMALL) . $this->getLanguageService()->getLL('recip_create_mailgroup_msg') . ''; $theOutput .= '
'; $theOutput .= $this->doc->section(BackendUtility::cshItem($this->cshTable, 'create_mailgroup', $GLOBALS['BACK_PATH']) . $this->getLanguageService()->getLL('recip_create_mailgroup'), $out, 1, 0, false, true, false, true); - // Import + // Import $out = '' . $this->getLanguageService()->getLL('recip_import_mailgroup_msg') . ''; $theOutput.= '
'; $theOutput.= $this->doc->section($this->getLanguageService()->getLL('mailgroup_import'), $out, 1, 1, 0, true); @@ -398,12 +400,12 @@ public function showExistingRecipientLists() */ public function editLink($table, $uid) { - $str = ""; + $str = ''; // check if the user has the right to modify the table - if ($GLOBALS["BE_USER"]->check('tables_modify', $table)) { + if ($GLOBALS['BE_USER']->check('tables_modify', $table)) { $params = '&edit[' . $table . '][' . $uid . ']=edit'; - $str = '' . + $str = '' . $this->iconFactory->getIcon('actions-open', Icon::SIZE_SMALL) . ''; } @@ -611,7 +613,7 @@ public function cmd_displayMailGroup($result) $theOutput = $this->doc->section($this->getLanguageService()->getLL('mailgroup_recip_from') . ' ' . $out, $mainC, 1, 1, 0, true); $theOutput .= '
'; - // do the CSV export + // do the CSV export $csvValue = GeneralUtility::_GP('csv'); if ($csvValue) { if ($csvValue == 'PLAINLIST') { @@ -666,7 +668,7 @@ public function cmd_displayMailGroup($result) } if ($group['type'] == 3) { - if ($GLOBALS["BE_USER"]->check('tables_modify', 'sys_dmail_group')) { + if ($GLOBALS['BE_USER']->check('tables_modify', 'sys_dmail_group')) { $theOutput .= $this->cmd_specialQuery($group); } } @@ -739,7 +741,7 @@ public function update_specialQuery($mailGroup) */ public function cmd_specialQuery($mailGroup) { - $out = ""; + $out = ''; $this->queryGenerator->init('dmail_queryConfig', $this->MOD_SETTINGS['queryTable']); if ($this->MOD_SETTINGS['queryTable'] && $this->MOD_SETTINGS['queryConfig']) { @@ -883,13 +885,13 @@ public function cmd_displayUserInfo() while (($rowCat=$GLOBALS['TYPO3_DB']->sql_fetch_assoc($resCat))) { $categoriesArray[] = $rowCat['uid_foreign']; } - $categories = implode($categoriesArray, ","); + $categories = implode($categoriesArray, ','); $editParams = '&edit[' . $table . '][' . $row['uid'] . ']=edit'; $out = ''; $out .= $this->iconFactory->getIconForRecord($table, $row)->render() . htmlspecialchars($row['name']) . htmlspecialchars(' <' . $row['email'] . '>'); - $out .= '  ' . + $out .= '  ' . $this->iconFactory->getIcon('actions-open', Icon::SIZE_SMALL) . '' . $this->getLanguageService()->getLL('dmail_edit') . ''; $theOutput = $this->doc->section($this->getLanguageService()->getLL('subscriber_info'), $out); diff --git a/Classes/Module/Statistics.php b/Classes/Module/Statistics.php index cfc1c2a3a..11f1e9f59 100644 --- a/Classes/Module/Statistics.php +++ b/Classes/Module/Statistics.php @@ -124,27 +124,27 @@ public function init() $this->MOD_MENU['dmail_mode'] = BackendUtility::unsetMenuItems($this->params, $this->MOD_MENU['dmail_mode'], 'menu.dmail_mode'); - // initialize the page selector + // initialize the page selector $this->sys_page = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Page\\PageRepository'); $this->sys_page->init(true); - // initialize backend user language + // initialize backend user language if ($this->getLanguageService()->lang && ExtensionManagementUtility::isLoaded('static_info_tables')) { - $res = $GLOBALS["TYPO3_DB"]->exec_SELECTquery( + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( 'sys_language.uid', 'sys_language LEFT JOIN static_languages ON sys_language.static_lang_isocode=static_languages.uid', - 'static_languages.lg_typo3=' . $GLOBALS["TYPO3_DB"]->fullQuoteStr($this->getLanguageService()->lang, 'static_languages') . + 'static_languages.lg_typo3=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->getLanguageService()->lang, 'static_languages') . BackendUtility::BEenableFields('sys_language') . BackendUtility::deleteClause('sys_language') . BackendUtility::deleteClause('static_languages') ); - while (($row = $GLOBALS["TYPO3_DB"]->sql_fetch_assoc($res))) { + while (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))) { $this->sys_language_uid = $row['uid']; } } - // load contextual help + // load contextual help $this->cshTable = '_MOD_'.$this->MCONF['name']; - if ($GLOBALS["BE_USER"]->uc['edit_showFieldHelp']) { + if ($GLOBALS['BE_USER']->uc['edit_showFieldHelp']) { $this->getLanguageService()->loadSingleTableDescription($this->cshTable); } } @@ -194,11 +194,11 @@ public function main() $this->pageinfo = BackendUtility::readPageAccess($this->id, $this->perms_clause); $access = is_array($this->pageinfo) ? 1 : 0; - if (($this->id && $access) || ($GLOBALS["BE_USER"]->user['admin'] && !$this->id)) { + if (($this->id && $access) || ($GLOBALS['BE_USER']->user['admin'] && !$this->id)) { // Draw the header. $this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate'); - $this->doc->backPath = $GLOBALS["BACK_PATH"]; + $this->doc->backPath = $GLOBALS['BACK_PATH']; $this->doc->setModuleTemplate('EXT:direct_mail/Resources/Private/Templates/Module.html'); $this->doc->form=''; @@ -241,10 +241,10 @@ function jumpToUrlD(URL) { // $docHeaderButtons = array( 'PAGEPATH' => $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.php:labels.path') . ': ' . GeneralUtility::fixed_lgd_cs($this->pageinfo['_thePath'], 50), 'SHORTCUT' => '', - 'CSH' => BackendUtility::cshItem($this->cshTable, '', $GLOBALS["BACK_PATH"]) + 'CSH' => BackendUtility::cshItem($this->cshTable, '', $GLOBALS['BACK_PATH']) ); - // shortcut icon - if ($GLOBALS["BE_USER"]->mayMakeShortcut()) { + // shortcut icon + if ($GLOBALS['BE_USER']->mayMakeShortcut()) { $docHeaderButtons['SHORTCUT'] = $this->doc->makeShortcutIcon('id', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']); } @@ -256,12 +256,13 @@ function jumpToUrlD(URL) { // if ($module == 'dmail') { // Direct mail module - // Render content: + // Render content: if ($this->pageinfo['doktype']==254 && $this->pageinfo['module']=='dmail') { $markers['CONTENT'] = '

' . $this->getLanguageService()->getLL('stats_overview_header') . '

' . $this->moduleContent(); } elseif ($this->id != 0) { /* @var $flashMessage FlashMessage */ - $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', + $flashMessage = GeneralUtility::makeInstance( + 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $this->getLanguageService()->getLL('dmail_noRegular'), $this->getLanguageService()->getLL('dmail_newsletters'), FlashMessage::WARNING @@ -270,7 +271,8 @@ function jumpToUrlD(URL) { // $markers['FLASHMESSAGES'] = $this->defaultFlashMessageQueue->renderFlashMessages(); } } else { - $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', + $flashMessage = GeneralUtility::makeInstance( + 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $this->getLanguageService()->getLL('select_folder'), $this->getLanguageService()->getLL('header_stat'), FlashMessage::WARNING @@ -287,7 +289,7 @@ function jumpToUrlD(URL) { // // If no access or if ID == zero $this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate'); - $this->doc->backPath = $GLOBALS["BACK_PATH"]; + $this->doc->backPath = $GLOBALS['BACK_PATH']; $this->content .= $this->doc->startPage($this->getLanguageService()->getLL('title')); $this->content .= $this->doc->header($this->getLanguageService()->getLL('title')); @@ -302,14 +304,14 @@ function jumpToUrlD(URL) { // */ public function moduleContent() { - $theOutput = ""; + $theOutput = ''; if (!$this->sys_dmail_uid) { $theOutput = $this->cmd_displayPageInfo(); } else { // Here the single dmail record is shown. $this->sys_dmail_uid = intval($this->sys_dmail_uid); - $res = $GLOBALS["TYPO3_DB"]->exec_SELECTquery( + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( '*', 'sys_dmail', 'pid=' . intval($this->id) . @@ -319,11 +321,11 @@ public function moduleContent() $this->noView = 0; - if (($row = $GLOBALS["TYPO3_DB"]->sql_fetch_assoc($res))) { + if (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))) { // Set URL data for commands $this->setURLs($row); - // COMMAND: + // COMMAND: switch ($this->CMD) { case 'displayUserInfo': $theOutput = $this->cmd_displayUserInfo(); @@ -333,8 +335,8 @@ public function moduleContent() break; default: // Hook for handling of custom direct mail commands: - if (is_array($GLOBALS["TYPO3_CONF_VARS"]['EXT']['directmail']['handledirectmailcmd-' . $this->CMD])) { - foreach ($GLOBALS["TYPO3_CONF_VARS"]['EXT']['directmail']['handledirectmailcmd-' . $this->CMD] as $funcRef) { + if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXT']['directmail']['handledirectmailcmd-' . $this->CMD])) { + foreach ($GLOBALS['TYPO3_CONF_VARS']['EXT']['directmail']['handledirectmailcmd-' . $this->CMD] as $funcRef) { $params = array('pObj' => &$this); $theOutput = GeneralUtility::callUserFunction($funcRef, $params, $this); } @@ -356,7 +358,7 @@ public function cmd_displayUserInfo() $indata = GeneralUtility::_GP('indata'); $table = GeneralUtility::_GP('table'); - $mmTable = $GLOBALS["TCA"][$table]['columns']['module_sys_dmail_category']['config']['MM']; + $mmTable = $GLOBALS['TCA'][$table]['columns']['module_sys_dmail_category']['config']['MM']; if (GeneralUtility::_GP('submit')) { $indata = GeneralUtility::_GP('indata'); @@ -373,7 +375,7 @@ public function cmd_displayUserInfo() $data=array(); if (is_array($indata['categories'])) { reset($indata['categories']); - foreach ($indata["categories"] as $recValues) { + foreach ($indata['categories'] as $recValues) { $enabled = array(); foreach ($recValues as $k => $b) { if ($b) { @@ -398,7 +400,7 @@ public function cmd_displayUserInfo() switch ($table) { case 'tt_address': - $res = $GLOBALS["TYPO3_DB"]->exec_SELECTquery( + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( 'tt_address.*', 'tt_address LEFT JOIN pages ON pages.uid=tt_address.pid', 'tt_address.uid=' . intval($uid) . @@ -409,7 +411,7 @@ public function cmd_displayUserInfo() ); break; case 'fe_users': - $res = $GLOBALS["TYPO3_DB"]->exec_SELECTquery( + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( 'fe_users.*', 'fe_users LEFT JOIN pages ON pages.uid=fe_users.pid', 'fe_users.uid=' . intval($uid) . @@ -425,29 +427,29 @@ public function cmd_displayUserInfo() $row = array(); if ($res) { - $row = $GLOBALS["TYPO3_DB"]->sql_fetch_assoc($res); - $GLOBALS["TYPO3_DB"]->sql_free_result($res); + $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res); + $GLOBALS['TYPO3_DB']->sql_free_result($res); } - $theOutput = ""; + $theOutput = ''; if (is_array($row)) { $categories = ''; - $resCat = $GLOBALS["TYPO3_DB"]->exec_SELECTquery( + $resCat = $GLOBALS['TYPO3_DB']->exec_SELECTquery( 'uid_foreign', $mmTable, 'uid_local=' . $row['uid'] ); - while (($rowCat = $GLOBALS["TYPO3_DB"]->sql_fetch_assoc($resCat))) { + while (($rowCat = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resCat))) { $categories .= $rowCat['uid_foreign'] . ','; } - $categories = rtrim($categories, ","); - $GLOBALS["TYPO3_DB"]->sql_free_result($resCat); + $categories = rtrim($categories, ','); + $GLOBALS['TYPO3_DB']->sql_free_result($resCat); $editParameters = '&edit[' . $table . '][' . $row['uid'] . ']=edit'; $out = ''; $out .= $this->iconFactory->getIconForRecord($table, $row)->render() . htmlspecialchars($row['name'] . ' <' . $row['email'] . '>'); - $out .= '  ' . + $out .= '  ' . $this->iconFactory->getIcon('actions-open', Icon::SIZE_SMALL) . $this->getLanguageService()->getLL('dmail_edit') . ''; $theOutput = $this->doc->section($this->getLanguageService()->getLL('subscriber_info'), $out); @@ -483,7 +485,7 @@ public function cmd_displayUserInfo() public function cmd_displayPageInfo() { // Here the dmail list is rendered: - $res = $GLOBALS["TYPO3_DB"]->exec_SELECTquery( + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( '*', 'sys_dmail', 'pid=' . intval($this->id) . @@ -494,14 +496,14 @@ public function cmd_displayPageInfo() 'scheduled DESC, scheduled_begin DESC' ); - if ($GLOBALS["TYPO3_DB"]->sql_num_rows($res)) { - $onClick = ' onClick="return confirm(' . GeneralUtility::quoteJSvalue(sprintf($this->getLanguageService()->getLL('nl_l_warning'), $GLOBALS["TYPO3_DB"]->sql_num_rows($res))) . ');"'; + if ($GLOBALS['TYPO3_DB']->sql_num_rows($res)) { + $onClick = ' onClick="return confirm(' . GeneralUtility::quoteJSvalue(sprintf($this->getLanguageService()->getLL('nl_l_warning'), $GLOBALS['TYPO3_DB']->sql_num_rows($res))) . ');"'; } else { $onClick = ''; } $out = ''; - if ($GLOBALS["TYPO3_DB"]->sql_num_rows($res)) { + if ($GLOBALS['TYPO3_DB']->sql_num_rows($res)) { $out .=''; $out .=' @@ -512,15 +514,15 @@ public function cmd_displayPageInfo() '; - while (($row = $GLOBALS["TYPO3_DB"]->sql_fetch_assoc($res))) { - $countRes = $GLOBALS["TYPO3_DB"]->exec_SELECTquery( + while (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))) { + $countRes = $GLOBALS['TYPO3_DB']->exec_SELECTquery( 'count(*)', 'sys_dmail_maillog', 'mid = ' . $row['uid'] . ' AND response_type=0' . ' AND html_sent>0' ); - list($count) = $GLOBALS["TYPO3_DB"]->sql_fetch_row($countRes); + list($count) = $GLOBALS['TYPO3_DB']->sql_fetch_row($countRes); if (!empty($row['scheduled_begin'])) { if (!empty($row['scheduled_end'])) { @@ -535,9 +537,9 @@ public function cmd_displayPageInfo() $out.=' - - - + + + '; @@ -574,44 +576,44 @@ public function linkDMail_record($str, $uid, $aTitle='') */ public function cmd_stats($row) { - if (GeneralUtility::_GP("recalcCache")) { + if (GeneralUtility::_GP('recalcCache')) { $this->makeStatTempTableContent($row); } $thisurl = BackendUtility::getModuleUrl('DirectMailNavFrame_Statistics') . '&id=' . $this->id . '&sys_dmail_uid=' . $row['uid'] . '&CMD=' . $this->CMD . '&recalcCache=1'; $output = $this->directMail_compactView($row); - // ***************************** - // Mail responses, general: - // ***************************** + // ***************************** + // Mail responses, general: + // ***************************** $mailingId = intval($row['uid']); $queryArray = array('response_type,count(*) as counter', 'sys_dmail_maillog', 'mid=' . $mailingId, 'response_type'); $table = $this->getQueryRows($queryArray, 'response_type'); - // Plaintext/HTML - $res = $GLOBALS["TYPO3_DB"]->exec_SELECTquery('html_sent,count(*) as counter', 'sys_dmail_maillog', 'mid=' . $mailingId . ' AND response_type=0', 'html_sent'); + // Plaintext/HTML + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('html_sent,count(*) as counter', 'sys_dmail_maillog', 'mid=' . $mailingId . ' AND response_type=0', 'html_sent'); $textHtml = array(); - while (($row2 = $GLOBALS["TYPO3_DB"]->sql_fetch_assoc($res))) { + while (($row2 = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))) { // 0:No mail; 1:HTML; 2:TEXT; 3:HTML+TEXT $textHtml[$row2['html_sent']] = $row2['counter']; } - $GLOBALS["TYPO3_DB"]->sql_free_result($res); + $GLOBALS['TYPO3_DB']->sql_free_result($res); - // Unique responses, html - $res = $GLOBALS["TYPO3_DB"]->exec_SELECTquery('count(*) as counter', 'sys_dmail_maillog', 'mid=' . $mailingId . ' AND response_type=1', 'rid,rtbl', 'counter'); - $uniqueHtmlResponses = $GLOBALS["TYPO3_DB"]->sql_num_rows($res); - $GLOBALS["TYPO3_DB"]->sql_free_result($res); + // Unique responses, html + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('count(*) as counter', 'sys_dmail_maillog', 'mid=' . $mailingId . ' AND response_type=1', 'rid,rtbl', 'counter'); + $uniqueHtmlResponses = $GLOBALS['TYPO3_DB']->sql_num_rows($res); + $GLOBALS['TYPO3_DB']->sql_free_result($res); - // Unique responses, Plain - $res = $GLOBALS["TYPO3_DB"]->exec_SELECTquery('count(*) as counter', 'sys_dmail_maillog', 'mid=' . $mailingId . ' AND response_type=2', 'rid,rtbl', 'counter'); - $uniquePlainResponses = $GLOBALS["TYPO3_DB"]->sql_num_rows($res); - $GLOBALS["TYPO3_DB"]->sql_free_result($res); + // Unique responses, Plain + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('count(*) as counter', 'sys_dmail_maillog', 'mid=' . $mailingId . ' AND response_type=2', 'rid,rtbl', 'counter'); + $uniquePlainResponses = $GLOBALS['TYPO3_DB']->sql_num_rows($res); + $GLOBALS['TYPO3_DB']->sql_free_result($res); - // Unique responses, pings - $res = $GLOBALS["TYPO3_DB"]->exec_SELECTquery('count(*) as counter', 'sys_dmail_maillog', 'mid=' . $mailingId . ' AND response_type=-1', 'rid,rtbl', 'counter'); - $uniquePingResponses = $GLOBALS["TYPO3_DB"]->sql_num_rows($res); - $GLOBALS["TYPO3_DB"]->sql_free_result($res); + // Unique responses, pings + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('count(*) as counter', 'sys_dmail_maillog', 'mid=' . $mailingId . ' AND response_type=-1', 'rid,rtbl', 'counter'); + $uniquePingResponses = $GLOBALS['TYPO3_DB']->sql_num_rows($res); + $GLOBALS['TYPO3_DB']->sql_free_result($res); $tblLines = array(); $tblLines[]=array('',$this->getLanguageService()->getLL('stats_total'),$this->getLanguageService()->getLL('stats_HTML'),$this->getLanguageService()->getLL('stats_plaintext')); @@ -628,21 +630,21 @@ public function cmd_stats($row) $output.='

' . $this->getLanguageService()->getLL('stats_general_information') . '

'; $output.= DirectMailUtility::formatTable($tblLines, array('nowrap', 'nowrap', 'nowrap', 'nowrap'), 1, array()); - // ****************** - // Links: - // ****************** + // ****************** + // Links: + // ****************** - // initialize $urlCounter + // initialize $urlCounter $urlCounter = array( 'total' => array(), 'plain' => array(), 'html' => array(), ); - // Most popular links, html: + // Most popular links, html: $queryArray = array('url_id,count(*) as counter', 'sys_dmail_maillog', 'mid=' . intval($row['uid']) . ' AND response_type=1', 'url_id', 'counter'); $htmlUrlsTable=$this->getQueryRows($queryArray, 'url_id'); - // Most popular links, plain: + // Most popular links, plain: $queryArray = array('url_id,count(*) as counter', 'sys_dmail_maillog', 'mid=' . intval($row['uid']) . ' AND response_type=2', 'url_id', 'counter'); $plainUrlsTable=$this->getQueryRows($queryArray, 'url_id'); @@ -727,7 +729,7 @@ public function cmd_stats($row) $tblLines = array(); $tblLines[] = array('',$this->getLanguageService()->getLL('stats_HTML_link_nr'),$this->getLanguageService()->getLL('stats_plaintext_link_nr'),$this->getLanguageService()->getLL('stats_total'),$this->getLanguageService()->getLL('stats_HTML'),$this->getLanguageService()->getLL('stats_plaintext'),''); - // HTML mails + // HTML mails if (intval($row['sendOptions']) & 0x2) { $htmlContent = $unpackedMail['html']['content']; @@ -793,7 +795,7 @@ public function cmd_stats($row) $origId = $id; $id = abs(intval($id)); $url = $htmlLinks[$id]['url'] ? $htmlLinks[$id]['url'] : $urlArr[$origId]; - // a link to this host? + // a link to this host? $uParts = @parse_url($url); $urlstr = $this->getUrlStr($uParts); @@ -826,7 +828,7 @@ public function cmd_stats($row) } - // go through all links that were not clicked yet and that have a label + // go through all links that were not clicked yet and that have a label $clickedLinks = array_keys($urlCounter['total']); foreach ($urlArr as $id => $link) { if (!in_array($id, $clickedLinks) && (isset($htmlLinks['id']))) { @@ -854,13 +856,13 @@ public function cmd_stats($row) /** * Hook for cmd_stats_linkResponses */ - if (is_array ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['direct_mail']['mod4']['cmd_stats_linkResponses'])) { + if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['direct_mail']['mod4']['cmd_stats_linkResponses'])) { $hookObjectsArr = array(); foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['direct_mail']['mod4']['cmd_stats_linkResponses'] as $classRef) { $hookObjectsArr[] = &GeneralUtility::getUserObj($classRef); } - foreach($hookObjectsArr as $hookObj) { + foreach ($hookObjectsArr as $hookObj) { if (method_exists($hookObj, 'cmd_stats_linkResponses')) { $output .= $hookObj->cmd_stats_linkResponses($tblLines, $this); } @@ -931,7 +933,7 @@ public function cmd_stats($row) // Find all returned mail if (GeneralUtility::_GP('returnList')||GeneralUtility::_GP('returnDisable')||GeneralUtility::_GP('returnCSV')) { - $res = $GLOBALS["TYPO3_DB"]->exec_SELECTquery( + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( 'rid,rtbl,email', 'sys_dmail_maillog', 'mid=' . intval($row['uid']) . @@ -939,7 +941,7 @@ public function cmd_stats($row) ); $idLists = array(); - while (($rrow = $GLOBALS["TYPO3_DB"]->sql_fetch_assoc($res))) { + while (($rrow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))) { switch ($rrow['rtbl']) { case 't': $idLists['tt_address'][]=$rrow['rid']; @@ -1001,7 +1003,7 @@ public function cmd_stats($row) // Find Unknown Recipient if (GeneralUtility::_GP('unknownList')||GeneralUtility::_GP('unknownDisable')||GeneralUtility::_GP('unknownCSV')) { - $res = $GLOBALS["TYPO3_DB"]->exec_SELECTquery( + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( 'rid,rtbl,email', 'sys_dmail_maillog', 'mid=' . intval($row['uid']) . @@ -1010,7 +1012,7 @@ public function cmd_stats($row) ); $idLists = array(); - while (($rrow = $GLOBALS["TYPO3_DB"]->sql_fetch_assoc($res))) { + while (($rrow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))) { switch ($rrow['rtbl']) { case 't': $idLists['tt_address'][]=$rrow['rid']; @@ -1072,7 +1074,7 @@ public function cmd_stats($row) // Mailbox Full if (GeneralUtility::_GP('fullList')||GeneralUtility::_GP('fullDisable')||GeneralUtility::_GP('fullCSV')) { - $res = $GLOBALS["TYPO3_DB"]->exec_SELECTquery( + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( 'rid,rtbl,email', 'sys_dmail_maillog', 'mid=' . intval($row['uid']) . @@ -1080,7 +1082,7 @@ public function cmd_stats($row) ' AND return_code=551' ); $idLists = array(); - while (($rrow = $GLOBALS["TYPO3_DB"]->sql_fetch_assoc($res))) { + while (($rrow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))) { switch ($rrow['rtbl']) { case 't': $idLists['tt_address'][]=$rrow['rid']; @@ -1142,7 +1144,7 @@ public function cmd_stats($row) // find Bad Host if (GeneralUtility::_GP('badHostList')||GeneralUtility::_GP('badHostDisable')||GeneralUtility::_GP('badHostCSV')) { - $res = $GLOBALS["TYPO3_DB"]->exec_SELECTquery( + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( 'rid,rtbl,email', 'sys_dmail_maillog', 'mid=' . intval($row['uid']) . @@ -1150,7 +1152,7 @@ public function cmd_stats($row) ' AND return_code=552' ); $idLists = array(); - while (($rrow = $GLOBALS["TYPO3_DB"]->sql_fetch_assoc($res))) { + while (($rrow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))) { switch ($rrow['rtbl']) { case 't': $idLists['tt_address'][]=$rrow['rid']; @@ -1212,7 +1214,7 @@ public function cmd_stats($row) // find Bad Header if (GeneralUtility::_GP('badHeaderList')||GeneralUtility::_GP('badHeaderDisable')||GeneralUtility::_GP('badHeaderCSV')) { - $res = $GLOBALS["TYPO3_DB"]->exec_SELECTquery( + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( 'rid,rtbl,email', 'sys_dmail_maillog', 'mid=' . intval($row['uid']) . @@ -1220,7 +1222,7 @@ public function cmd_stats($row) ' AND return_code=554' ); $idLists = array(); - while (($rrow = $GLOBALS["TYPO3_DB"]->sql_fetch_assoc($res))) { + while (($rrow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))) { switch ($rrow['rtbl']) { case 't': $idLists['tt_address'][] = $rrow['rid']; @@ -1284,7 +1286,7 @@ public function cmd_stats($row) // find Unknown Reasons // TODO: list all reason if (GeneralUtility::_GP('reasonUnknownList')||GeneralUtility::_GP('reasonUnknownDisable')||GeneralUtility::_GP('reasonUnknownCSV')) { - $res = $GLOBALS["TYPO3_DB"]->exec_SELECTquery( + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( 'rid,rtbl,email', 'sys_dmail_maillog', 'mid=' . intval($row['uid']) . @@ -1292,7 +1294,7 @@ public function cmd_stats($row) ' AND return_code=-1' ); $idLists = array(); - while (($rrow = $GLOBALS["TYPO3_DB"]->sql_fetch_assoc($res))) { + while (($rrow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))) { switch ($rrow['rtbl']) { case 't': $idLists['tt_address'][] = $rrow['rid']; @@ -1449,7 +1451,7 @@ public function getLinkLabel($url, $urlStr, $forceFetch = false, $linkedWord = ' } } - // Fallback to url + // Fallback to url if ($label === '') { $label = $url; } @@ -1512,7 +1514,7 @@ public function getUrlStr(array $urlParts) */ public function getBaseURL() { - $baseUrl = GeneralUtility::getIndpEnv("TYPO3_SITE_URL"); + $baseUrl = GeneralUtility::getIndpEnv('TYPO3_SITE_URL'); # if fetching the newsletter using http, set the url to http here if ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['direct_mail']['UseHttpToFetch'] == 1) { @@ -1545,7 +1547,7 @@ public function disableRecipients(array $arr, $table) 'uid IN (' . implode(',', $GLOBALS['TYPO3_DB']->cleanIntArray($uidList)) . ')', $values ); - $GLOBALS["TYPO3_DB"]->sql_free_result($res); + $GLOBALS['TYPO3_DB']->sql_free_result($res); } } } @@ -1562,12 +1564,12 @@ public function disableRecipients(array $arr, $table) public function makeStatTempTableContent(array $mrow) { // Remove old: - $GLOBALS["TYPO3_DB"]->exec_DELETEquery( + $GLOBALS['TYPO3_DB']->exec_DELETEquery( 'cache_sys_dmail_stat', 'mid=' . intval($mrow['uid']) ); - $res = $GLOBALS["TYPO3_DB"]->exec_SELECTquery( + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( 'rid,rtbl,tstamp,response_type,url_id,html_sent,size', 'sys_dmail_maillog', 'mid=' . intval($mrow['uid']), @@ -1578,7 +1580,7 @@ public function makeStatTempTableContent(array $mrow) $currentRec = ''; $recRec = ''; - while (($row = $GLOBALS["TYPO3_DB"]->sql_fetch_assoc($res))) { + while (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))) { $thisRecPointer = $row['rtbl'] . $row['rid']; if ($thisRecPointer != $currentRec) { @@ -1634,7 +1636,7 @@ public function makeStatTempTableContent(array $mrow) } } - $GLOBALS["TYPO3_DB"]->sql_free_result($res); + $GLOBALS['TYPO3_DB']->sql_free_result($res); $this->storeRecRec($recRec); } @@ -1678,7 +1680,7 @@ public function storeRecRec(array $recRec) 'cache_sys_dmail_stat', $recRec ); - $GLOBALS["TYPO3_DB"]->sql_free_result($res); + $GLOBALS['TYPO3_DB']->sql_free_result($res); } } @@ -1692,7 +1694,7 @@ public function storeRecRec(array $recRec) */ public function getQueryRows(array $queryArray, $fieldName) { - $res = $GLOBALS["TYPO3_DB"]->exec_SELECTquery( + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( $queryArray[0], $queryArray[1], $queryArray[2], @@ -1701,14 +1703,14 @@ public function getQueryRows(array $queryArray, $fieldName) $queryArray[5] ); $lines = array(); - while (($row = $GLOBALS["TYPO3_DB"]->sql_fetch_assoc($res))) { + while (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))) { if ($fieldName) { $lines[$row[$fieldName]] = $row; } else { $lines[] = $row; } } - $GLOBALS["TYPO3_DB"]->sql_free_result($res); + $GLOBALS['TYPO3_DB']->sql_free_result($res); return $lines; } @@ -1743,7 +1745,7 @@ public function setURLs(array $row) // Finding the domain to use $this->urlbase = DirectMailUtility::getUrlBase($row['use_domain']); - // Finding the url to fetch content from + // Finding the url to fetch content from switch ((string)$row['type']) { case 1: $this->url_html = $row['HTMLParams']; @@ -1815,8 +1817,8 @@ public function directMail_compactView($row) $this->iconFactory->getIcon('actions-document-info', Icon::SIZE_SMALL) . ''; - $delBegin = ($row["scheduled_begin"]?BackendUtility::datetime($row["scheduled_begin"]):'-'); - $delEnd = ($row["scheduled_end"]?BackendUtility::datetime($row["scheduled_begin"]):'-'); + $delBegin = ($row['scheduled_begin']?BackendUtility::datetime($row['scheduled_begin']):'-'); + $delEnd = ($row['scheduled_end']?BackendUtility::datetime($row['scheduled_begin']):'-'); // count total recipient from the query_info $totalRecip = 0; diff --git a/Classes/Plugin/DirectMail.php b/Classes/Plugin/DirectMail.php index 5d9b34e16..6b83cfef8 100644 --- a/Classes/Plugin/DirectMail.php +++ b/Classes/Plugin/DirectMail.php @@ -154,12 +154,12 @@ public function main($content, array $conf) $lines[] = ''; $content = implode(LF, $lines); - // Substitute labels + // Substitute labels $markerArray = array(); $markerArray = $this->addLabelsMarkers($markerArray); $content = $this->cObj->substituteMarkerArray($content, $markerArray); - // User processing: + // User processing: $content = $this->userProcess('userProc', $content); return $content; } @@ -179,7 +179,7 @@ public function init(array $conf) $this->pi_loadLL(); $this->siteUrl = $this->conf['siteUrl']; - // Default linebreak; + // Default linebreak; if ($this->conf['flowedFormat']) { $this->linebreak = chr(32) . LF; } @@ -302,11 +302,11 @@ public function parseBody($str, $altConf='bodytext') if ($this->conf[$altConf . '.']['doubleLF']) { $str = preg_replace("/\n/", "\n\n", $str); } - // Regular parsing: + // Regular parsing: $str = preg_replace('//i', LF, $str); $str = $this->cObj->stdWrap($str, $this->conf[$altConf . '.']['stdWrap.']); - // Then all a-tags: + // Then all a-tags: $aConf = array(); $aConf['parseFunc.']['tags.']['a'] = 'USER'; $aConf['parseFunc.']['tags.']['a.']['userFunc'] = 'tx_directmail_pi1->atag_to_http'; @@ -420,7 +420,7 @@ public function renderHeader($str, $type = 0) } } - return ""; + return ''; } /** @@ -456,7 +456,7 @@ public function breakContent($str) $cParts = explode(LF, $str); $lines = array(); foreach ($cParts as $substrs) { - $lines[] = $this->breakLines($substrs, ""); + $lines[] = $this->breakLines($substrs, ''); } return implode(LF, $lines); } diff --git a/Classes/Readmail.php b/Classes/Readmail.php index c2a9f26e0..db745f1bf 100644 --- a/Classes/Readmail.php +++ b/Classes/Readmail.php @@ -30,7 +30,6 @@ */ class Readmail { - protected $reason_text = array( '550' => 'no mailbox|account does not exist|user unknown|user is unknown|unknown user|unknown local part|unrouteable address|does not have an account here|no such user|user not listed|account has been disabled or discontinued|user disabled|unknown recipient|invalid recipient|recipient problem|recipient name is not recognized|mailbox unavailable|550 5\.1\.1 recipient|status: 5\.1\.1|delivery failed 550|550 requested action not taken|receiver not found|unknown or illegal alias|is unknown at host|is not a valid mailbox|no mailbox here by that name|we do not relay|5\.7\.1 unable to relay|cuenta no activa|inactive user|user is inactive|mailaddress is administratively disabled|not found in directory|not listed in public name & address book|destination addresses were unknown|rejected address|not listed in domino directory|domino directory entry does not|550-5\.1.1 The email account that you tried to reach does not exist', '551' => 'over quota|quota exceeded|mailbox full|mailbox is full|not enough space on the disk|mailfolder is over the allowed quota|recipient reached disk quota|temporalmente sobre utilizada|recipient storage full|mailbox lleno|user mailbox exceeds allowed size', diff --git a/Classes/Scheduler/AnalyzeBounceMailAdditionalFields.php b/Classes/Scheduler/AnalyzeBounceMailAdditionalFields.php index 5aa4cdd4c..de1b8d27c 100644 --- a/Classes/Scheduler/AnalyzeBounceMailAdditionalFields.php +++ b/Classes/Scheduler/AnalyzeBounceMailAdditionalFields.php @@ -31,7 +31,6 @@ */ class AnalyzeBounceMailAdditionalFields implements AdditionalFieldProviderInterface { - public function __construct() { // add locallang file diff --git a/Classes/Scheduler/MailFromDraft.php b/Classes/Scheduler/MailFromDraft.php index 63323ccfb..a9d01f3ab 100644 --- a/Classes/Scheduler/MailFromDraft.php +++ b/Classes/Scheduler/MailFromDraft.php @@ -30,7 +30,6 @@ */ class MailFromDraft extends AbstractTask { - public $draftUid = null; protected $hookObjects = array(); @@ -61,37 +60,37 @@ public function execute() $draftRecord = BackendUtility::getRecord('sys_dmail', $this->draftUid); - // get some parameters from tsConfig + // get some parameters from tsConfig $tsConfig = BackendUtility::getModTSconfig($draftRecord['pid'], 'mod.web_modules.dmail'); $defaultParams = $tsConfig['properties']; - // make a real record out of it + // make a real record out of it unset($draftRecord['uid']); $draftRecord['tstamp'] = time(); // set the right type (3 => 1, 2 => 0) $draftRecord['type'] -= 2; - // check if domain record is set + // check if domain record is set if ((TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_CLI) && (int)$draftRecord['type'] !== 1 && empty($draftRecord['use_domain'])) { throw new \Exception('No domain record set!'); } - // Insert the new dmail record into the DB + // Insert the new dmail record into the DB $GLOBALS['TYPO3_DB']->exec_INSERTquery('sys_dmail', $draftRecord); $this->dmailUid = $GLOBALS['TYPO3_DB']->sql_insert_id(); - // Call a hook after insertion of the cloned dmail record - // This hook can get used to modify fields of the direct mail. - // For example the current date could get appended to the subject. + // Call a hook after insertion of the cloned dmail record + // This hook can get used to modify fields of the direct mail. + // For example the current date could get appended to the subject. $hookParams['draftRecord'] = &$draftRecord; $hookParams['defaultParams'] = &$defaultParams; $this->callHooks('postInsertClone', $hookParams); - // fetch the cloned record + // fetch the cloned record $mailRecord = BackendUtility::getRecord('sys_dmail', $this->dmailUid); - // fetch mail content - $result = DirectMailUtility::fetchUrlContentsForDirectMailRecord($mailRecord, $defaultParams, TRUE); + // fetch mail content + $result = DirectMailUtility::fetchUrlContentsForDirectMailRecord($mailRecord, $defaultParams, true); if ($result['errors'] !== array()) { throw new \Exception('Failed to fetch contents: ' . implode(', ', $result['errors'])); @@ -103,13 +102,13 @@ public function execute() 'scheduled' => time(), 'issent' => 1 ); - // Call a hook before enqueuing the cloned dmail record into - // the direct mail delivery queue + // Call a hook before enqueuing the cloned dmail record into + // the direct mail delivery queue $hookParams['mailRecord'] = &$mailRecord; $hookParams['updateData'] = &$updateData; $this->callHooks('enqueueClonedDmail', $hookParams); - // Update the cloned dmail so it will get sent upon next - // invocation of the mailer engine + // Update the cloned dmail so it will get sent upon next + // invocation of the mailer engine $GLOBALS['TYPO3_DB']->exec_UPDATEquery('sys_dmail', 'uid = ' . intval($this->dmailUid), $updateData); } } diff --git a/Classes/Scheduler/MailFromDraftAdditionalFields.php b/Classes/Scheduler/MailFromDraftAdditionalFields.php index 15245f32a..b92e35973 100644 --- a/Classes/Scheduler/MailFromDraftAdditionalFields.php +++ b/Classes/Scheduler/MailFromDraftAdditionalFields.php @@ -70,7 +70,7 @@ public function getAdditionalFields(array &$taskInfo, $task, SchedulerModuleCont $drafts = array_merge($drafts, $draftsExternal); } - // Create the input field + // Create the input field $fieldID = 'task_selecteddraft'; $fieldHtml = ''; diff --git a/Classes/SelectCategories.php b/Classes/SelectCategories.php index 9bce6fb8d..f3194f777 100644 --- a/Classes/SelectCategories.php +++ b/Classes/SelectCategories.php @@ -43,18 +43,18 @@ public function get_localized_categories(array $params) { global $LANG; -/* - $params['items'] = &$items; - $params['config'] = $config; - $params['TSconfig'] = $iArray; - $params['table'] = $table; - $params['row'] = $row; - $params['field'] = $field; -*/ + /* + $params['items'] = &$items; + $params['config'] = $config; + $params['TSconfig'] = $iArray; + $params['table'] = $table; + $params['row'] = $row; + $params['field'] = $field; + */ $config = $params['config']; $table = $config['itemsProcFunc_config']['table']; - // initialize backend user language + // initialize backend user language if ($LANG->lang && ExtensionManagementUtility::isLoaded('static_info_tables')) { $sysPage = GeneralUtility::makeInstance('TYPO3\CMS\Frontend\Page\PageRepository'); $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( diff --git a/Classes/Utility/TsParserExt.php b/Classes/Utility/TsParserExt.php index 0c180f482..e9124871f 100644 --- a/Classes/Utility/TsParserExt.php +++ b/Classes/Utility/TsParserExt.php @@ -40,18 +40,18 @@ public static function displayMessage() ); $link = BackendUtility::getModuleUrl('tools_ExtensionmanagerExtensionmanager', $parameters); - $out = " -
-
-
" . $GLOBALS['LANG']->sL('LLL:EXT:direct_mail/Resources/Private/Language/locallang_mod2-6.xlf:update_optionHeader') . "
-
- " . $GLOBALS['LANG']->sL("LLL:EXT:direct_mail/Resources/Private/Language/locallang_mod2-6.xlf:update_optionMsg") . "
- - " . $GLOBALS['LANG']->sL("LLL:EXT:direct_mail/Resources/Private/Language/locallang_mod2-6.xlf:update_optionLink") . " + $out = ' +
+
+
' . $GLOBALS['LANG']->sL('LLL:EXT:direct_mail/Resources/Private/Language/locallang_mod2-6.xlf:update_optionHeader') . '
+
+ ' . $GLOBALS['LANG']->sL('LLL:EXT:direct_mail/Resources/Private/Language/locallang_mod2-6.xlf:update_optionMsg') . '
+ + ' . $GLOBALS['LANG']->sL('LLL:EXT:direct_mail/Resources/Private/Language/locallang_mod2-6.xlf:update_optionLink') . '
- "; + '; return $out; } diff --git a/cli/cli_direct_mail.php b/cli/cli_direct_mail.php index d674a8b17..b29fc9dd9 100644 --- a/cli/cli_direct_mail.php +++ b/cli/cli_direct_mail.php @@ -13,51 +13,51 @@ class direct_mail_cli extends CommandLineController /** * Constructor */ - public function direct_mail_cli() - { + public function direct_mail_cli() + { // Running parent class constructor - parent::__construct(); - - // Setting help texts: - $this->cli_help['name'] = 'direct_mail'; - $this->cli_help['synopsis'] = '###OPTIONS###'; - $this->cli_help['description'] = 'Invoke direct_mail e-mail distribution engine'; - $this->cli_help['examples'] = '/.../cli_dispatch.phpsh direct_mail [masssend]'; - $this->cli_help['author'] = 'Ivan Kartolo, (c) 2008'; - $this->cli_options[] = array('masssend', 'Invoke sending of mails!'); - } + parent::__construct(); + + // Setting help texts: + $this->cli_help['name'] = 'direct_mail'; + $this->cli_help['synopsis'] = '###OPTIONS###'; + $this->cli_help['description'] = 'Invoke direct_mail e-mail distribution engine'; + $this->cli_help['examples'] = '/.../cli_dispatch.phpsh direct_mail [masssend]'; + $this->cli_help['author'] = 'Ivan Kartolo, (c) 2008'; + $this->cli_options[] = array('masssend', 'Invoke sending of mails!'); + } - /** - * CLI engine - * - * @return void - */ - public function cli_main() - { + /** + * CLI engine + * + * @return void + */ + public function cli_main() + { // get task (function) - $task = (string)$this->cli_args['_DEFAULT'][1]; + $task = (string)$this->cli_args['_DEFAULT'][1]; - if (!$task) { - $this->cli_validateArgs(); - $this->cli_help(); - exit; - } + if (!$task) { + $this->cli_validateArgs(); + $this->cli_help(); + exit; + } - if ($task == 'masssend') { - $this->massSend(); - } + if ($task == 'masssend') { + $this->massSend(); + } - /** - * Or other tasks - * Which task shoud be called can you define in the shell command - * /www/typo3/cli_dispatch.phpsh cli_example otherTask - */ - if ($task == 'otherTask') { - // ... - } + /** + * Or other tasks + * Which task shoud be called can you define in the shell command + * /www/typo3/cli_dispatch.phpsh cli_example otherTask + */ + if ($task == 'otherTask') { + // ... } + } /** * Start sending the newsletter diff --git a/ext_tables.php b/ext_tables.php index ce1d2062b..d7e0d90ee 100755 --- a/ext_tables.php +++ b/ext_tables.php @@ -45,7 +45,11 @@ $TBE_MODULES = $temp_TBE_MODULES; } - TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('DirectMailNavFrame', '', '', '', + TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule( + 'DirectMailNavFrame', + '', + '', + '', array( 'routeTarget' => DirectMailTeam\DirectMail\Module\NavFrame::class . '::mainAction', 'access' => 'group,user', @@ -59,7 +63,11 @@ ) ); - TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('DirectMailNavFrame', 'DirectMail', 'bottom', '', + TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule( + 'DirectMailNavFrame', + 'DirectMail', + 'bottom', + '', array( 'routeTarget' => DirectMailTeam\DirectMail\Module\Dmail::class . '::mainAction', 'access' => 'group,user', @@ -76,7 +84,11 @@ ) ); - TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('DirectMailNavFrame', 'RecipientList', 'bottom', '', + TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule( + 'DirectMailNavFrame', + 'RecipientList', + 'bottom', + '', array( 'routeTarget' => DirectMailTeam\DirectMail\Module\RecipientList::class . '::mainAction', 'access' => 'group,user', @@ -93,7 +105,11 @@ ) ); - TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('DirectMailNavFrame', 'Statistics', 'bottom', '', + TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule( + 'DirectMailNavFrame', + 'Statistics', + 'bottom', + '', array( 'routeTarget' => DirectMailTeam\DirectMail\Module\Statistics::class . '::mainAction', 'access' => 'group,user', @@ -110,7 +126,11 @@ ) ); - TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('DirectMailNavFrame', 'MailerEngine', 'bottom', '', + TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule( + 'DirectMailNavFrame', + 'MailerEngine', + 'bottom', + '', array( 'routeTarget' => DirectMailTeam\DirectMail\Module\MailerEngine::class . '::mainAction', 'access' => 'group,user', @@ -128,7 +148,11 @@ ); - TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('DirectMailNavFrame', 'Configuration', 'bottom', '', + TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule( + 'DirectMailNavFrame', + 'Configuration', + 'bottom', + '', array( 'routeTarget' => DirectMailTeam\DirectMail\Module\Configuration::class . '::mainAction', 'access' => 'group,user', @@ -150,7 +174,7 @@ $GLOBALS['TBE_STYLES']['spritemanager']['singleIcons']['tcarecords-pages-contains-dmail'] = TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Icons/ext_icon_dmail_folder.gif'; if (TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger(TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getExtensionVersion('tt_address')) <= TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger('2.3.5')) { - include_once(TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY)."Configuration/TCA/Overrides/tt_address.php"); + include_once(TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY).'Configuration/TCA/Overrides/tt_address.php'); } /** @var \TYPO3\CMS\Core\Imaging\IconRegistry $iconRegistry */ @@ -174,4 +198,4 @@ 'direct_mail_preview_plain', \TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class, ['source' => 'EXT:' . $_EXTKEY . '/Resources/Public/Icons/preview_txt.gif'] -); \ No newline at end of file +); From 186fa6d012120be2bed46b3fd8142d0b5bfdb595 Mon Sep 17 00:00:00 2001 From: Malte Riechmann Date: Mon, 25 Sep 2017 16:00:53 +0200 Subject: [PATCH 46/56] [FIX] Use correct function to parse string to timestamp When saving the distribution time it now parses to correct timestamp. Tested in TYPO3 8. --- Classes/Module/Dmail.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Module/Dmail.php b/Classes/Module/Dmail.php index 8ee14d2fb..64fef59f9 100644 --- a/Classes/Module/Dmail.php +++ b/Classes/Module/Dmail.php @@ -1080,7 +1080,7 @@ public function cmd_send_mail($row) $result = $this->cmd_compileMailGroup($recipientGroups); $queryInfo = $result['queryInfo']; - $distributionTime = intval(GeneralUtility::_GP('send_mail_datetime')); + $distributionTime = strtotime(GeneralUtility::_GP('send_mail_datetime')); if ($distributionTime < time()) { $distributionTime = time(); } From cef97a0b64eb29307ad9b73872d8908d391dc2be Mon Sep 17 00:00:00 2001 From: Malte Riechmann Date: Mon, 25 Sep 2017 16:02:05 +0200 Subject: [PATCH 47/56] [TASK] Use larger select field for multiple mail groups This renders a larger select field for multiple mail groups. We use a TYPO3 typical CSS class and the size attribute to modify the select field. --- Classes/Module/Dmail.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Module/Dmail.php b/Classes/Module/Dmail.php index 8ee14d2fb..18028f2e1 100644 --- a/Classes/Module/Dmail.php +++ b/Classes/Module/Dmail.php @@ -931,7 +931,7 @@ public function cmd_finalmail($direct_mail_row) $groupInput .= 'disabled'; } } else { - $groupInput = ''; + $groupInput = ''; } // Set up form: $msg = ""; From f3a22220b164eb2b5d0d657666144990faaf29c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Jacob?= Date: Tue, 26 Sep 2017 10:17:23 +0200 Subject: [PATCH 48/56] [FEATURE] Introduce a flash message renderer (resolves #85) Introduce a utility class including a flash message renderer. Furthermore, some minor code cleanups and improvements have been made. --- Classes/DirectMailUtility.php | 12 ++---- Classes/Dmailer.php | 1 - Classes/Importer.php | 6 +++ Classes/Module/Configuration.php | 25 ++---------- Classes/Module/Dmail.php | 27 ++++--------- Classes/Module/MailerEngine.php | 27 ++++--------- Classes/Module/RecipientList.php | 16 ++------ Classes/Module/Statistics.php | 16 ++------ Classes/SelectCategories.php | 1 - Classes/Utility/FlashMessageRenderer.php | 51 ++++++++++++++++++++++++ 10 files changed, 85 insertions(+), 97 deletions(-) create mode 100644 Classes/Utility/FlashMessageRenderer.php diff --git a/Classes/DirectMailUtility.php b/Classes/DirectMailUtility.php index ef640159a..9e87b40ab 100644 --- a/Classes/DirectMailUtility.php +++ b/Classes/DirectMailUtility.php @@ -14,12 +14,12 @@ * The TYPO3 project - inspiring people to share! */ +use DirectMailTeam\DirectMail\Utility\FlashMessageRenderer; use TYPO3\CMS\Backend\Utility\BackendUtility; use TYPO3\CMS\Backend\Utility\IconUtility; use TYPO3\CMS\Core\Imaging\Icon; use TYPO3\CMS\Core\Imaging\IconFactory; use TYPO3\CMS\Core\Messaging\FlashMessage; -use TYPO3\CMS\Core\Messaging\FlashMessageService; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\MathUtility; @@ -1218,10 +1218,6 @@ public static function fetchUrlContentsForDirectMailRecord(array $row, array $pa } } - /** @var FlashMessageService $flashMessageService */ - $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class); - $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier(); - if (!count($errorMsg)) { // Update the record: $htmlmail->theParts['messageid'] = $htmlmail->messageid; @@ -1250,8 +1246,7 @@ public static function fetchUrlContentsForDirectMailRecord(array $row, array $pa $GLOBALS['LANG']->getLL('dmail_warning'), FlashMessage::WARNING ); - $defaultFlashMessageQueue->enqueue($flashMessage); - $theOutput .= $defaultFlashMessageQueue->renderFlashMessages(); + $theOutput .= GeneralUtility::makeInstance(FlashMessageRenderer::class)->render($flashMessage); } } else { /* @var $flashMessage FlashMessage */ @@ -1260,8 +1255,7 @@ public static function fetchUrlContentsForDirectMailRecord(array $row, array $pa $GLOBALS['LANG']->getLL('dmail_error'), FlashMessage::ERROR ); - $defaultFlashMessageQueue->enqueue($flashMessage); - $theOutput .= $defaultFlashMessageQueue->renderFlashMessages(); + $theOutput .= GeneralUtility::makeInstance(FlashMessageRenderer::class)->render($flashMessage); } if ($returnArray) { return array('errors' => $errorMsg, 'warnings' => $warningMsg); diff --git a/Classes/Dmailer.php b/Classes/Dmailer.php index dd350689c..24e48bd18 100755 --- a/Classes/Dmailer.php +++ b/Classes/Dmailer.php @@ -18,7 +18,6 @@ use TYPO3\CMS\Core\Service\MarkerBasedTemplateService; use TYPO3\CMS\Backend\Utility\BackendUtility; use TYPO3\CMS\Core\Utility\MathUtility; -use DirectMailTeam\DirectMail\DirectMailUtility; /** * Class, doing the sending of Direct-mails, eg. through a cron-job diff --git a/Classes/Importer.php b/Classes/Importer.php index 49f0d41af..a14978d19 100644 --- a/Classes/Importer.php +++ b/Classes/Importer.php @@ -995,6 +995,9 @@ public function writeTempFile() // Initializing: /* @var $fileProcessor \TYPO3\CMS\Core\Utility\File\ExtendedFileUtility */ $this->fileProcessor = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Utility\\File\\ExtendedFileUtility'); + 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; @@ -1063,6 +1066,9 @@ public function checkUpload() // Initializing: /* @var $fileProcessor \TYPO3\CMS\Core\Utility\File\ExtendedFileUtility */ $this->fileProcessor = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Utility\\File\\ExtendedFileUtility'); + if (version_compare(TYPO3_branch, '8.3', '<')) { + $this->fileProcessor->init($fm, $GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']); + } $this->fileProcessor->setActionPermissions(); $this->fileProcessor->dontCheckForUnique = 1; diff --git a/Classes/Module/Configuration.php b/Classes/Module/Configuration.php index 9b8049d98..c82559480 100644 --- a/Classes/Module/Configuration.php +++ b/Classes/Module/Configuration.php @@ -22,8 +22,8 @@ use TYPO3\CMS\Backend\Utility\BackendUtility; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Messaging\FlashMessage; -use TYPO3\CMS\Core\Messaging\FlashMessageService; use DirectMailTeam\DirectMail\DirectMailUtility; +use DirectMailTeam\DirectMail\Utility\FlashMessageRenderer; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; @@ -77,10 +77,6 @@ class Configuration extends BaseScriptClass */ protected $iconFactory; - /** @var FlashMessageService $flashMessageService */ - protected $flashMessageService; - protected $defaultFlashMessageQueue; - /** * The name of the module * @@ -127,10 +123,6 @@ public function init() // initialize IconFactory $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class); - // initialize FlashMessageService - $this->flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class); - $this->defaultFlashMessageQueue = $this->flashMessageService->getMessageQueueByIdentifier(); - // initialize backend user language if ($this->getLanguageService()->lang && ExtensionManagementUtility::isLoaded('static_info_tables')) { $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( @@ -295,27 +287,19 @@ function toggleDisplay(toggleId, e, countBox) { // $module=$pidrec['module']; } - /** @var FlashMessageService $flashMessageService */ - $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class); - $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier(); - if ($module == 'dmail') { // Direct mail module if (($this->pageinfo['doktype'] == 254) && ($this->pageinfo['module'] == 'dmail')) { $markers['CONTENT'] = '

' . $this->getLanguageService()->getLL('header_conf') . '

' . $this->moduleContent(); } elseif ($this->id != 0) { - /** - * Generate flash message - * @var \TYPO3\CMS\Core\Messaging\FlashMessage - */ + /* @var $flashMessage FlashMessage */ $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $this->getLanguageService()->getLL('dmail_noRegular'), $this->getLanguageService()->getLL('dmail_newsletters'), FlashMessage::WARNING ); - $this->defaultFlashMessageQueue->enqueue($flashMessage); - $markers['FLASHMESSAGES'] = $this->defaultFlashMessageQueue->renderFlashMessages(); + $markers['FLASHMESSAGES'] = GeneralUtility::makeInstance(FlashMessageRenderer::class)->render($flashMessage); } } else { $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', @@ -323,8 +307,7 @@ function toggleDisplay(toggleId, e, countBox) { // $this->getLanguageService()->getLL('header_conf'), FlashMessage::WARNING ); - $this->defaultFlashMessageQueue->enqueue($flashMessage); - $markers['FLASHMESSAGES'] = $this->defaultFlashMessageQueue->renderFlashMessages(); + $markers['FLASHMESSAGES'] = GeneralUtility::makeInstance(FlashMessageRenderer::class)->render($flashMessage); } diff --git a/Classes/Module/Dmail.php b/Classes/Module/Dmail.php index 8ee14d2fb..34185b98a 100644 --- a/Classes/Module/Dmail.php +++ b/Classes/Module/Dmail.php @@ -25,8 +25,8 @@ use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\MathUtility; use TYPO3\CMS\Core\Messaging\FlashMessage; -use TYPO3\CMS\Core\Messaging\FlashMessageService; use DirectMailTeam\DirectMail\DirectMailUtility; +use DirectMailTeam\DirectMail\Utility\FlashMessageRenderer; use TYPO3\CMS\Core\Imaging\IconFactory; use TYPO3\CMS\Core\Imaging\Icon; @@ -77,10 +77,6 @@ class Dmail extends BaseScriptClass */ protected $iconFactory; - /** @var FlashMessageService $flashMessageService */ - protected $flashMessageService; - protected $defaultFlashMessageQueue; - protected $currentStep = 1; /** @@ -112,10 +108,6 @@ public function init() // initialize IconFactory $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class); - // initialize FlashMessageService - $this->flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class); - $this->defaultFlashMessageQueue = $this->flashMessageService->getMessageQueueByIdentifier(); - // get the config from pageTS $temp = BackendUtility::getModTSconfig($this->id, 'mod.web_modules.dmail'); if (!is_array($temp['properties'])) { @@ -347,8 +339,7 @@ function toggleDisplay(toggleId, e, countBox) { // $this->getLanguageService()->getLL('dmail_newsletters'), FlashMessage::WARNING ); - $this->defaultFlashMessageQueue->enqueue($flashMessage); - $markers['FLASHMESSAGES'] = $this->defaultFlashMessageQueue->renderFlashMessages(); + $markers['FLASHMESSAGES'] = GeneralUtility::makeInstance(FlashMessageRenderer::class)->render($flashMessage); } } else { /* @var $flashMessage FlashMessage */ @@ -357,8 +348,7 @@ function toggleDisplay(toggleId, e, countBox) { // $this->getLanguageService()->getLL('header_directmail'), FlashMessage::WARNING ); - $this->defaultFlashMessageQueue->enqueue($flashMessage); - $markers['FLASHMESSAGES'] = $this->defaultFlashMessageQueue->renderFlashMessages(); + $markers['FLASHMESSAGES'] = GeneralUtility::makeInstance(FlashMessageRenderer::class)->render($flashMessage); } $this->content = $this->doc->startPage($this->getLanguageService()->getLL('title')); @@ -714,8 +704,7 @@ public function moduleContent() $this->getLanguageService()->getLL('dmail_wiz2_fetch_success'), FlashMessage::OK ); - $this->defaultFlashMessageQueue->enqueue($flashMessage); - $markers['FLASHMESSAGES'] = $this->defaultFlashMessageQueue->renderFlashMessages(); + $markers['FLASHMESSAGES'] = GeneralUtility::makeInstance(FlashMessageRenderer::class)->render($flashMessage); } if (is_array($row)) { @@ -913,14 +902,13 @@ public function cmd_finalmail($direct_mail_row) // added disabled. see hook if (count($opt) === 0) { - /** @var $flashMessage FlashMessage */ + /* @var $flashMessage FlashMessage */ $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $this->getLanguageService()->getLL('error.no_recipient_groups_found'), '', FlashMessage::ERROR //severity ); - $this->defaultFlashMessageQueue->enqueue($flashMessage); - $groupInput = $this->defaultFlashMessageQueue->renderFlashMessages(); + $groupInput = GeneralUtility::makeInstance(FlashMessageRenderer::class)->render($flashMessage); } elseif (count($opt) === 1) { $groupInput = ''; if (!$hookSelectDisabled) { @@ -1135,8 +1123,7 @@ public function cmd_send_mail($row) ); } - $this->defaultFlashMessageQueue->enqueue($flashMessage); - return $this->defaultFlashMessageQueue->renderFlashMessages(); + return GeneralUtility::makeInstance(FlashMessageRenderer::class)->render($flashMessage); } /** diff --git a/Classes/Module/MailerEngine.php b/Classes/Module/MailerEngine.php index cfb1af6d4..b4a3784dd 100644 --- a/Classes/Module/MailerEngine.php +++ b/Classes/Module/MailerEngine.php @@ -14,14 +14,14 @@ * The TYPO3 project - inspiring people to share! */ -use DirectMailTeam\DirectMail\DirectMailUtility; use TYPO3\CMS\Core\Imaging\Icon; use TYPO3\CMS\Core\Imaging\IconFactory; use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; use TYPO3\CMS\Backend\Utility\BackendUtility; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Messaging\FlashMessage; -use TYPO3\CMS\Core\Messaging\FlashMessageService; +use DirectMailTeam\DirectMail\DirectMailUtility; +use DirectMailTeam\DirectMail\Utility\FlashMessageRenderer; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; @@ -63,10 +63,6 @@ class MailerEngine extends \TYPO3\CMS\Backend\Module\BaseScriptClass */ protected $iconFactory; - /** @var FlashMessageService $flashMessageService */ - protected $flashMessageService; - protected $defaultFlashMessageQueue; - /** * The name of the module * @@ -96,10 +92,6 @@ public function init() // initialize IconFactory $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class); - // initialize FlashMessageService - $this->flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class); - $this->defaultFlashMessageQueue = $this->flashMessageService->getMessageQueueByIdentifier(); - $temp = BackendUtility::getModTSconfig($this->id, 'mod.web_modules.dmail'); if (!is_array($temp['properties'])) { $temp['properties'] = array(); @@ -233,17 +225,16 @@ function jumpToUrlD(URL) { // $this->getLanguageService()->getLL('dmail_newsletters'), FlashMessage::WARNING ); - $this->defaultFlashMessageQueue->enqueue($flashMessage); - $markers['FLASHMESSAGES'] = $this->defaultFlashMessageQueue->renderFlashMessages(); + $markers['FLASHMESSAGES'] = GeneralUtility::makeInstance(FlashMessageRenderer::class)->render($flashMessage); } } else { + /* @var $flashMessage FlashMessage */ $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $this->getLanguageService()->getLL('select_folder'), $this->getLanguageService()->getLL('header_mailer'), FlashMessage::WARNING ); - $this->defaultFlashMessageQueue->enqueue($flashMessage); - $markers['FLASHMESSAGES'] = $this->defaultFlashMessageQueue->renderFlashMessages(); + $markers['FLASHMESSAGES'] = GeneralUtility::makeInstance(FlashMessageRenderer::class)->render($flashMessage); } $this->content = $this->doc->startPage($this->getLanguageService()->getLL('title')); @@ -373,8 +364,7 @@ public function cmd_cronMonitor() break; default: } - $this->defaultFlashMessageQueue->enqueue($flashMessage); - return $this->defaultFlashMessageQueue->renderFlashMessages(); + return GeneralUtility::makeInstance(FlashMessageRenderer::class)->render($flashMessage); } /** @@ -392,12 +382,11 @@ public function cmd_mailerengine() if ($enableTrigger && GeneralUtility::_GP('invokeMailerEngine')) { /* @var $flashMessage FlashMessage */ $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', - '' . $this->getLanguageService()->getLL('dmail_mailerengine_log') . '
' . nl2br($this->invokeMEngine()), + $this->getLanguageService()->getLL('dmail_mailerengine_log') . ' ' . $this->invokeMEngine() . '. ', $this->getLanguageService()->getLL('dmail_mailerengine_invoked'), FlashMessage::INFO ); - $this->defaultFlashMessageQueue->enqueue($flashMessage); - $invokeMessage = $this->defaultFlashMessageQueue->renderFlashMessages(); + $invokeMessage = GeneralUtility::makeInstance(FlashMessageRenderer::class)->render($flashMessage); } // Invoke engine diff --git a/Classes/Module/RecipientList.php b/Classes/Module/RecipientList.php index d7e0da273..5fe511943 100644 --- a/Classes/Module/RecipientList.php +++ b/Classes/Module/RecipientList.php @@ -22,8 +22,8 @@ use TYPO3\CMS\Backend\Utility\BackendUtility; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Messaging\FlashMessage; -use TYPO3\CMS\Core\Messaging\FlashMessageService; use DirectMailTeam\DirectMail\DirectMailUtility; +use DirectMailTeam\DirectMail\Utility\FlashMessageRenderer; /** * Recipient list module for tx_directmail extension @@ -77,10 +77,6 @@ class RecipientList extends \TYPO3\CMS\Backend\Module\BaseScriptClass */ protected $iconFactory; - /** @var FlashMessageService $flashMessageService */ - protected $flashMessageService; - protected $defaultFlashMessageQueue; - /** * The name of the module * @@ -110,10 +106,6 @@ public function init() // initialize IconFactory $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class); - // initialize FlashMessageService - $this->flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class); - $this->defaultFlashMessageQueue = $this->flashMessageService->getMessageQueueByIdentifier(); - $temp = BackendUtility::getModTSconfig($this->id, 'mod.web_modules.dmail'); if (!is_array($temp['properties'])) { $temp['properties'] = array(); @@ -252,8 +244,7 @@ function jumpToUrlD(URL) { // $this->getLanguageService()->getLL('dmail_newsletters'), FlashMessage::WARNING ); - $this->defaultFlashMessageQueue->enqueue($flashMessage); - $markers['FLASHMESSAGES'] = $this->defaultFlashMessageQueue->renderFlashMessages(); + $markers['FLASHMESSAGES'] = GeneralUtility::makeInstance(FlashMessageRenderer::class)->render($flashMessage); } } else { /* @var $flashMessage FlashMessage */ @@ -262,8 +253,7 @@ function jumpToUrlD(URL) { // $this->getLanguageService()->getLL('header_recip'), FlashMessage::WARNING ); - $this->defaultFlashMessageQueue->enqueue($flashMessage); - $markers['FLASHMESSAGES'] = $this->defaultFlashMessageQueue->renderFlashMessages(); + $markers['FLASHMESSAGES'] = GeneralUtility::makeInstance(FlashMessageRenderer::class)->render($flashMessage); } $this->content = $this->doc->startPage($this->getLanguageService()->getLL('mailgroup_header')); diff --git a/Classes/Module/Statistics.php b/Classes/Module/Statistics.php index cfc1c2a3a..d874721fe 100644 --- a/Classes/Module/Statistics.php +++ b/Classes/Module/Statistics.php @@ -21,9 +21,9 @@ use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\MathUtility; use TYPO3\CMS\Core\Messaging\FlashMessage; -use TYPO3\CMS\Core\Messaging\FlashMessageService; use TYPO3\CMS\Backend\Utility\IconUtility; use DirectMailTeam\DirectMail\DirectMailUtility; +use DirectMailTeam\DirectMail\Utility\FlashMessageRenderer; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; @@ -77,10 +77,6 @@ class Statistics extends \TYPO3\CMS\Backend\Module\BaseScriptClass */ protected $iconFactory; - /** @var FlashMessageService $flashMessageService */ - protected $flashMessageService; - protected $defaultFlashMessageQueue; - /** * The name of the module * @@ -110,10 +106,6 @@ public function init() // initialize IconFactory $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class); - // initialize FlashMessageService - $this->flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class); - $this->defaultFlashMessageQueue = $this->flashMessageService->getMessageQueueByIdentifier(); - // get TS Params $temp = BackendUtility::getModTSconfig($this->id, 'mod.web_modules.dmail'); if (!is_array($temp['properties'])) { @@ -266,8 +258,7 @@ function jumpToUrlD(URL) { // $this->getLanguageService()->getLL('dmail_newsletters'), FlashMessage::WARNING ); - $this->defaultFlashMessageQueue->enqueue($flashMessage); - $markers['FLASHMESSAGES'] = $this->defaultFlashMessageQueue->renderFlashMessages(); + $markers['FLASHMESSAGES'] = GeneralUtility::makeInstance(FlashMessageRenderer::class)->render($flashMessage); } } else { $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', @@ -275,8 +266,7 @@ function jumpToUrlD(URL) { // $this->getLanguageService()->getLL('header_stat'), FlashMessage::WARNING ); - $this->defaultFlashMessageQueue->enqueue($flashMessage); - $markers['FLASHMESSAGES'] = $this->defaultFlashMessageQueue->renderFlashMessages(); + $markers['FLASHMESSAGES'] = GeneralUtility::makeInstance(FlashMessageRenderer::class)->render($flashMessage); $markers['CONTENT'] = '

' . $this->getLanguageService()->getLL('stats_overview_header') . '

'; } diff --git a/Classes/SelectCategories.php b/Classes/SelectCategories.php index 9bce6fb8d..7451ba386 100644 --- a/Classes/SelectCategories.php +++ b/Classes/SelectCategories.php @@ -16,7 +16,6 @@ use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; use TYPO3\CMS\Core\Utility\GeneralUtility; -use DirectMailTeam\DirectMail; /** * Localize categories for backend forms diff --git a/Classes/Utility/FlashMessageRenderer.php b/Classes/Utility/FlashMessageRenderer.php new file mode 100644 index 000000000..393b929d6 --- /dev/null +++ b/Classes/Utility/FlashMessageRenderer.php @@ -0,0 +1,51 @@ + + * + * @package TYPO3 + * @subpackage tx_directmail + */ +class FlashMessageRenderer +{ + /** + * @param FlashMessage $flashMessage + * + * @return string + */ + public function render(FlashMessage $flashMessage) { + if (version_compare(TYPO3_branch, '8.6', '>=')) { + return GeneralUtility::makeInstance(FlashMessageRendererResolver::class) + ->resolve() + ->render([$flashMessage]); + } + if (version_compare(TYPO3_branch, '8.0', '>=')) { + return $flashMessage->getMessageAsMarkup(); + } + if (version_compare(TYPO3_branch, '7.6', '>=')) { + return $flashMessage->render(); + } + return ''; + } +} From b9c3ead3b96b433fe8502790ad10c04befd83b88 Mon Sep 17 00:00:00 2001 From: Pat Date: Mon, 16 Oct 2017 11:19:07 +0200 Subject: [PATCH 49/56] [BUGFIX] fix typo3/cms-core version range in composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 3d289d57d..d18b86590 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "issues": "https://forge.typo3.org/projects/extension-direct_mail" }, "require": { - "typo3/cms-core": ">=7.6,<8.0", + "typo3/cms-core": ">=7.6,<9.0", "typo3-ter/jumpurl": ">=7.6", "typo3-ter/tt-address": "^3.2" }, From f7443092ff133205fe78012b958eb3cd113ef98e Mon Sep 17 00:00:00 2001 From: theorak Date: Wed, 18 Oct 2017 16:33:33 +0200 Subject: [PATCH 50/56] [BUGFIX] fixed required packages names and versions --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index d18b86590..9c4289e00 100644 --- a/composer.json +++ b/composer.json @@ -23,8 +23,8 @@ }, "require": { "typo3/cms-core": ">=7.6,<9.0", - "typo3-ter/jumpurl": ">=7.6", - "typo3-ter/tt-address": "^3.2" + "friendsoftypo3/jumpurl": ">=7.6", + "friendsoftypo3/tt-address": "^4.0" }, "autoload": { "psr-4": { From 83af45062ba2f55dee9de1bf0c0f2e4ffd86d075 Mon Sep 17 00:00:00 2001 From: theorak Date: Wed, 18 Oct 2017 17:35:10 +0200 Subject: [PATCH 51/56] fixed typo for f744309 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 9c4289e00..0c6d3fbb8 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "require": { "typo3/cms-core": ">=7.6,<9.0", "friendsoftypo3/jumpurl": ">=7.6", - "friendsoftypo3/tt-address": "^4.0" + "friendsoftypo3/tt-address": ">=4.0" }, "autoload": { "psr-4": { From e27e09c71c47988b2a5921943f1d894cece2cc90 Mon Sep 17 00:00:00 2001 From: Ivan Kartolo Date: Fri, 20 Oct 2017 10:53:40 +0200 Subject: [PATCH 52/56] [BUGFIX] set the mailing date and time correctly See #83 --- Classes/Module/Dmail.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Module/Dmail.php b/Classes/Module/Dmail.php index 64fef59f9..b3eb31ece 100644 --- a/Classes/Module/Dmail.php +++ b/Classes/Module/Dmail.php @@ -1080,7 +1080,7 @@ public function cmd_send_mail($row) $result = $this->cmd_compileMailGroup($recipientGroups); $queryInfo = $result['queryInfo']; - $distributionTime = strtotime(GeneralUtility::_GP('send_mail_datetime')); + $distributionTime = strtotime(GeneralUtility::_GP('send_mail_datetime_hr')); if ($distributionTime < time()) { $distributionTime = time(); } From 82b241ab8877134858d68e4274fe73a04104ac01 Mon Sep 17 00:00:00 2001 From: Pat Date: Fri, 20 Oct 2017 12:15:53 +0200 Subject: [PATCH 53/56] [BUGFIX] fix required package versions --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 0c6d3fbb8..35d44f905 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "require": { "typo3/cms-core": ">=7.6,<9.0", "friendsoftypo3/jumpurl": ">=7.6", - "friendsoftypo3/tt-address": ">=4.0" + "friendsoftypo3/tt-address": ">=3.2.2" }, "autoload": { "psr-4": { From 5a5db3f211a4a9126b7b2dff294cd9313d2b18ea Mon Sep 17 00:00:00 2001 From: Ivan Kartolo Date: Fri, 20 Oct 2017 13:39:00 +0200 Subject: [PATCH 54/56] [Release] Release 5.2.2. --- ext_emconf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext_emconf.php b/ext_emconf.php index cf92266d2..df0c9681e 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -15,7 +15,7 @@ 'description' => 'Advanced Direct Mail/Newsletter mailer system with sophisticated options for personalization of emails including response statistics.', 'category' => 'module', 'shy' => 0, - 'version' => '5.2.1', + 'version' => '5.2.2', 'dependencies' => 'cms,tt_address', 'conflicts' => 'sr_direct_mail_ext,it_dmail_fix,plugin_mgm,direct_mail_123', 'priority' => '', From 3a70924777294c7fb40e9f6eb3f7627bac58dfd1 Mon Sep 17 00:00:00 2001 From: Ivan Kartolo Date: Tue, 15 Oct 2019 08:19:18 +0200 Subject: [PATCH 55/56] Security fix release --- Classes/DirectMailUtility.php | 16 +++++++++++++--- Resources/Private/Language/locallang_mod2-6.xlf | 3 +++ ext_emconf.php | 2 +- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/Classes/DirectMailUtility.php b/Classes/DirectMailUtility.php index 9d6477a3f..2d3b6351b 100644 --- a/Classes/DirectMailUtility.php +++ b/Classes/DirectMailUtility.php @@ -819,6 +819,10 @@ public static function getRecordList(array $listArr, $table, $pageId, $editLinkF // init iconFactory $iconFactory = GeneralUtility::makeInstance(IconFactory::class); + $isAllowedDisplayTable = $GLOBALS['BE_USER']->check('tables_select', $table); + $isAllowedEditTable = $GLOBALS['BE_USER']->check('tables_modify', $table); + $notAllowedPlaceholder = $GLOBALS['LANG']->getLL('mailgroup_table_disallowed_placeholder'); + if (is_array($listArr)) { $count = count($listArr); $returnUrl = GeneralUtility::getIndpEnv('REQUEST_URI'); @@ -827,7 +831,7 @@ public static function getRecordList(array $listArr, $table, $pageId, $editLinkF $editLink = ''; if ($row['uid']) { $tableIcon = '
'; - if ($editLinkFlag) { + if ($editLinkFlag && $isAllowedEditTable) { $urlParameters = [ 'edit' => [ $table => [ @@ -842,11 +846,17 @@ public static function getRecordList(array $listArr, $table, $pageId, $editLinkF } } + if ($isAllowedDisplayTable) { + $exampleData = ' + '; + } else { + $exampleData = ''; + } + $lines[]=' ' . $tableIcon . ' ' . $editLink . ' - - + ' . $exampleData . ' '; } } diff --git a/Resources/Private/Language/locallang_mod2-6.xlf b/Resources/Private/Language/locallang_mod2-6.xlf index 06dae8bec..3572f1288 100644 --- a/Resources/Private/Language/locallang_mod2-6.xlf +++ b/Resources/Private/Language/locallang_mod2-6.xlf @@ -592,6 +592,9 @@ Website User Table + + Missing permission to display data + Assign categories to content elements diff --git a/ext_emconf.php b/ext_emconf.php index df0c9681e..9491b240f 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -15,7 +15,7 @@ 'description' => 'Advanced Direct Mail/Newsletter mailer system with sophisticated options for personalization of emails including response statistics.', 'category' => 'module', 'shy' => 0, - 'version' => '5.2.2', + 'version' => '5.2.3', 'dependencies' => 'cms,tt_address', 'conflicts' => 'sr_direct_mail_ext,it_dmail_fix,plugin_mgm,direct_mail_123', 'priority' => '', From d44c7f57ef0684e420e2193bf53ed127ce04d1f1 Mon Sep 17 00:00:00 2001 From: Ruud Silvrants Date: Wed, 8 Jan 2020 09:02:43 +0100 Subject: [PATCH 56/56] [BUGFIX] Fallback to url if the name can't be received As an response of an url breaks, the statics page can't be load. Therefore fallback to the url. --- Classes/Module/Statistics.php | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/Classes/Module/Statistics.php b/Classes/Module/Statistics.php index 5c74de3ca..f592be857 100644 --- a/Classes/Module/Statistics.php +++ b/Classes/Module/Statistics.php @@ -1414,15 +1414,19 @@ public function getLinkLabel($url, $urlStr, $forceFetch = false, $linkedWord = ' $url = $pathSite . $url; } - $content = GeneralUtility::getURL($url); - - if (preg_match('/\<\s*title\s*\>(.*)\<\s*\/\s*title\s*\>/i', $content, $matches)) { - // get the page title - $contentTitle = GeneralUtility::fixed_lgd_cs(trim($matches[1]), 50); - } else { - // file? - $file = GeneralUtility::split_fileref($url); - $contentTitle = $file['file']; + try { + $content = GeneralUtility::getURL($url); + if (preg_match('/\<\s*title\s*\>(.*)\<\s*\/\s*title\s*\>/i', $content, $matches)) { + // get the page title + $contentTitle = GeneralUtility::fixed_lgd_cs(trim($matches[1]), 50); + } else { + // file? + $file = GeneralUtility::split_fileref($url); + $contentTitle = $file['file']; + } + } catch (\Exception $e) { + //When the url can't be retrieved, set the title to the url + $contentTitle = $url; } }
 ' . $this->getLanguageService()->getLL('stats_overview_total_sent') . ' ' . $this->getLanguageService()->getLL('stats_overview_status') . '
' . $this->iconFactory->getIconForRecord('sys_dmail', $row, Icon::SIZE_SMALL)->render() . ' ' . $this->linkDMail_record(GeneralUtility::fixed_lgd_cs($row['subject'], 30) . ' ', $row['uid'], $row['subject']) . '  ' . BackendUtility::datetime($row["scheduled"]) . '' . ($row["scheduled_begin"]?BackendUtility::datetime($row["scheduled_begin"]):' ') . '' . ($row["scheduled_end"]?BackendUtility::datetime($row["scheduled_end"]):' ') . '' . BackendUtility::datetime($row['scheduled']) . '' . ($row['scheduled_begin']?BackendUtility::datetime($row['scheduled_begin']):' ') . '' . ($row['scheduled_end']?BackendUtility::datetime($row['scheduled_end']):' ') . ' ' . ($count?$count:' ') . ' ' . $sent . '
' . $iconFactory->getIconForRecord($table, array()) . ' ' . htmlspecialchars($row['email']) . ' ' . htmlspecialchars($row['name']) . ' ' . $notAllowedPlaceholder . '
' . htmlspecialchars($row['email']) . ' ' . htmlspecialchars($row['name']) . '