Commit 0ac9d58d authored by N. Peraldi's avatar N. Peraldi
Browse files

feat: now we use define() for constants

parent 6bbf6cb5
<?php <?php
/* /**
* Adresse mail cible de l'Adullact. * Adresse mail cible de l'Adullact.
* Lorsqu'on envoie un mail informatif à l'Adullact, à qui l'envoie-t-on ? * Lorsqu'on envoie un mail informatif à l'Adullact, à qui l'envoie-t-on ?
*/ */
$mail_cible_adullact="nathan.peraldi@adullact.org"; define("MAIL_CIBLE_ADULLACT","nathan.peraldi@adullact.org");
\ No newline at end of file
/**
* Le chemin d'accès aux logs du formulaire d'adhésion
*/
$theme_path = get_stylesheet_directory();
$membership_logs_path = $theme_path . "/logs/adhesion/logs.log";
define("MEMBERSHIP_LOGS_DIRECTORY",$membership_logs_path);
\ No newline at end of file
...@@ -166,12 +166,12 @@ function sendAdhesionMail($tab) ...@@ -166,12 +166,12 @@ function sendAdhesionMail($tab)
function writeInLog($intitule, $text) function writeInLog($intitule, $text)
{ {
//fonction qui écrit dans les logs. //fonction qui écrit dans les logs.
global $theme_path_for_server, $debug_mode_traitement; global $debug_mode_traitement;
date_default_timezone_set('Europe/Paris'); date_default_timezone_set('Europe/Paris');
$date = date("d-m-Y"); $date = date("d-m-Y");
$hour = date("H:i:s"); $hour = date("H:i:s");
$filePath = $theme_path_for_server . "/logs/adhesion/logs.log"; $filePath = constant("MEMBERSHIP_LOGS_DIRECTORY");
$beforeMessage = "\n--------------\nLe " . $date . ", à " . $hour . ", \n" . $intitule . " : \n"; $beforeMessage = "\n--------------\nLe " . $date . ", à " . $hour . ", \n" . $intitule . " : \n";
$finalMessage = $beforeMessage . $text; $finalMessage = $beforeMessage . $text;
$fichier = fopen($filePath, "a"); $fichier = fopen($filePath, "a");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment