diff --git a/faq_options.php b/faq_options.php index 9bc5398..03ea456 100644 --- a/faq_options.php +++ b/faq_options.php @@ -1,4 +1,5 @@ ajouterPlusieursApres( 'grpCaracteres', - array( - array( + [ + [ 'id' => 'faq_sep', 'separator' => '---------------', 'display' => true, - ), - array( + ], + [ 'id' => 'faq', 'name' => _T('faq:outil_inserer_faq'), 'className' => 'outil_faq', @@ -65,9 +65,9 @@ function faq_porte_plume_barre_pre_charger($barres) { 'replaceWith' => "function(h){ return outil_faq(h, '?', true);}", 'selectionType' => 'line', 'display' => true, - 'dropMenu' => array( + 'dropMenu' => [ // bouton ? - array( + [ 'id' => 'faq_question', 'name' => _T('faq:outil_inserer_question'), 'replaceWith' => "function(h){ return outil_faq(h, '?');}", @@ -75,8 +75,8 @@ function faq_porte_plume_barre_pre_charger($barres) { 'selectionType' => 'line', 'forceMultiline' => true, 'display' => true, - ), - array( + ], + [ 'id' => 'faq_titre', 'name' => _T('faq:outil_inserer_titre'), 'replaceWith' => "function(h){ return outil_faq(h, ':Nouveau titre');}", @@ -84,10 +84,10 @@ function faq_porte_plume_barre_pre_charger($barres) { 'selectionType' => 'line', 'forceMultiline' => true, 'display' => true, - ), - ) - ) - ) + ], + ] + ] + ] ); $barre->ajouterFonction( "function outil_faq(h, c,recursif) { @@ -134,10 +134,10 @@ function faq_porte_plume_barre_pre_charger($barres) { function faq_porte_plume_lien_classe_vers_icone($flux) { return array_merge( $flux, - array( + [ 'outil_faq' => 'faq-xx.svg', - 'outil_faq_question'=> 'faq_question-xx.svg', + 'outil_faq_question' => 'faq_question-xx.svg', 'outil_faq_titre' => 'faq_titre-xx.svg' - ) + ] ); } diff --git a/inc/faq_formater_tag.php b/inc/faq_formater_tag.php index 3d9d386..c3b8051 100644 --- a/inc/faq_formater_tag.php +++ b/inc/faq_formater_tag.php @@ -1,4 +1,5 @@ + + . + vendor/* + lang/* + lib/* + + + + + + + + + diff --git a/wheels/faq.php b/wheels/faq.php index 2245e47..b449974 100644 --- a/wheels/faq.php +++ b/wheels/faq.php @@ -1,4 +1,5 @@ et . @@ -78,12 +79,12 @@ function tw_faq($t) { // -- sinon, on traite la nouvelle ligne if ($index_ligne == count($lignes)) { if ($question_en_cours) { - $faqs[$index_faq][$index_qr] = array( + $faqs[$index_faq][$index_qr] = [ 'question' => $question, 'reponse' => trim($reponse), 'tags' => $tags, 'infos' => $infos, - ); + ]; $question_en_cours = false; } } else { @@ -115,12 +116,12 @@ function tw_faq($t) { // Il faut tester si une question est en cours. Si c'est le cas il faut clore la question en cours // avant de commencer la nouvelle question ('?') ou la nouvelle faq par son titre (':'). if ($question_en_cours) { - $faqs[$index_faq][$index_qr] = array( + $faqs[$index_faq][$index_qr] = [ 'question' => $question, 'reponse' => trim($reponse), 'tags' => $tags, 'infos' => $infos, - ); + ]; $question_en_cours = false; ++$index_qr; } @@ -128,7 +129,7 @@ function tw_faq($t) { if ($premier === '?') { // On démarre une nouvelle question // -- initialisation des variables de la question en cours - $tags = $infos = array(); + $tags = $infos = []; $question_en_cours = true; $reponse = ''; $texte = trim(substr($texte, 1, strlen($texte) - 1)); @@ -188,16 +189,16 @@ function tw_faq($t) { if ($_faq) { $html .= recuperer_fond( "inclure/faq_$format", - array( + [ 'no_bloc' => $no_bloc, 'no_faq' => $_cle, 'titre' => ($titres[$_cle] ?? ''), 'faq' => $_faq, 'types_info' => $types_info[$_cle] - ), - array( + ], + [ 'ajax' => true - ) + ] ); } }