Skip to content

Commit b0191fc

Browse files
author
mcramer
committed
Bugfix: Attachments were not cleaned up on finish() call of mail class (next recipient gets all attachments, too)
Update: some import tests for plesk
1 parent c8ccbfb commit b0191fc

File tree

4 files changed

+88
-53
lines changed

4 files changed

+88
-53
lines changed

interface/lib/classes/db_mysql.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,10 +461,10 @@ public function getTables($database_name = '') {
461461

462462
function tableInfo($table_name) {
463463

464-
global $go_api,$go_info;
464+
global $go_api,$go_info,$app;
465465
// Tabellenfelder einlesen
466466

467-
if($rows = $go_api->db->queryAllRecords('SHOW FIELDS FROM '.$table_name)){
467+
if($rows = $app->db->queryAllRecords('SHOW FIELDS FROM '.$table_name)){
468468
foreach($rows as $row) {
469469
$name = $row[0];
470470
$default = $row[4];

interface/lib/classes/importer.inc.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ public function fault($message = '', $text = '') {
4141
}
4242

4343
public function getFault() {
44-
return $this->faultMessage . ' (' . $this->faultText . ')';
44+
$ret = $this->faultMessage . ' (' . $this->faultText . ')';
45+
$this->faultMessage = null;
46+
$this->faultText = null;
47+
return $ret;
4548
}
4649
}
4750

interface/lib/classes/ispcmail.inc.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,25 @@ public function send($recipients) {
560560
*/
561561
public function finish() {
562562
if($this->use_smtp == true) $this->_smtp_close();
563+
564+
$rand = md5(microtime());
565+
$this->mime_boundary = '==Multipart_Boundary_x' . $rand . 'x';
566+
567+
$this->headers = array();
568+
$this->attachments = array();
569+
$this->text_part = '';
570+
$this->html_part = '';
571+
572+
$this->headers['MIME-Version'] = '1.0';
573+
574+
$this->smtp_helo = '';
575+
$this->smtp_host = '';
576+
$this->smtp_port = '';
577+
$this->smtp_user = '';
578+
$this->smtp_pass = '';
579+
$this->use_smtp = false;
580+
$this->smtp_crypt = false;
581+
$this->mail_charset = 'UTF-8';
563582
return;
564583
}
565584
}

0 commit comments

Comments
 (0)