Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/units/languages/languages_item.php
Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Line(s) | |||||
*/ | */ | ||||
function copyMissingData($from_language) | function copyMissingData($from_language) | ||||
{ | { | ||||
if ( !is_numeric($from_language) || ($from_language == $this->GetID()) ) { | if ( !is_numeric($from_language) || ($from_language == $this->GetID()) ) { | ||||
// invalid or same language | // invalid or same language | ||||
return ; | return ; | ||||
} | } | ||||
/** @var kMultiLanguageHelper $ml_helper */ | |||||
$ml_helper = $this->Application->recallObject('kMultiLanguageHelper'); | $ml_helper = $this->Application->recallObject('kMultiLanguageHelper'); | ||||
/* @var $ml_helper kMultiLanguageHelper */ | |||||
$to_language = $this->GetID(); | $to_language = $this->GetID(); | ||||
$this->Application->UnitConfigReader->ReReadConfigs(); | $this->Application->UnitConfigReader->ReReadConfigs(); | ||||
foreach ($this->Application->UnitConfigReader->configData as $prefix => $config_data) { | foreach ($this->Application->UnitConfigReader->configData as $prefix => $config_data) { | ||||
$ml_helper->copyMissingData($prefix, $from_language, $to_language); | $ml_helper->copyMissingData($prefix, $from_language, $to_language); | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 209 Lines • ▼ Show 20 Line(s) | |||||
if ($available_languages) { | if ($available_languages) { | ||||
return strpos($available_languages, '|' .$id . '|') !== false; | return strpos($available_languages, '|' .$id . '|') !== false; | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
} | } | ||||
No newline at end of file | No newline at end of file |