<?php
// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: lib_func_customfields.inc.php,v 1.3.12.1 2026/03/06 16:07:58 dbellamy Exp $

if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}

global $base_path;

require_once $base_path . '/admin/import/lib_import.class.php';


function func_customfields_recup_noticeunimarc_suite($notice)
{
    global $info_900;

    $info_900 = array();

    $record = new iso2709_record($notice, AUTO_UPDATE);

    // $a = valeur,
    // $b = libelle resolu (resolve/url)
    // $c = identifiant (resolve/url/query_*),
    // $l = libelle alternatif
    // $n = nom du champ
    // $t = type du champ
    $info_900 = $record->get_subfield("900", "a", "b", "c", "l", "n", "t");
}


function func_customfields_import_new_notice_suite()
{
    global $notice_id;
    global $info_900;

    $nb_info_900 = count($info_900);
    for ($i = 0; $i < $nb_info_900; $i++) {
        lib_import::processCustomFields($info_900[$i], $notice_id, 'notices');
    }
}
