Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
25 | 2 | 4 | 0.980 | class_member |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 23 | 997 | libraries/phpmailer/phpmailer.php |
2 | 25 | 1275 | libraries/phpmailer/phpmailer.php |
| ||||
///////////////////////////////////////////////// // ATTACHMENT METHODS ///////////////////////////////////////////////// /** * Adds an attachment from a path on the filesystem. * Returns false if the file could not be found * or accessed. * @param string $path Path to the attachment. * @param string $name Overrides the attachment name. * @param string $encoding File encoding (see $Encoding). * @param string $type File extension (MIME) type. * @return bool */ function AddAttachment($path, $name= "", $encoding= "base64", $type= "application/octet-stream") { if (!@is_file($path)) { $this->SetError($this->Lang("file_access") . $path); return FALSE; } $filename= basename($path); if ($name == "") $name= $filename; $cur= count($this->attachment); $this->attachment[$cur][0]= $path; $this->attachment[$cur][1]= $filename; $this->attachment[$cur][2]= $name; $this->attachment[$cur][3]= $encoding; $this->attachment[$cur][4]= $type; $this->attachment[$cur][5]= FALSE; // isStringAttachment $this->attachment[$cur][6]= "attachment"; $this->attachment[$cur][7]= 0; return TRUE; } |
| ||||
/** * Adds an embedded attachment. This can include images, sounds, and * just about any other document. Make sure to set the $type to an * image type. For JPEG images use "image/jpeg" and for GIF images * use "image/gif". * @param string $path Path to the attachment. * @param string $cid Content ID of the attachment. Use this to identify * the Id for accessing the image in an HTML form. * @param string $name Overrides the attachment name. * @param string $encoding File encoding (see $Encoding). * @param string $type File extension (MIME) type. * @return bool */ function AddEmbeddedImage($path, $cid, $name= "", $encoding= "base64", $type= "application/octet-stream") { if (!@is_file($path)) { $this->SetError($this->Lang("file_access") . $path); return FALSE; } $filename= basename($path); if ($name == "") $name= $filename; // Append to $attachment array $cur= count($this->attachment); $this->attachment[$cur][0]= $path; $this->attachment[$cur][1]= $filename; $this->attachment[$cur][2]= $name; $this->attachment[$cur][3]= $encoding; $this->attachment[$cur][4]= $type; $this->attachment[$cur][5]= FALSE; // isStringAttachment $this->attachment[$cur][6]= "inline"; $this->attachment[$cur][7]= $cid; return TRUE; } |
| |||
/** * Adds an embedded attachment. This can include images, sounds, and * just about any other document. Make sure to set the $type to an * image type. For JPEG images use "image/jpeg" and for GIF images * use "image/gif". * @param string $path Path to the attachment. * @param string $cid Content ID of the attachment. Use this to identify * the Id for accessing the image in an HTML form. * @param string $name Overrides the attachment name. * @param string $encoding File encoding (see $Encoding). * @param string $type File extension (MIME) type. * @return bool */ ///////////////////////////////////////////////// // ATTACHMENT METHODS ///////////////////////////////////////////////// /** * Adds an attachment from a path on the filesystem. * Returns false if the file could not be found * or accessed. * @param string $path Path to the attachment. * @param string $name Overrides the attachment name. * @param string $encoding File encoding (see $Encoding). * @param string $type File extension (MIME) type. * @return bool */ function [[#variable23178240]]( [[#variable231781e0]],$name="",$encoding="base64",$type="application/octet-stream") { if (!@is_file($path)) { $this->SetError($this->Lang("file_access") . $path); return FALSE; } $filename=basename($path); if ($name == "") $name=$filename; // Append to $attachment array $cur=count($this->attachment); $this->attachment[$cur][0]=$path; $this->attachment[$cur][1]=$filename; $this->attachment[$cur][2]=$name; $this->attachment[$cur][3]=$encoding; $this->attachment[$cur][4]=$type; $this->attachment[$cur][5]=FALSE; // isStringAttachment $this->attachment[$cur][6]= [[#variable23178180]]; $this->attachment[$cur][7]= [[#variable231780a0]]; return TRUE; } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#23178240]] | AddEmbeddedImage |
1 | 2 | [[#23178240]] | AddAttachment |
2 | 1 | [[#231781e0]] | $path,$cid |
2 | 2 | [[#231781e0]] | $path |
3 | 1 | [[#23178180]] | "inline" |
3 | 2 | [[#23178180]] | "attachment" |
4 | 1 | [[#231780a0]] | $cid |
4 | 2 | [[#231780a0]] | 0 |