/** * check if the translation is cached * * @return bool */ function checkInCache() { static $locales; if (!$locales) { $locales = CAppUI::flattenCachedLocales(CAppUI::$lang); } return $this->_in_cache = isset($locales[$this->source]) && $locales[$this->source] == $this->translation; }
preg_match('#^//(\\d+)#', fgets($fp), $v); if ($v[1] < $version['build']) { CAppUI::stepAjax("Locales-javascript-cache-ko", UI_MSG_WARNING, $localeName); fclose($fp); continue; } if (null == SHM::get("locales-{$localeName}-" . CAppUI::LOCALES_PREFIX)) { CAppUI::stepAjax("Locales-shm-none", UI_MSG_OK, $localeName); continue; } // Load overwritten locales if the table exists $overwrite = new CTranslationOverwrite(); if ($overwrite->isInstalled()) { $locales = $overwrite->transformLocales($locales); } $cached_locales = CAppUI::flattenCachedLocales($localeName); if ($cached_locales != $locales) { CAppUI::stepAjax("Locales-shm-ko", UI_MSG_WARNING, $localeName); continue; } CAppUI::stepAjax("Locales-shm-ok", UI_MSG_OK, $localeName); } // Not used yet (because of PHP 5.1) //if (null == SHM::get("modules")) { // CAppUI::stepAjax("Modules-shm-none", UI_MSG_OK); //} ////////// Configuration model $cache_status = CConfiguration::getModelCacheStatus(); switch ($cache_status) { case "empty": CAppUI::stepAjax("ConfigModel-shm-none", UI_MSG_OK);
<?php /** * $Id$ * * @package Mediboard * @subpackage developpement * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision$ */ CCanDo::checkRead(); $locales = CAppUI::flattenCachedLocales(CAppUI::$lang); $tabs = array(); foreach ($modules = CModule::getInstalled() as $module) { CAppUI::requireModuleFile($module->mod_name, "index"); if (is_array($module->_tabs)) { foreach ($module->_tabs as $tab) { $tabs[$tab]["name"] = "mod-{$module->mod_name}-tab-{$tab}"; $tabs[$tab]["locale"] = CValue::read($locales, $tabs[$tab]["name"]); } } } // Création du template $smarty = new CSmartyDP(); $smarty->assign("module", $modules); $smarty->assign("tabs", $tabs); $smarty->display("mnt_module_actions.tpl");