Skip to content

Commit

Permalink
afup#1416 divers
Browse files Browse the repository at this point in the history
  • Loading branch information
stakovicz committed Jan 10, 2024
1 parent 07cae4a commit 340ac48
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 72 deletions.
2 changes: 0 additions & 2 deletions configs/application/config-test.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<?php
$configuration['web']['path']='/';

$configuration['divers']['niveau_erreur']='32767';
$configuration['divers']['afficher_erreurs']='1';
$configuration['mails']['serveur_smtp']='mailcatcher';
$configuration['mails']['email_expediteur']='[email protected]';
$configuration['mails']['nom_expediteur']='Bureau AFUP';
Expand Down
2 changes: 0 additions & 2 deletions configs/application/config.php.dist
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<?php
$configuration['web']['path']='http://.dev/';

$configuration['divers']['niveau_erreur']='6143';
$configuration['divers']['afficher_erreurs']='1';
$configuration['mails']['serveur_smtp']='';
$configuration['mails']['email_expediteur']='[email protected]';
$configuration['mails']['nom_expediteur']='Bureau AFUP';
Expand Down
2 changes: 0 additions & 2 deletions configs/application/config.php.dist-docker
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<?php
$configuration['web']['path']='/';

$configuration['divers']['niveau_erreur']='6143';
$configuration['divers']['afficher_erreurs']='1';
$configuration['mails']['serveur_smtp']='mailcatcher';
$configuration['mails']['email_expediteur']='[email protected]';
$configuration['mails']['nom_expediteur']='Bureau AFUP';
Expand Down
54 changes: 0 additions & 54 deletions htdocs/include/prepend.inc.php

This file was deleted.

7 changes: 0 additions & 7 deletions htdocs/pages/administration/configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,6 @@
$formulaire->addElement('header' , '' , 'Planète PHP FR');
$formulaire->addElement('textarea', 'planete|pertinence' , 'Critère de pertinence', array('cols' => 42, 'rows' => 7));

$formulaire->addElement('header' , '' , 'Divers');
$formulaire->addElement('select' , 'divers|niveau_erreur' , 'Niveau erreur' , array(E_ALL => 'Toutes',
E_NOTICE => 'Informations',
E_WARNING => 'Avertissements',
0 => 'Aucune'));
$formulaire->addElement('advcheckbox', 'divers|afficher_erreurs', 'Afficher erreurs', null, null, array(0, 1));

$formulaire->addElement('header', 'boutons' , '');
$formulaire->addElement('submit', 'soumettre', 'Enregistrer');

Expand Down
3 changes: 1 addition & 2 deletions htdocs/pages/paiement/payment_tracking.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<?php
use Afup\Site\Forum\Inscriptions;

require_once '../../include/prepend.inc.php';
require_once dirname(__FILE__) . '/../../../sources/Afup/Bootstrap/_Common.php';
require_once dirname(__FILE__) .'/../../../sources/Afup/Bootstrap/Http.php';


$forum_inscriptions = new Inscriptions($bdd);
Expand Down
11 changes: 8 additions & 3 deletions sources/Afup/Bootstrap/Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,15 @@
session_start();
}

// mise à jour des paramètrage PHP en fonction de la configuration
// mise à jour des paramétrages PHP en fonction de la configuration

ini_set('error_reporting', $GLOBALS['AFUP_CONF']->obtenir('divers|niveau_erreur'));
ini_set('display_errors', $GLOBALS['AFUP_CONF']->obtenir('divers|afficher_erreurs'));
if (isset($_ENV['SYMFONY_ENV']) && $_ENV['SYMFONY_ENV'] === 'prod') {
ini_set('error_reporting', E_ALL ^ E_WARNING);
ini_set('display_errors', 0);
} else {
ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);
}
ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . dirname(__FILE__).'/../../../dependencies/PEAR/');

header('Content-type: text/html; charset=UTF-8');
Expand Down

0 comments on commit 340ac48

Please sign in to comment.