Esempio n. 1
0
 if ($geocache->getWatchingUsersCount() > 0) {
     tpl_set_var('cache_watcher', mb_ereg_replace('{watcher}', htmlspecialchars($geocache->getWatchingUsersCount(), ENT_COMPAT, 'UTF-8'), isset($cache_watchers) ? $cache_watchers : 10));
 }
 tpl_set_var('owner_name', htmlspecialchars($geocache->getOwner()->getUserName(), ENT_COMPAT, 'UTF-8'));
 tpl_set_var('userid_urlencode', htmlspecialchars(urlencode($geocache->getOwner()->getUserId()), ENT_COMPAT, 'UTF-8'));
 if ($geocache->getFounder() == null || $geocache->getFounder() == $geocache->getOwner()->getUserId()) {
     tpl_set_var('creator_name_start', '<!--');
     tpl_set_var('creator_name_end', '-->');
 } else {
     tpl_set_var('creator_name_start', '');
     tpl_set_var('creator_name_end', '');
     tpl_set_var('creator_userid', $geocache->getFounder()->getUserId());
     tpl_set_var('creator_name', htmlspecialchars($geocache->getFounder()->getUserName(), ENT_COMPAT, 'UTF-8'));
 }
 //get description languages
 $desclangs = mb_split(',', $geocache->getDescLanguagesList());
 // use cache desc in lang of interface by default
 $desclang = mb_strtoupper($lang);
 // check if there is a desc in current lang
 if (array_search($desclang, $desclangs) === false) {
     $desclang = $desclangs[0];
     $enable_google_translation = true;
     //no desc in current lang - enable translation
 }
 // check if user requests other lang of cache desc...
 if (isset($_REQUEST['desclang']) && array_search($_REQUEST['desclang'], $desclangs)) {
     $desclang = $_REQUEST['desclang'];
     $enable_google_translation = false;
     //user wants this lang - disable translations
 }
 if (!OcConfig::instance()->isGoogleTranslationEnabled()) {