Index: branches/RC/core/units/categories/cache_updater.php =================================================================== diff -u -r9286 -r9335 --- branches/RC/core/units/categories/cache_updater.php (.../cache_updater.php) (revision 9286) +++ branches/RC/core/units/categories/cache_updater.php (.../cache_updater.php) (revision 9335) @@ -189,6 +189,8 @@ // cache widely used values to speed up process: begin $ml_helper =& $this->Application->recallObject('kMultiLanguageHelper'); + /* @var $ml_helper kMultiLanguageHelper */ + $this->languageCount = $ml_helper->getLanguageCount(); $this->primaryLanguageId = $this->Application->GetDefaultLanguageId(); // cache widely used values to speed up process: end @@ -209,6 +211,26 @@ } } + /** + * Checks if language with specified id is created + * + * @param int $language_id + * @return bool + */ + function LanguageFound($language_id) + { + static $language_ids = null; + + if (!isset($language_ids)) { + $ml_helper =& $this->Application->recallObject('kMultiLanguageHelper'); + /* @var $ml_helper kMultiLanguageHelper */ + + $language_ids = $ml_helper->languagesIDs; + } + + return in_array($language_id, $language_ids) || $language_id <= 5; + } + function InitUpdater() { $this->Stack = new clsRecursionStack(); @@ -390,6 +412,9 @@ $i = 1; while ($i <= $this->languageCount) { + if (!$this->LanguageFound($i)) { + continue; + } $fields_hash['l'.$i.'_CachedNavbar'] = implode('&|&', $data['titles'][$i]); $i++; }