CloneSet152


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
38250.959toplevel_statement_sequence[6]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
13835
administrator/components/com_media/media.php
23436
components/com_media/media.php
Clone Instance
1
Line Count
38
Source Line
35
Source File
administrator/components/com_media/media.php

$cmd=  JRequest::getCmd('task', NULL);

if (strpos($cmd, '.') != FALSE)
{
        // We have a defined controller/task pair -- lets split them out
        list ($controllerName, $task)= explode('.', $cmd);

        // Define the controller name and path
        $controllerName=  strtolower($controllerName);
        $controllerPath=  JPATH_COMPONENT
                          .               DS
                          .                  'controllers'
                          .                                DS
                          .                                   $controllerName
                          .                                                   '.php';
        // If the controller file path exists, include it ... else lets die with a 500 error
        if (file_exists($controllerPath)) {
                require_once ($controllerPath);
              }
        else   {
                JError::raiseError(500, 'Invalid Controller');
              }
      }
else {
        // Base controller, just set the task :)
        $controllerName=  NULL;
        $task=  $cmd;
      }
// Set the name for the controller and instantiate it
$controllerClass=  'MediaController'
                   .                 ucfirst($controllerName);
if (class_exists($controllerClass)) {
        $controller=  new $controllerClass();
      }
else   {
        JError::raiseError(500, 'Invalid Controller Class');
      }
// Perform the Request task
$controller->execute($task);
// Redirect if set by the controller
$controller->redirect();


Clone Instance
2
Line Count
34
Source Line
36
Source File
components/com_media/media.php

$cmd=  JRequest::getCmd('task', NULL);
if (strpos($cmd, '.') != FALSE)
{
        // We have a defined controller/task pair -- lets split them out
        list ($controllerName, $task)= explode('.', $cmd);

        // Define the controller name and path
        $controllerName=  strtolower($controllerName);
        $controllerPath=  JPATH_COMPONENT_ADMINISTRATOR
                          .                             DS
                          .                                'controllers'
                          .                                              DS
                          .                                                 $controllerName
                          .                                                                 '.php';
        // If the controller file path exists, include it ... else lets die with a 500 error
        if (file_exists($controllerPath)) {
                require_once ($controllerPath);
              }
        else   {
                JError::raiseError(500, 'Invalid Controller');
              }
      }
else {
        // Base controller, just set the task :)
        $controllerName=  NULL;
        $task=  $cmd;
      }
// Set the name for the controller and instantiate it
$controllerClass=  'MediaController'
                   .                 ucfirst($controllerName);
if (class_exists($controllerClass)) {
        $controller=  new $controllerClass();
      }
else   {
        JError::raiseError(500, 'Invalid Controller Class');
      }
// Set the model and view paths to the administrator folders
$controller->addViewPath(JPATH_COMPONENT_ADMINISTRATOR
                         .                             DS
                         .                                'views');
$controller->addModelPath(JPATH_COMPONENT_ADMINISTRATOR
                          .                             DS
                          .                                'models');


Clone AbstractionParameter Count: 5Parameter Bindings

$cmd=JRequest::getCmd('task',NULL);
if (strpos($cmd,'.') != FALSE) {
  // We have a defined controller/task pair -- lets split them out
  list ($controllerName,$task)=explode('.',$cmd);
  // Define the controller name and path
  $controllerName=strtolower($controllerName);
  $controllerPath= [[#variable21c5dfe0]]
                  . DS
                  . 'controllers'
                  . DS
                  . $controllerName
                  . '.php';
  // If the controller file path exists, include it ... else lets die with a 500 error
  if (file_exists($controllerPath)) {
    require_once ($controllerPath);
  }
  else {
    JError::raiseError(500,'Invalid Controller');
  }
}
else {
  // Base controller, just set the task :)
  $controllerName=NULL;
  $task=$cmd;
}
// Set the name for the controller and instantiate it
$controllerClass='MediaController'
                 . ucfirst($controllerName);
if (class_exists($controllerClass)) {
  $controller=new $controllerClass();
}
else {
  JError::raiseError(500,'Invalid Controller Class');
}
// Perform the Request task
// Set the model and view paths to the administrator folders
$controller-> [[#variable21c5df40]]( [[#variable21c5dd60]]);
// Redirect if set by the controller
$controller-> [[#variable21c5df00]]( [[#variable23991500]]);
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#21c5dfe0]]
JPATH_COMPONENT 
12[[#21c5dfe0]]
JPATH_COMPONENT_ADMINISTRATOR 
21[[#21c5df40]]
execute 
22[[#21c5df40]]
addViewPath 
31[[#21c5dd60]]
$task 
32[[#21c5dd60]]
JPATH_COMPONENT_ADMINISTRATOR
. DS
. 'views' 
41[[#21c5df00]]
redirect 
42[[#21c5df00]]
addModelPath 
51[[#23991500]]
52[[#23991500]]
JPATH_COMPONENT_ADMINISTRATOR
. DS
. 'models'