Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

Commit

Permalink
Adaptation au nouveau docker (#867)
Browse files Browse the repository at this point in the history
* Replace filter_input by filter_var

* Fixed bug leaves types
  • Loading branch information
prytoegrian authored and wouldsmina committed Jan 18, 2020
1 parent 839174d commit b776abe
Show file tree
Hide file tree
Showing 17 changed files with 61 additions and 61 deletions.
2 changes: 1 addition & 1 deletion App/Views/Configuration/Type_Absence/Liste.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,6 @@ classesConges : <?= json_encode($classesConges) ?>
console.error(error);
})
}
});
};
</script>
<?php
2 changes: 1 addition & 1 deletion Tests/script_jeutest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
require_once INCLUDE_PATH . 'define.php';

// SERVER
$PHP_SELF = filter_input(INPUT_SERVER, 'PHP_SELF', FILTER_SANITIZE_URL);
$PHP_SELF = filter_var($_SERVER['PHP_SELF'], FILTER_SANITIZE_URL);

// récupération des valeurs par défaut
if (!empty($_POST)) {
Expand Down
2 changes: 1 addition & 1 deletion calcul_nb_jours_pris.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/*************************************/
// recup des parametres reçus :
// SERVER
$PHP_SELF = filter_input(INPUT_SERVER, 'PHP_SELF', FILTER_SANITIZE_URL);
$PHP_SELF = filter_var($_SERVER['PHP_SELF'], FILTER_SANITIZE_URL);
// GET / POST
$user = getpost_variable('user') ;
$date_debut = getpost_variable('date_debut') ;
Expand Down
28 changes: 14 additions & 14 deletions config/Fonctions.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ private static function commit_vider_table_logs()

private static function confirmer_vider_table_logs()
{
$PHP_SELF = filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL);
$PHP_SELF = filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_URL);
$return = '';

$return .= '<center>';
Expand All @@ -40,7 +40,7 @@ private static function confirmer_vider_table_logs()

public static function affichage($login_par)
{
$PHP_SELF = filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL);
$PHP_SELF = filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_URL);
$return = '';

//requête qui récupère les logs
Expand Down Expand Up @@ -129,7 +129,7 @@ public static function logModule()
/*************************************/
// recup des parametres reçus :
// SERVER
$PHP_SELF = filter_input(INPUT_SERVER, 'PHP_SELF', FILTER_SANITIZE_URL);
$PHP_SELF = filter_var($_SERVER['PHP_SELF'], FILTER_SANITIZE_URL);
// GET / POST
$action = htmlentities(getpost_variable('action', ""), ENT_QUOTES | ENT_HTML401);
$login_par = htmlentities(getpost_variable('login_par', ""), ENT_QUOTES | ENT_HTML401);
Expand All @@ -150,7 +150,7 @@ public static function logModule()

private static function commit_modif($tab_new_values)
{
$PHP_SELF = filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL);
$PHP_SELF = filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_URL);
$return = '';

$URL = "$PHP_SELF";
Expand All @@ -174,7 +174,7 @@ private static function commit_modif($tab_new_values)

public static function test_config()
{
$PHP_SELF = filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL);
$PHP_SELF = filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_URL);
$return = '';

$URL = "$PHP_SELF";
Expand All @@ -197,7 +197,7 @@ public static function test_config()

public static function affichage_config_mail()
{
$PHP_SELF = filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL);
$PHP_SELF = filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_URL);
$return = '';

$URL = "$PHP_SELF";
Expand Down Expand Up @@ -287,7 +287,7 @@ public static function mailModule()
/*************************************/
// recup des parametres reçus :
// SERVER
$PHP_SELF = filter_input(INPUT_SERVER, 'PHP_SELF', FILTER_SANITIZE_URL);
$PHP_SELF = filter_var($_SERVER['PHP_SELF'], FILTER_SANITIZE_URL);
// GET / POST
$action = getpost_variable('action');
$tab_new_values = getpost_variable('tab_new_values');
Expand Down Expand Up @@ -320,7 +320,7 @@ private static function get_last_absence_id()

public static function commit_ajout(&$tab_new_values)
{
$PHP_SELF = filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL);
$PHP_SELF = filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_URL);
$return = '';

$URL = $PHP_SELF;
Expand Down Expand Up @@ -403,7 +403,7 @@ public static function commit_ajout(&$tab_new_values)

public static function commit_suppr($id_to_update)
{
$PHP_SELF = filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL);
$PHP_SELF = filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_URL);
$return = '';

$URL = $PHP_SELF;
Expand All @@ -427,7 +427,7 @@ public static function commit_suppr($id_to_update)

public static function supprimer($id_to_update)
{
$PHP_SELF = filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL);
$PHP_SELF = filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_URL);
$return = '';

$URL = parse_url($PHP_SELF, PHP_URL_PATH);
Expand Down Expand Up @@ -491,7 +491,7 @@ public static function supprimer($id_to_update)

public static function commit_modif_absence(&$tab_new_values, $id_to_update)
{
$PHP_SELF = filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL);
$PHP_SELF = filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_URL);
$return = '';

$URL = $PHP_SELF;
Expand Down Expand Up @@ -565,7 +565,7 @@ public static function commit_modif_absence(&$tab_new_values, $id_to_update)

public static function modifier(&$tab_new_values, $id_to_update)
{
$PHP_SELF = filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL);
$PHP_SELF = filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_URL);
$return = '';

$URL = parse_url($PHP_SELF, PHP_URL_PATH);
Expand Down Expand Up @@ -619,7 +619,7 @@ public static function modifier(&$tab_new_values, $id_to_update)

private static function commit_saisie(&$tab_new_values)
{
$PHP_SELF = filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL);
$PHP_SELF = filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_URL);
$return = '';

$URL = "$PHP_SELF";
Expand Down Expand Up @@ -679,7 +679,7 @@ private static function commit_saisie(&$tab_new_values)

private static function affichage_configuration()
{
$PHP_SELF = filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL);
$PHP_SELF = filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_URL);
$return = '';

// affichage de la liste des variables
Expand Down
2 changes: 1 addition & 1 deletion config/config_type_absence.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// verif des droits du user à afficher la page
verif_droits_user("is_admin");

$PHP_SELF = filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL);
$PHP_SELF = filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_URL);
$action = getpost_variable('action');
$tab_new_values = getpost_variable('tab_new_values');
$id_to_update = htmlentities(getpost_variable('id_to_update'), ENT_QUOTES | ENT_HTML401);
Expand Down
2 changes: 1 addition & 1 deletion config/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
$_SESSION['config']=init_config_tab(); // on initialise le tableau des variables de config
require_once INCLUDE_PATH .'session.php';

$PHP_SELF = filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL);
$PHP_SELF = filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_URL);

// verif des droits du user à afficher la page
verif_droits_user("is_admin");
Expand Down
2 changes: 1 addition & 1 deletion edition/Fonctions.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ public static function editUserModule()
/*************************************/
// recup des parametres reçus :
// SERVER
$PHP_SELF = filter_input(INPUT_SERVER, 'PHP_SELF', FILTER_SANITIZE_URL);
$PHP_SELF = filter_var($_SERVER['PHP_SELF'], FILTER_SANITIZE_URL);
// GET / POST
$user_login = htmlentities(getpost_variable('user_login', $_SESSION['userlogin']), ENT_QUOTES | ENT_HTML401);
$return = '';
Expand Down
28 changes: 14 additions & 14 deletions hr/Fonctions.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ private static function traite_all_demande_en_cours(array $tab_bt_radio, array $

$db = \includes\SQL::singleton();
$config = new \App\Libraries\Configuration($db);
$PHP_SELF = filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL);
$PHP_SELF = filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_URL);
$return = '';

while($elem_tableau = each($tab_bt_radio)) {
Expand Down Expand Up @@ -78,7 +78,7 @@ private static function affiche_all_demandes_en_cours($tab_type_conges) : string
$return = '';
$db = \includes\SQL::singleton();
$config = new \App\Libraries\Configuration($db);
$PHP_SELF = filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL);
$PHP_SELF = filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_URL);
$count1=0;
$count2=0;

Expand Down Expand Up @@ -259,7 +259,7 @@ public static function pageTraitementDemandeModule(array $tab_type_cong, $onglet

public static function new_conges($user_login, $numero_int, $new_debut, $new_demi_jour_deb, $new_fin, $new_demi_jour_fin, $new_nb_jours, $new_comment, $new_type_id) : string
{
$PHP_SELF = filter_input(INPUT_SERVER, 'PHP_SELF', FILTER_SANITIZE_URL);
$PHP_SELF = filter_var($_SERVER['PHP_SELF'], FILTER_SANITIZE_URL);
$return = '';

$new_debut = convert_date($new_debut);
Expand Down Expand Up @@ -312,7 +312,7 @@ private static function traite_demandes($user_login, $tab_radio_traite_demande,
{
$db = \includes\SQL::singleton();
$config = new \App\Libraries\Configuration($db);
$PHP_SELF = filter_input(INPUT_SERVER, 'PHP_SELF', FILTER_SANITIZE_URL); ;
$PHP_SELF = filter_var($_SERVER['PHP_SELF'], FILTER_SANITIZE_URL);
$return = '';

// recup dans un tableau de tableau les infos des types de conges et absences
Expand Down Expand Up @@ -398,7 +398,7 @@ private static function annule_conges($user_login, $tab_checkbox_annule, $tab_te
{
$db = \includes\SQL::singleton();
$config = new \App\Libraries\Configuration($db);
$PHP_SELF = filter_input(INPUT_SERVER, 'PHP_SELF', FILTER_SANITIZE_URL); ;
$PHP_SELF = filter_var($_SERVER['PHP_SELF'], FILTER_SANITIZE_URL);
$return = '';

// recup dans un tableau de tableau les infos des types de conges et absences
Expand Down Expand Up @@ -449,7 +449,7 @@ private static function affiche_etat_conges_user_for_resp($user_login, $year_aff
{
$db = \includes\SQL::singleton();
$config = new \App\Libraries\Configuration($db);
$PHP_SELF = filter_input(INPUT_SERVER, 'PHP_SELF', FILTER_SANITIZE_URL); ;
$PHP_SELF = filter_var($_SERVER['PHP_SELF'], FILTER_SANITIZE_URL);
$return = '';

// affichage de l'année et des boutons de défilement
Expand Down Expand Up @@ -598,7 +598,7 @@ private static function affiche_etat_demande_2_valid_user_for_resp($user_login)
{
$db = \includes\SQL::singleton();
$config = new \App\Libraries\Configuration($db);
$PHP_SELF = filter_input(INPUT_SERVER, 'PHP_SELF', FILTER_SANITIZE_URL); ;
$PHP_SELF = filter_var($_SERVER['PHP_SELF'], FILTER_SANITIZE_URL);
$return = '';

// Récupération des informations
Expand Down Expand Up @@ -700,7 +700,7 @@ private static function affiche_etat_demande_user_for_resp($user_login, $tab_use
{
$db = \includes\SQL::singleton();
$config = new \App\Libraries\Configuration($db);
$PHP_SELF = filter_input(INPUT_SERVER, 'PHP_SELF', FILTER_SANITIZE_URL); ;
$PHP_SELF = filter_var($_SERVER['PHP_SELF'], FILTER_SANITIZE_URL);
$return = '';

// Récupération des informations
Expand Down Expand Up @@ -1012,7 +1012,7 @@ public static function pageTraiteUserModule($onglet) : string

public static function affichage_saisie_globale_groupe($tab_type_conges) : string
{
$PHP_SELF = filter_input(INPUT_SERVER, 'PHP_SELF', FILTER_SANITIZE_URL);
$PHP_SELF = filter_var($_SERVER['PHP_SELF'], FILTER_SANITIZE_URL);
$return = '';

/***********************************************************************/
Expand Down Expand Up @@ -1311,7 +1311,7 @@ private static function affiche_calendrier_fermeture($year, $groupe_id = 0) : st
\hr\Fonctions::get_tableau_jour_fermeture($year, $tab_year, $groupe_id);
// navigation
$onglet = htmlentities(getpost_variable('onglet'), ENT_QUOTES | ENT_HTML401);
$PHP_SELF = filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL);
$PHP_SELF = filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_URL);
$return = '<div class="btn-group pull-right">';
$prev_link = "$PHP_SELF?year=". ($year - 1) . "&groupe_id=$groupe_id";
$return .= '<a href="' . $prev_link . '" class="btn btn-default"><i class="fa fa-chevron-left"></i></a>';
Expand Down Expand Up @@ -1393,7 +1393,7 @@ private static function verif_periode_chevauche_periode_groupe($date_debut, $dat

private static function commit_annul_fermeture($fermeture_id, $groupe_id) : string
{
$PHP_SELF = filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL);
$PHP_SELF = filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_URL);
$db = \includes\SQL::singleton();
$return = '';

Expand Down Expand Up @@ -1467,7 +1467,7 @@ private static function commit_annul_fermeture($fermeture_id, $groupe_id) : stri

private static function commit_new_fermeture($new_date_debut, $new_date_fin, $groupe_id, $id_type_conges) : string
{
$PHP_SELF = filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL);
$PHP_SELF = filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_URL);
$return = '';

// on transforme les formats des dates
Expand Down Expand Up @@ -1555,7 +1555,7 @@ private static function commit_new_fermeture($new_date_debut, $new_date_fin, $gr

private static function confirm_annul_fermeture($fermeture_id, $groupe_id, $fermeture_date_debut, $fermeture_date_fin) : string
{
$PHP_SELF = filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL);
$PHP_SELF = filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_URL);
$return = '';

$return .= '<div class="wrapper">';
Expand Down Expand Up @@ -1938,7 +1938,7 @@ public static function getJoursFeriesFrance(int $iAnnee) : array
//Initialisation de variables
$unJour = 3600*24;
$tbJourFerie = [];
$timePaques = easter_date($iAnnee) + 6 * 3600; // évite les changements d'heures
$timePaques = \easter_date($iAnnee) + 6 * 3600; // évite les changements d'heures

$tbJourFerie["Jour de l an"] = $iAnnee . "-01-01";
$tbJourFerie["Paques"] = date('Y-m-d', $timePaques);
Expand Down
2 changes: 1 addition & 1 deletion hr/hr_ajout_conges.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ function get_list_groupes_pour_rh() : string
}

$config = new \App\Libraries\Configuration(\includes\SQL::singleton());
$PHP_SELF = filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL);
$PHP_SELF = filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_URL);

// recup du tableau des types de conges (seulement les congesexceptionnels )
if ($config->isCongesExceptionnelsActive()) {
Expand Down
2 changes: 1 addition & 1 deletion hr/hr_index.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/*************************************/
// recup des parametres reçus :
// SERVER
$PHP_SELF = filter_input(INPUT_SERVER, 'PHP_SELF', FILTER_SANITIZE_URL);
$PHP_SELF = filter_var($_SERVER['PHP_SELF'], FILTER_SANITIZE_URL);
// GET / POST
$onglet = getpost_variable('onglet', "page_principale");

Expand Down
2 changes: 1 addition & 1 deletion hr/hr_jours_chomes.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function afficheJourMois($mois, $i, $year, $tab_year) : string
// verif des droits du user à afficher la page
verif_droits_user("is_hr");

$PHP_SELF = filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL);
$PHP_SELF = filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_URL);
// GET / POST
$PHP_SELF = parse_url($PHP_SELF, PHP_URL_PATH);
$choix_action = getpost_variable('choix_action');
Expand Down
4 changes: 2 additions & 2 deletions includes/fonction.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ function session_delete()
//
function session_saisie_user_password($erreur, $session_username)
{
$PHP_SELF = filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL);
$PHP_SELF = filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_URL);
header_login('');
include_once TEMPLATE_PATH . 'login_form.php';

Expand Down Expand Up @@ -763,7 +763,7 @@ function saisie_nouveau_conges2($user_login, $year_calendrier_saisie_debut, $moi
{
$config = new \App\Libraries\Configuration(\includes\SQL::singleton());

$PHP_SELF = filter_input(INPUT_SERVER, 'PHP_SELF', FILTER_SANITIZE_URL);
$PHP_SELF = filter_var($_SERVER['PHP_SELF'], FILTER_SANITIZE_URL);
$new_date_fin = date('d/m/Y');
$return = '';

Expand Down
Loading

0 comments on commit b776abe

Please sign in to comment.