| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 38 | 2 | 5 | 0.959 | toplevel_statement_sequence[6] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 38 | 35 | administrator/components/com_media/media.php |
| 2 | 34 | 36 | 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();
|
| ||||
$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');
|
| |||
$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 Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#21c5dfe0]] | JPATH_COMPONENT |
| 1 | 2 | [[#21c5dfe0]] | JPATH_COMPONENT_ADMINISTRATOR |
| 2 | 1 | [[#21c5df40]] | execute |
| 2 | 2 | [[#21c5df40]] | addViewPath |
| 3 | 1 | [[#21c5dd60]] | $task |
| 3 | 2 | [[#21c5dd60]] | JPATH_COMPONENT_ADMINISTRATOR . DS . 'views' |
| 4 | 1 | [[#21c5df00]] | redirect |
| 4 | 2 | [[#21c5df00]] | addModelPath |
| 5 | 1 | [[#23991500]] | |
| 5 | 2 | [[#23991500]] | JPATH_COMPONENT_ADMINISTRATOR . DS . 'models' |