4 * Options globales chargées à chaque hit
6 * @package SPIP\Formidable\Options
10 if (!defined("_ECRIRE_INC_VERSION")) return;
12 // On déclare le formulaire pour éditer un formulaire
13 $GLOBALS['formulaires']['editer_formulaire'] = array(
18 'label' => '<:formidable:editer_titre:>',
19 'obligatoire' => 'oui',
20 'class' => 'multilang'
26 'nom' => 'identifiant',
27 'label' => '<:formidable:editer_identifiant:>',
28 'explication' => '<:formidable:editer_identifiant_explication:>',
29 'obligatoire' => 'oui'
34 'modele' => '/^[\w]+$/'
39 'saisie' => 'textarea',
41 'nom' => 'message_retour',
42 'label' => '<:formidable:editer_message_ok:>',
43 'explication' => '<:formidable:editer_message_ok_explication:>',
45 'li_class' => 'editer_texte',
46 'class' => 'multilang'
50 'saisie' => 'textarea',
52 'nom' => 'descriptif',
53 'label' => '<:formidable:editer_descriptif:>',
54 'explication' => '<:formidable:editer_descriptif_explication:>',
56 'class' => 'multilang'
60 'saisie' => 'selection',
63 'label' => '<:formidable:editer_apres_label:>',
64 'explication' => '<:formidable:editer_apres_explication:>',
66 'formulaire' => _T('formidable:editer_apres_choix_formulaire'),
67 'valeurs' => _T('formidable:editer_apres_choix_valeurs'),
68 'stats' => _T('formidable:editer_apres_choix_stats'),
69 'rien' => _T('formidable:editer_apres_choix_rien'),
70 'redirige' => _T('formidable:editer_apres_choix_redirige'),
72 'defaut' => 'formulaire',
73 'cacher_option_intro' => 'on'
79 'nom' => 'url_redirect',
80 'label' => '<:formidable:editer_redirige_url:>',
81 'explication' => '<:formidable:editer_redirige_url_explication:>',
82 'obligatoire' => 'non'
87 /* déclaration des différentes variables utilisées pour effectuer l'anonymisation */
88 $GLOBALS['formulaires']['variables_anonymisation'] = array(
89 'remote_user' => '$_SERVER["REMOTE_USER"]',
90 'php_auth_user' => '$_SERVER["PHP_AUTH_USER"]',
94 * on se contente d'initialiser si ces variable si elles ne
95 * le sont pas dans mes_options.php de l'instance
97 if (isset($GLOBALS['formulaires']['passwd']) == false) {
98 $GLOBALS['formulaires']['passwd'] = array(
99 'interne' => 'palabresecreta',
103 if (isset($GLOBALS['formulaires']['autoriser_admin_restreint']) == false) {
104 $GLOBALS['formulaires']['autoriser_admin_restreint'] = false;
107 if (!function_exists('array_fill_keys')) {
109 * Remplit un tableau avec des valeurs, en spécifiant les clés
111 * Fonction dans PHP 5.2+
112 * @see http://php.net/manual/fr/function.array-fill-keys.php
115 * Tableau de valeurs qui sera utilisé comme clés.
116 * @param mixed $value
117 * Valeur à utiliser pour remplir le tableau.
121 function array_fill_keys($keys, $value){
122 array_combine($keys,array_fill(0,count($keys),$value));