diff --git a/ecrire/inc_getdocument.php3 b/ecrire/inc_getdocument.php3 index 4b51b014f912bf6108e2593b542c7060e9514776..c445b01004f9eb20bc752dafd24e5b119c03d7bf 100644 --- a/ecrire/inc_getdocument.php3 +++ b/ecrire/inc_getdocument.php3 @@ -270,7 +270,7 @@ function ajouter_un_document ($source, $nom_envoye, $type_lien, $id_lien, $mode, "(id_type, titre, date)", "($id_type, '', NOW())"); if ($id_lien - AND preg_match('/^[a-z]+$/', $type_lien) # securite + AND preg_match('/^[a-z0-9_]+$/i', $type_lien) # securite ) spip_query("INSERT INTO spip_documents_".$type_lien."s (id_document, id_".$type_lien.") diff --git a/forum.php3 b/forum.php3 index a9fe0f862e2c26224a1b36c1fdebf40728320f64..3a46f9ab6aeaa6f7bc5c515f39ed650552a2b7d6 100644 --- a/forum.php3 +++ b/forum.php3 @@ -12,6 +12,9 @@ $delais = 3600; // 2. faire des forums uniquement pour affecter des mots-cles // $afficher_texte = "non"; +// En ca de forums sur abonnement, on a un panneau de login +$flag_dynamique = true; + include ("inc-public.php3"); ?> diff --git a/inc-public-global.php3 b/inc-public-global.php3 index c792b2ba03e329a600bc86ce5171afc1800a67bd..1908ea6538f98bbe53b333cedea4fc7a31602e54 100644 --- a/inc-public-global.php3 +++ b/inc-public-global.php3 @@ -321,8 +321,10 @@ function inclure_page($fond, $delais_inclus, $contexte_inclus, $cache_incluant=' // Si on est inclus en POST, il faut ajouter les variables _POST dans // le contexte inclus, sinon les formulaires ne marchent pas... - if ($_SERVER['REQUEST_METHOD'] == 'POST') + if ($_SERVER['REQUEST_METHOD'] == 'POST') { + include_local('inc-calcul.php3'); $contexte_inclus = array_merge(calculer_contexte(), $contexte_inclus); + } $page = obtenir_page ($contexte_inclus, $chemin_cache, $delais_inclus, $use_cache, $fond, true);