| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 32 | 2 | 1 | 0.999 | statement_sequence[2] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 32 | 149 | administrator/components/com_media/controllers/file.php |
| 2 | 32 | 51 | administrator/components/com_media/controllers/folder.php |
| ||||
if (count($paths)) {
foreach ($paths as $path)
{
if ($path !== JFile::makeSafe($path)) {
JError::raiseWarning(100, JText::_('Unable to delete:')
. htmlspecialchars($path, ENT_COMPAT, 'UTF-8')
. ' '
. JText::_('WARNFILENAME'));
continue;
}
$fullPath= JPath::clean(COM_MEDIA_BASE
. DS
. $folder
. DS
. $path);
if (is_file($fullPath)) {
$ret |= !JFile::delete($fullPath);
}
else if (is_dir($fullPath)) {
$files= JFolder::files($fullPath, '.', TRUE);
$canDelete= TRUE;
foreach ($files as $file) {
if ($file != 'index.html') {
$canDelete= FALSE;
}
}
if ($canDelete) {
$ret |= !JFolder::delete($fullPath);
}
else {
JError::raiseWarning(100, JText::_('Unable to delete:')
. $fullPath
. ' '
. JText::_('Not Empty!'));
}
}
}
}
if ($tmpl == 'component') {
// We are inside the iframe
$mainframe->redirect('index.php?option=com_media&view=mediaList&folder='
. $folder
. '&tmpl=component');
}
else {
$mainframe->redirect('index.php?option=com_media&folder='
. $folder);
}
|
| ||||
if (count($paths)) {
foreach ($paths as $path)
{
if ($path !== JFile::makeSafe($path)) {
JError::raiseWarning(100, JText::_('Unable to delete:')
. htmlspecialchars($path, ENT_COMPAT, 'UTF-8')
. ' '
. JText::_('WARNDIRNAME'));
continue;
}
$fullPath= JPath::clean(COM_MEDIA_BASE
. DS
. $folder
. DS
. $path);
if (is_file($fullPath)) {
$ret |= !JFile::delete($fullPath);
}
else if (is_dir($fullPath)) {
$files= JFolder::files($fullPath, '.', TRUE);
$canDelete= TRUE;
foreach ($files as $file) {
if ($file != 'index.html') {
$canDelete= FALSE;
}
}
if ($canDelete) {
$ret |= !JFolder::delete($fullPath);
}
else {
JError::raiseWarning(100, JText::_('Unable to delete:')
. $fullPath
. ' '
. JText::_('Not Empty!'));
}
}
}
}
if ($tmpl == 'component') {
// We are inside the iframe
$mainframe->redirect('index.php?option=com_media&view=mediaList&folder='
. $folder
. '&tmpl=component');
}
else {
$mainframe->redirect('index.php?option=com_media&folder='
. $folder);
}
|
| |||
if (count($paths)) {
foreach ($paths as $path) {
if ($path !== JFile::makeSafe($path)) {
JError::raiseWarning(100,JText::_('Unable to delete:')
. htmlspecialchars($path,ENT_COMPAT,'UTF-8')
. ' '
. JText::_( [[#variable588cce00]]));
continue;
}
$fullPath=JPath::clean(COM_MEDIA_BASE
. DS
. $folder
. DS
. $path);
if (is_file($fullPath)) {
$ret |= !JFile::delete($fullPath);
}
else if (is_dir($fullPath)) {
$files=JFolder::files($fullPath,'.',TRUE);
$canDelete=TRUE;
foreach ($files as $file) {
if ($file != 'index.html') {
$canDelete=FALSE;
}
}
if ($canDelete) {
$ret |= !JFolder::delete($fullPath);
}
else {
JError::raiseWarning(100,JText::_('Unable to delete:')
. $fullPath
. ' '
. JText::_('Not Empty!'));
}
}
}
}
if ($tmpl == 'component') {
// We are inside the iframe
$mainframe->redirect('index.php?option=com_media&view=mediaList&folder='
. $folder
. '&tmpl=component');
}
else {
$mainframe->redirect('index.php?option=com_media&folder='
. $folder);
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#588cce00]] | 'WARNFILENAME' |
| 1 | 2 | [[#588cce00]] | 'WARNDIRNAME' |