CloneSet137


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
25240.980class_member
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
123997
libraries/phpmailer/phpmailer.php
2251275
libraries/phpmailer/phpmailer.php
Clone Instance
1
Line Count
23
Source Line
997
Source File
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;
      }


Clone Instance
2
Line Count
25
Source Line
1275
Source File
libraries/phpmailer/phpmailer.php

    /**
     * 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;
      }


Clone AbstractionParameter Count: 4Parameter Bindings

/**
     * 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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#23178240]]
AddEmbeddedImage 
12[[#23178240]]
AddAttachment 
21[[#231781e0]]
$path,$cid 
22[[#231781e0]]
$path 
31[[#23178180]]
"inline" 
32[[#23178180]]
"attachment" 
41[[#231780a0]]
$cid 
42[[#231780a0]]
0