$t) { $index = array_search($t['name'], $html_ordre); $lesTitres[] = $html_titre[$index]; } $Tid_doc = []; if (is_array($files) and count($files)) { $ajouter_document = charger_fonction('ajouter_documents', 'action'); $Tid_doc = $ajouter_document('new', $files, $objet, $id_objet,$mode); } if (!empty($html_titre) and count($Tid_doc)) { foreach ($Tid_doc as $i => $id_doc) { $titre = $lesTitres[$i]; if ($titre) { sql_updateq('spip_documents', array("titre" => $titre), 'id_document='.intval($id_doc)); } } } return $Tid_doc; }