true, 'id_objet' => $id_objet, 'objet' => $objet, 'ajaxReload' => $ajaxReload, 'charger_js_titre' => $charger_js_titre === 'oui' ? 'oui' : 'non', 'boutonSubmit' => $boutonSubmit, ]; $valeurs['objet_ok'] = ''; if (intval($id_objet) > 0 and $objet) { $valeurs['objet_ok'] = 'ok'; } return $valeurs; } function formulaires_bigform_verifier_dist($objet, $id_objet, $mode = 'auto', $args = []) { $erreurs = []; $options = pipeline('bigform_verifier', [ 'args' => [ 'id_objet' => $id_objet, 'objet' => $objet, 'mode' => $mode, 'args' => $args ], 'data' => [] ]); $bigform = charger_fonction('bigform_verifier','inc'); $bigform($options,$erreurs); return $erreurs; } function formulaires_bigform_traiter_dist($objet = 'article', $id_objet = 0, $mode = 'auto', $args = []) { $options = []; if (array_key_exists('proteger', $args)) { $options['proteger'] = true; } if (array_key_exists('obfusquer', $args)) { $options['obfusquer'] = true; } // passer l'id_document à remplacer seulement si ce n'est pas un logo (en cas de logo SPIP supprime puis recrée le doc) if (array_key_exists('id_document', $args) && intval($args['id_document']) && !in_array($mode, ['logoon', 'logooff'])) { $options['id_document'] = intval($args['id_document']); } $bigform = charger_fonction('bigform_traiter','inc'); $T = $bigform($id_objet,$objet,$mode, $options); pipeline('bigform_post_insertion', [ 'args' => [ 'id_objet' => $id_objet, 'objet' => $objet, 'mode' => $mode, 'args' => $args, 'tId_doc' => $T ] ]); $retour = []; if (!empty($args['redirect'])) { $retour['redirect'] = $args['redirect']; } if (!empty($args['ajaxReload'])) { //$retour['message_ok'] = $args['ajaxReload']; $Tretour = ['bloc_ajax' => $args['ajaxReload']]; if (!empty($args['ajaxCallback'])) { $Tretour['callback_ajax'] = $args['ajaxCallback']; } $retour['message_ok'] = json_encode($Tretour); } return $retour; }