function convert_batch_to_adminconvert_script($notices_to_convert, $the_conversion, $target_charset) { global $base_path, $charset, $opac_url_base; if (!$notices_to_convert) { //Rien à faire? On fait rien return; } //Un petit tour en xml dans le charset de la base et après on invoque la classe de conversion $this->convert_batch_to_pmb_xml($notices_to_convert, $charset); $conv = new convert("", $the_conversion["position"], true); foreach ($notices_to_convert as $anotice_id) { if (!$this->results[$anotice_id]) { continue; } $conv->prepared_notice = $xml_header . $this->results[$anotice_id]; $converted_version = $conv->transform(true); if ($the_conversion["output_charset"] == 'utf-8' && $target_charset != 'utf-8') { $converted_version = utf8_decode($converted_version); } if ($the_conversion["output_charset"] != 'utf-8' && $target_charset == 'utf-8') { $converted_version = utf8_encode($converted_version); } $this->results[$anotice_id] = $converted_version; } }