From ac54f5224d4470de9d8ae088e1338dea52668c9d Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc <ludovic@pouzenc.fr> Date: Thu, 5 Jul 2018 00:25:51 +0200 Subject: Renommage beta_accents -> final pour diffs --- final/app/include/tools.inc.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 final/app/include/tools.inc.php (limited to 'final/app/include/tools.inc.php') diff --git a/final/app/include/tools.inc.php b/final/app/include/tools.inc.php new file mode 100644 index 0000000..bf75d1f --- /dev/null +++ b/final/app/include/tools.inc.php @@ -0,0 +1,25 @@ +<?php +function addslashes_if_needed($texte) +{ + if(get_magic_quotes_gpc() == 0) + { + return addslashes($texte); + } + else + { + return $texte; + } +} + +function stripslashes_if_needed($texte) +{ + if(get_magic_quotes_gpc() != 0) + { + return stripslashes($texte); + } + else + { + return $texte; + } +} +?> \ No newline at end of file -- cgit v1.2.3