| 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 | class_member |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 32 | 46 | administrator/includes/application.php |
| 2 | 31 | 42 | includes/application.php |
| ||||
/**
* Initialise the application.
*
* @access public
* @param array An optional associative array of configuration settings.
*/
function initialise($options= array()) {
$config= &JFactory::getConfig();
// if a language was specified it has priority
// otherwise use user or default language settings
if (empty($options['language']))
{
$user= & JFactory::getUser();
$lang= $user->getParam('admin_language');
// Make sure that the user's language exists
if ($lang
&& JLanguage::exists($lang)) {
$options['language']= $lang;
}
else {
$params= JComponentHelper::getParams('com_languages');
$client= &JApplicationHelper::getClientInfo($this->getClientId());
$options['language']= $params->get($client->name ,$config->getValue('config.language','en-GB'));
}
}
// One last check to make sure we have something
if (! JLanguage::exists($options['language'])) {
$lang= $config->getValue('config.language','en-GB');
if (JLanguage::exists($lang)) {
$options['language']= $lang;
}
else {
$options['language']= 'en-GB'; // as a last ditch fail to english
}
}
parent::initialise($options);
}
|
| ||||
/**
* Initialise the application.
*
* @access public
*/
function initialise($options= array()) {
$config= & JFactory::getConfig();
// if a language was specified it has priority
// otherwise use user or default language settings
if (empty($options['language']))
{
$user= & JFactory::getUser();
$lang= $user->getParam('language');
// Make sure that the user's language exists
if ($lang
&& JLanguage::exists($lang)) {
$options['language']= $lang;
}
else {
$params= JComponentHelper::getParams('com_languages');
$client= &JApplicationHelper::getClientInfo($this->getClientId());
$options['language']= $params->get($client->name ,$config->getValue('config.language','en-GB'));
}
}
// One last check to make sure we have something
if (! JLanguage::exists($options['language'])) {
$lang= $config->getValue('config.language','en-GB');
if (JLanguage::exists($lang)) {
$options['language']= $lang;
}
else {
$options['language']= 'en-GB'; // as a last ditch fail to english
}
}
parent::initialise($options);
}
|
| |||
/**
* Initialise the application.
*
* @access public
* @param array An optional associative array of configuration settings.
*/
/**
* Initialise the application.
*
* @access public
*/
function initialise($options=array()) {
$config= &JFactory::getConfig();
// if a language was specified it has priority
// otherwise use user or default language settings
if (empty($options['language'])) {
$user= &JFactory::getUser();
$lang=$user->getParam( [[#variable41d871c0]]);
// Make sure that the user's language exists
if ($lang
&& JLanguage::exists($lang)) {
$options['language']=$lang;
}
else {
$params=JComponentHelper::getParams('com_languages');
$client= &JApplicationHelper::getClientInfo($this->getClientId());
$options['language']=$params->get($client->name ,$config->getValue('config.language','en-GB'));
}
}
// One last check to make sure we have something
if (!JLanguage::exists($options['language'])) {
$lang=$config->getValue('config.language','en-GB');
if (JLanguage::exists($lang)) {
$options['language']=$lang;
}
else {
$options['language']='en-GB'; // as a last ditch fail to english
}
}
parent::initialise($options);
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#41d871c0]] | 'admin_language' |
| 1 | 2 | [[#41d871c0]] | 'language' |