function JB_profile_tag_to_field_id_init() { global $label; global $profile_tag_to_field_id; if ($profile_tag_to_field_id = JB_cache_get('tag_to_field_id_3_' . $_SESSION['LANG'])) { return $profile_tag_to_field_id; } $fields = JB_schema_get_fields(3); // the template tag becomes the key foreach ($fields as $field) { $profile_tag_to_field_id[$field['template_tag']] = $field; } JBPLUG_do_callback('profile_tag_to_field_id_init', $profile_tag_to_field_id); JB_cache_set('tag_to_field_id_3_' . $_SESSION['LANG'], $profile_tag_to_field_id); return $profile_tag_to_field_id; }
function JB_resume_tag_to_field_id_init() { global $resume_tag_to_field_id; // deprecated since 3.6 if ($resume_tag_to_field_id = JB_cache_get('tag_to_field_id_2_' . $_SESSION['LANG'])) { return $resume_tag_to_field_id; } $fields = JB_schema_get_fields(2); // the template tag becomes the key foreach ($fields as $field) { $resume_tag_to_field_id[$field['template_tag']] = $field; } JBPLUG_do_callback('resume_tag_to_field_id_init', $resume_tag_to_field_id); JB_cache_set('tag_to_field_id_2_' . $_SESSION['LANG'], $resume_tag_to_field_id); return $resume_tag_to_field_id; }
function JB_getPath_templated($c) { static $p; if (!isset($p)) { // get from cache $p = jb_cache_get('cat_path_' . $_SESSION['LANG']); } if (isset($p[$c])) { return $p[$c]; } else { $p[$c] = JB_findPath($c, ""); JB_cache_set('cat_path_' . $_SESSION['LANG'], $p); return $p[$c]; } }
function JB_tag_to_field_id_init_emp() { global $adv_tag_to_field_id; global $label; if ($adv_tag_to_field_id = JB_cache_get('tag_to_field_id_4_' . $_SESSION['LANG'])) { return $adv_tag_to_field_id; } $fields = JB_schema_get_fields(4); // the template tag becomes the key foreach ($fields as $field) { $adv_tag_to_field_id[$field['template_tag']] = $field; } JBPLUG_do_callback('tag_to_field_id_init_emp', $adv_tag_to_field_id); JB_cache_set('tag_to_field_id_4_' . $_SESSION['LANG'], $adv_tag_to_field_id); return $adv_tag_to_field_id; }