Page MenuHomeIn-Portal Phabricator

D191.diff
No OneTemporary

File Metadata

Created
Sun, Jun 29, 9:52 AM

D191.diff

Index: branches/5.2.x/core/kernel/utility/email_send.php
===================================================================
--- branches/5.2.x/core/kernel/utility/email_send.php
+++ branches/5.2.x/core/kernel/utility/email_send.php
@@ -610,6 +610,24 @@
}
/**
+ * Detects if such part already was added.
+ *
+ * @param array $part_definition Part definition.
+ *
+ * @return boolean
+ */
+ protected function HasPart(array $part_definition)
+ {
+ foreach ( $this->parts as $part ) {
+ if ( $part === $part_definition ) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
* Returns text version of HTML document
*
* @param string $html
@@ -780,6 +798,11 @@
}
$definition =& $this->GetFileDefinition($definition);
+
+ if ( $this->HasPart($definition) ) {
+ return false;
+ }
+
$part_number = $this->AddPart($definition);
if ($inline) {

Event Timeline