Mercurial > defr > DualBlog
diff comment.php @ 89:e37ef9a81737 tip
Merge
author | Franck Deroche <franck@defr.org> |
---|---|
date | Thu, 13 Dec 2018 00:55:42 +0100 |
parents | 1f2410012dbc 0b635e3ae1a1 |
children |
line wrap: on
line diff
--- a/comment.php Thu Dec 13 00:54:31 2018 +0100 +++ b/comment.php Thu Dec 13 00:55:42 2018 +0100 @@ -17,7 +17,7 @@ if(!empty($Comment) && $_SESSION['commentSeed'] != $Req->get('seed', null, 't')) die("L'ajout de commentaire doit se faire à partir du formulaire de ce blog"); - if(!is_null($Auteur) && $Auteur!='Votre Nom' && $Auteur != $Adresse && !empty($Comment) && strlen($Comment) > 6 && strpos($Comment, 'xanga') === false) { + if(!is_null($Auteur) && $Auteur!='Votre Nom' && $Auteur != $Adresse && !empty($Comment) && strlen($Comment) > 6) { // Prévention d'un "cassage" par ajout d'un commentaire incorrectement formaté $ip = $_SERVER['REMOTE_ADDR']; $Auteur = str_replace(array('<', '>'), array('<', '>'), $Auteur); @@ -37,8 +37,6 @@ else $visibleBool = false; - // Suppression d'un gros lourd - $visibleBool &= (ereg('^ma[0-9]+zda$', $Auteur) === false); $visible = $visibleBool ? 1 : 0; $doc = @DOMDocument::loadXML('<comment>' . stripslashes($Comment) . '</comment>'); @@ -60,7 +58,7 @@ else $Comment = htmlspecialchars($Comment); - $Data->debugQuery(" + $Data->Query(" INSERT INTO Commentaires(MessId, Auteur, Adresse, AdresseMail, Comment, DateComment, ip, Visible) VALUES({$id}, '{$Auteur}', '{$Adresse}', '{$AdresseMail}', '{$Comment}', '{$DateComment}', '{$ip}', $visible) ");