| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 27 | 2 | 0 | 1.000 | statement_sequence[2] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 27 | 767 | libraries/joomla/installer/installer.php |
| 2 | 27 | 959 | libraries/joomla/installer/installer.php |
| ||||
// Process each file in the $files array (children of $tagName).
foreach ($files as $file)
{
$path['src']= $source
. DS
. $file->data();
$path['dest']= $destination
. DS
. $file->data();
// Is this path a file or folder?
$path['type']= ($file->name() == 'folder')
? 'folder'
: 'file';
/*
* Before we can add a file to the copyfiles array we need to ensure
* that the folder we are copying our file to exits and if it doesn't,
* we need to create it.
*/
if (basename($path['dest']) != $path['dest']) {
$newdir= dirname($path['dest']);
if (!JFolder::create($newdir)) {
JError::raiseWarning(1, 'JInstaller::install: '
. JText::_('Failed to create directory')
. ' "'
. $newdir
. '"');
return FALSE;
}
}
// Add the file to the copyfiles array
$copyfiles[]= $path;
}
return $this->copyFiles($copyfiles);
|
| ||||
// Process each file in the $files array (children of $tagName).
foreach ($files as $file)
{
$path['src']= $source
. DS
. $file->data();
$path['dest']= $destination
. DS
. $file->data();
// Is this path a file or folder?
$path['type']= ($file->name() == 'folder')
? 'folder'
: 'file';
/*
* Before we can add a file to the copyfiles array we need to ensure
* that the folder we are copying our file to exits and if it doesn't,
* we need to create it.
*/
if (basename($path['dest']) != $path['dest']) {
$newdir= dirname($path['dest']);
if (!JFolder::create($newdir)) {
JError::raiseWarning(1, 'JInstaller::install: '
. JText::_('Failed to create directory')
. ' "'
. $newdir
. '"');
return FALSE;
}
}
// Add the file to the copyfiles array
$copyfiles[]= $path;
}
return $this->copyFiles($copyfiles);
|
| |||
// Process each file in the $files array (children of $tagName).
foreach ($files as $file) {
$path['src']=$source
. DS
. $file->data();
$path['dest']=$destination
. DS
. $file->data();
// Is this path a file or folder?
$path['type']=($file->name() == 'folder')
? 'folder'
: 'file';
/*
* Before we can add a file to the copyfiles array we need to ensure
* that the folder we are copying our file to exits and if it doesn't,
* we need to create it.
*/
if (basename($path['dest']) != $path['dest']) {
$newdir=dirname($path['dest']);
if (!JFolder::create($newdir)) {
JError::raiseWarning(1,'JInstaller::install: '
. JText::_('Failed to create directory')
. ' "'
. $newdir
. '"');
return FALSE;
}
}
// Add the file to the copyfiles array
$copyfiles[]=$path;
}
return $this->copyFiles($copyfiles);
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| None | |||