From 24348378c8f2666fe53d7bad8a1ca05c6c7b7ca8 Mon Sep 17 00:00:00 2001
From: "florian.azizian" <florian.azizian@maarch.org>
Date: Thu, 9 Apr 2020 15:20:25 +0100
Subject: [PATCH] FEAT #13679 TIME 0:30 clean notifications files

---
 .../xml/IVS/requests_definitions.xml          |   3 -
 core/class/class_history.php                  |  12 -
 .../class/class_schedule_notifications.php    |  39 --
 .../class_schedule_notifications_Abstract.php | 212 ---------
 .../notifications/class/diffusion_type.php    |  42 --
 .../class/diffusion_type_Abstract.php         |  59 ---
 .../class/diffusion_type_controler.php        |  42 --
 .../diffusion_type_controler_Abstract.php     | 100 -----
 modules/notifications/class/events.php        |  42 --
 .../notifications/class/events_Abstract.php   |  57 ---
 .../notifications/class/events_controler.php  |  41 --
 .../class/events_controler_Abstract.php       | 104 -----
 modules/notifications/class/notifications.php |  42 --
 .../class/notifications_Abstract.php          |  54 ---
 modules/notifications/create_notif_script.php |  44 --
 modules/notifications/css/template.css        |  70 ---
 .../notifications/diffusion_types/contact.php |  37 --
 .../diffusion_types/copy_list.php             | 145 -------
 .../diffusion_types/dest_entity.php           |  93 ----
 .../diffusion_types/dest_user.php             | 128 ------
 .../diffusion_types/dest_user_sign.php        | 136 ------
 .../diffusion_types/dest_user_visa.php        | 136 ------
 .../notifications/diffusion_types/entity.php  |  50 ---
 .../notifications/diffusion_types/group.php   |  52 ---
 .../notifications/diffusion_types/user.php    |  43 --
 modules/notifications/js/functions.js         | 318 --------------
 modules/notifications/lang/en.php             | 404 +++++++++++-------
 modules/notifications/lang/fr.php             | 404 +++++++++++-------
 modules/notifications/lang/nl.php             |  21 -
 .../load_attachforproperties_formcontent.php  |  28 --
 .../load_attachfortype_formcontent.php        |  54 ---
 .../load_diffusionproperties_formcontent.php  |  28 --
 .../load_diffusiontype_formcontent.php        |  52 ---
 .../manage_notifs_list_by_name.php            |  61 ---
 modules/notifications/xml/IVS/data_types.xml  |   3 -
 .../xml/IVS/requests_definitions.xml          |  32 --
 .../xml/IVS/validation_rules.xml              |  57 ---
 modules/notifications/xml/diffusion_type.xml  |  66 ---
 38 files changed, 510 insertions(+), 2801 deletions(-)
 delete mode 100755 modules/notifications/class/class_schedule_notifications.php
 delete mode 100755 modules/notifications/class/class_schedule_notifications_Abstract.php
 delete mode 100755 modules/notifications/class/diffusion_type.php
 delete mode 100755 modules/notifications/class/diffusion_type_Abstract.php
 delete mode 100755 modules/notifications/class/diffusion_type_controler.php
 delete mode 100755 modules/notifications/class/diffusion_type_controler_Abstract.php
 delete mode 100755 modules/notifications/class/events.php
 delete mode 100755 modules/notifications/class/events_Abstract.php
 delete mode 100755 modules/notifications/class/events_controler.php
 delete mode 100755 modules/notifications/class/events_controler_Abstract.php
 delete mode 100755 modules/notifications/class/notifications.php
 delete mode 100755 modules/notifications/class/notifications_Abstract.php
 delete mode 100755 modules/notifications/create_notif_script.php
 delete mode 100755 modules/notifications/css/template.css
 delete mode 100755 modules/notifications/diffusion_types/contact.php
 delete mode 100755 modules/notifications/diffusion_types/copy_list.php
 delete mode 100755 modules/notifications/diffusion_types/dest_entity.php
 delete mode 100755 modules/notifications/diffusion_types/dest_user.php
 delete mode 100755 modules/notifications/diffusion_types/dest_user_sign.php
 delete mode 100755 modules/notifications/diffusion_types/dest_user_visa.php
 delete mode 100755 modules/notifications/diffusion_types/entity.php
 delete mode 100755 modules/notifications/diffusion_types/group.php
 delete mode 100755 modules/notifications/diffusion_types/user.php
 delete mode 100755 modules/notifications/js/functions.js
 delete mode 100755 modules/notifications/load_attachforproperties_formcontent.php
 delete mode 100755 modules/notifications/load_attachfortype_formcontent.php
 delete mode 100755 modules/notifications/load_diffusionproperties_formcontent.php
 delete mode 100755 modules/notifications/load_diffusiontype_formcontent.php
 delete mode 100755 modules/notifications/manage_notifs_list_by_name.php
 delete mode 100755 modules/notifications/xml/IVS/data_types.xml
 delete mode 100755 modules/notifications/xml/IVS/requests_definitions.xml
 delete mode 100755 modules/notifications/xml/IVS/validation_rules.xml
 delete mode 100755 modules/notifications/xml/diffusion_type.xml

diff --git a/apps/maarch_entreprise/xml/IVS/requests_definitions.xml b/apps/maarch_entreprise/xml/IVS/requests_definitions.xml
index 3ce15e43504..ea64b4b51d3 100755
--- a/apps/maarch_entreprise/xml/IVS/requests_definitions.xml
+++ b/apps/maarch_entreprise/xml/IVS/requests_definitions.xml
@@ -271,7 +271,6 @@
     <xi:include href="../../../../modules/ldap/xml/IVS/requests_definitions.xml"/>
     <xi:include href="../../../../modules/life_cycle/xml/IVS/requests_definitions.xml"/>
     <xi:include href="../../../../modules/notes/xml/IVS/requests_definitions.xml"/>
-    <xi:include href="../../../../modules/notifications/xml/IVS/requests_definitions.xml"/>
     <xi:include href="../../../../modules/sendmail/xml/IVS/requests_definitions.xml"/>
     <xi:include href="../../../../modules/tags/xml/IVS/requests_definitions.xml"/>
     <xi:include href="../../../../modules/templates/xml/IVS/requests_definitions.xml"/>
@@ -296,7 +295,6 @@
     <xi:include href="../../../../modules/ldap/xml/IVS/validation_rules.xml"/>
     <xi:include href="../../../../modules/life_cycle/xml/IVS/validation_rules.xml"/>
     <xi:include href="../../../../modules/notes/xml/IVS/validation_rules.xml"/>
-    <xi:include href="../../../../modules/notifications/xml/IVS/validation_rules.xml"/>
     <xi:include href="../../../../modules/sendmail/xml/IVS/validation_rules.xml"/>
     <xi:include href="../../../../modules/tags/xml/IVS/validation_rules.xml"/>
     <xi:include href="../../../../modules/templates/xml/IVS/validation_rules.xml"/>
@@ -321,7 +319,6 @@
     <xi:include href="../../../../modules/ldap/xml/IVS/data_types.xml"/>
     <xi:include href="../../../../modules/life_cycle/xml/IVS/data_types.xml"/>
     <xi:include href="../../../../modules/notes/xml/IVS/data_types.xml"/>
-    <xi:include href="../../../../modules/notifications/xml/IVS/data_types.xml"/>
     <xi:include href="../../../../modules/sendmail/xml/IVS/data_types.xml"/>
     <xi:include href="../../../../modules/tags/xml/IVS/data_types.xml"/>
     <xi:include href="../../../../modules/templates/xml/IVS/data_types.xml"/>
diff --git a/core/class/class_history.php b/core/class/class_history.php
index bc5ec4db62a..537a92538ac 100755
--- a/core/class/class_history.php
+++ b/core/class/class_history.php
@@ -187,18 +187,6 @@ class history
             echo $info;
             exit;
         }
-
-        $core = new core_tools();
-        if ($core->is_module_loaded("notifications")) {
-            require_once(
-                "modules"
-                .DIRECTORY_SEPARATOR."notifications"
-                .DIRECTORY_SEPARATOR."class"
-                .DIRECTORY_SEPARATOR."events_controler.php"
-            );
-            $eventsCtrl = new events_controler();
-            $eventsCtrl->fill_event_stack($event_id, $table_name, $record_id, $user, $info);
-        }
     }
 
     /**
diff --git a/modules/notifications/class/class_schedule_notifications.php b/modules/notifications/class/class_schedule_notifications.php
deleted file mode 100755
index 2e815a9905f..00000000000
--- a/modules/notifications/class/class_schedule_notifications.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-
-/*
-*   Copyright 2008-2016 Maarch
-*
-*   This file is part of Maarch Framework.
-*
-*   Maarch Framework is free software: you can redistribute it and/or modify
-*   it under the terms of the GNU General Public License as published by
-*   the Free Software Foundation, either version 3 of the License, or
-*   (at your option) any later version.
-*
-*   Maarch Framework is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*   along with Maarch Framework. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/**
-* Class for schedule notifications
-*
-*
-* @package  maarch
-* @version 1.5
-* @since 01/2015
-* @license GPL v3
-* @author  <dev@maarch.org>
-* 
-*/
-
-require_once 'modules/notifications/class/class_schedule_notifications_Abstract.php';
-
-class ScheduleNotifications extends ScheduleNotifications_Abstract
-{
-	// custom
-}
\ No newline at end of file
diff --git a/modules/notifications/class/class_schedule_notifications_Abstract.php b/modules/notifications/class/class_schedule_notifications_Abstract.php
deleted file mode 100755
index d1d288fc680..00000000000
--- a/modules/notifications/class/class_schedule_notifications_Abstract.php
+++ /dev/null
@@ -1,212 +0,0 @@
-<?php
-/**
-* Copyright Maarch since 2008 under licence GPLv3.
-* See LICENCE.txt file at the root folder for more details.
-* This file is part of Maarch software.
-
-* @brief   class_schedule_notifications_Abstract
-* @author  dev <dev@maarch.org>
-* @ingroup core
-*/
-
-abstract class ScheduleNotifications_Abstract
-{
-
-    function getCrontab()
-    {
-        $crontab = shell_exec('crontab -l');
-        $lines = explode("\n", $crontab);
-        $data = array();
-
-        foreach ($lines as $id => $l) {
-            $l = trim($l);
-            if (strpos($l, '#') !== false)
-                $l = substr($l, 0, strpos($l, '#'));
-            if (empty($l))
-                continue;
-            $l = preg_replace('![ \t]+!', ' ', $l);
-            if ($l[0] == '@')
-                list($time, $cmd) = explode(' ', $l, 2);
-            else
-                list($m, $h, $dom, $mon, $dow, $cmd) = explode(' ', $l, 6);
-
-            $data[$id] = array(
-                'm' => $m,
-                'h' => $h,
-                'dom' => $dom,
-                'mon' => $mon,
-                'dow' => $dow,
-                'cmd' => $cmd,
-            );
-
-            if ($_SESSION['custom_override_id'] <> '') {
-                $pathToFolow = $_SESSION['config']['corepath'] . 'custom/'.$_SESSION['custom_override_id'] . '/';
-            } else {
-                $pathToFolow = $_SESSION['config']['corepath'];
-            }
-
-            if (strpos($data[$id]['cmd'], $pathToFolow.'modules/notifications/batch/scripts/') !== 0 ) {
-                $data[$id]['state'] = 'hidden';
-            }
-        }
-
-        return $data;
-    }
-
-    function saveCrontab($data, $delete=false)
-    {
-        foreach ($data AS $id => $d) {
-            if ($d['state'] == 'deleted') {
-                unset($file[$id]);
-            } else
-                $file[$id] = "{$d['m']}\t{$d['h']}\t{$d['dom']}\t{$d['mon']}\t{$d['dow']}\t{$d['cmd']}";
-        }
-
-        $output = '';
-
-        if (isset($file)) {
-            foreach ($file as $l)
-                $output .= "$l\n";
-        }
-
-        $output = preg_replace("!\n+$!", "\n", $output);
-        file_put_contents('/tmp/crontab.plain', print_r($file, true));
-        file_put_contents('/tmp/crontab.txt', $output);
-
-        exec('crontab /tmp/crontab.txt');
-
-        $core_tools = new core_tools();
-        $core_tools->load_lang();
-
-        if (!$delete) {
-            $_SESSION['info'] = _CRONTAB_SAVED;
-        }
-
-        return 0;
-    }
-
-    function getAuthorizedNotifications()
-    {
-        include_once "core/class/class_request.php";
-        $db = new Database();
-        $stmt = $db->query("SELECT notification_sid, description FROM notifications WHERE is_enabled = 'Y'");
-        $notificationsArray = array();
-
-        while ($result = $stmt->fetchObject()) {
-            $filename = "notification";
-            if (isset($_SESSION['custom_override_id']) && $_SESSION['custom_override_id']<>"") {
-                $filename.="_".str_replace(" ", "", $_SESSION['custom_override_id']);
-            }
-            $filename.="_".$result->notification_sid.".sh";
-
-            if ($_SESSION['custom_override_id'] <> '') {
-                $pathToFolow = $_SESSION['config']['corepath'] . 'custom/'.$_SESSION['custom_override_id'] . '/';
-            } else {
-                $pathToFolow = $_SESSION['config']['corepath'];
-            }
-
-            $path = $pathToFolow.'modules/notifications/batch/scripts/'.$filename;
-
-            if (file_exists($path)) {
-                $notificationsArray[$path] = $result->description;
-            }
-        }
-        
-        return $notificationsArray;
-    }
-
-    function createScriptNotification($notification_sid, $notification_id)
-    {
-        //Creer le script sh pour les notifications
-        $filename = "notification";
-        if (isset($_SESSION['custom_override_id']) && $_SESSION['custom_override_id']<>"") {
-            $filename.="_".str_replace(" ", "", $_SESSION['custom_override_id']);
-        }
-        $filename.="_".$notification_sid.".sh";
-
-        if (file_exists($_SESSION['config']['corepath']. 'custom/'.$_SESSION['custom_override_id'] .'/modules/notifications/batch/config/config.xml')) {
-            $ConfigNotif = $_SESSION['config']['corepath']. 'custom/'. $_SESSION['custom_override_id'] .'/modules/notifications/batch/config/config.xml';
-        } else if (file_exists($_SESSION['config']['corepath']. 'custom/'. $_SESSION['custom_override_id'] .'/modules/notifications/batch/config/config_'.$_SESSION['custom_override_id'].'.xml')) {
-            $ConfigNotif = $_SESSION['config']['corepath']. 'custom/'. $_SESSION['custom_override_id'] .'/modules/notifications/batch/config/config_'.$_SESSION['custom_override_id'].'.xml';
-        } else if (file_exists($_SESSION['config']['corepath']. 'modules/notifications/batch/config/config_'.$_SESSION['custom_override_id'].'.xml')) {
-            $ConfigNotif = $_SESSION['config']['corepath']. 'modules/notifications/batch/config/config_'.$_SESSION['custom_override_id'].'.xml';
-        } else {
-            $ConfigNotif = $_SESSION['config']['corepath']. 'modules/notifications/batch/config/config.xml';
-        }
-        
-        if ($_SESSION['custom_override_id'] <> '') {
-            $pathToFolow = $_SESSION['config']['corepath'] . 'custom/'.$_SESSION['custom_override_id'] . '/';
-            //shell_exec("mkdir " . escapeshellarg($pathToFolow.'modules/notifications/batch/scripts/'));
-            if (!file_exists($pathToFolow.'modules/notifications/batch/scripts/')) {
-                mkdir($pathToFolow.'modules/notifications/batch/scripts/', 0777, true);
-            }
-            $file_open = fopen($pathToFolow.'modules/notifications/batch/scripts/'.$filename, 'w+');
-
-        } else {
-            $pathToFolow = $_SESSION['config']['corepath'];
-            $file_open = fopen($pathToFolow.'modules/notifications/batch/scripts/'.$filename, 'w+');
-        }
-
-        fwrite($file_open, '#!/bin/sh');
-        fwrite($file_open, "\n");
-        fwrite($file_open, 'path=\''.$_SESSION['config']['corepath'].'modules/notifications/batch/\'');
-        fwrite($file_open, "\n");
-        fwrite($file_open, 'cd $path');
-        fwrite($file_open, "\n");
-        if ($notification_id == 'BASKETS') {      
-            fwrite($file_open, 'php \'basket_event_stack.php\' -c '.$ConfigNotif.' -n '.$notification_id);
-        } 
-        else if ($notification_id == 'RELANCE1' || $notification_id == 'RELANCE2' || $notification_id == 'RET1' || $notification_id == 'RET2'){
-            fwrite($file_open, 'php \'stack_letterbox_alerts.php\' -c '.$ConfigNotif);
-            fwrite($file_open, "\n");
-            fwrite($file_open, 'php \'process_event_stack.php\' -c '.$ConfigNotif.' -n '.$notification_id);
-        }
-        else {
-            fwrite($file_open, 'php \'process_event_stack.php\' -c '.$ConfigNotif.' -n '.$notification_id);
-        }
-        fwrite($file_open, "\n");
-        fwrite($file_open, 'cd $path');
-        fwrite($file_open, "\n");
-        fwrite($file_open, 'php \'process_email_stack.php\' -c '.$ConfigNotif);
-        fwrite($file_open, "\n");
-        fclose($file_open);
-        shell_exec(
-            "chmod +x "
-            . escapeshellarg($pathToFolow . "modules/notifications/batch/scripts/" . $filename)
-        );
-    }
-
-    function checkCrontab($crontabToSave)
-    {
-
-        $crontabBeforeSave = $this->getCrontab();
-        $error = 0;
-        foreach ($crontabToSave as $id => $e) {
-            if ($e['state'] == "deleted") {
-                // nothing to do
-            } else if ($e['state'] == "new" || $e['state'] == "normal") {
-                
-                if ($_SESSION['custom_override_id'] <> '') {
-                    $pathToFolow = $_SESSION['config']['corepath'] . 'custom/'.$_SESSION['custom_override_id'] . '/';
-                } else {
-                    $pathToFolow = $_SESSION['config']['corepath'];
-                }
-                if (strpos($crontabToSave[$id]['cmd'], $pathToFolow.'modules/notifications/batch/scripts/') !== 0) {
-                    $error = 1;
-                    break;
-                }
-            } else if ($e['state'] == "hidden") {
-                if ($e['cmd'] != $crontabBeforeSave[$id]['cmd']) {
-                    $error = 1;
-                    break;
-                }
-            } else {
-                $error = 1;
-                break;
-            }
-        }
-
-        return $error;
-    }
-
-}
\ No newline at end of file
diff --git a/modules/notifications/class/diffusion_type.php b/modules/notifications/class/diffusion_type.php
deleted file mode 100755
index 401a283623a..00000000000
--- a/modules/notifications/class/diffusion_type.php
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-
-/*
-*   Copyright 2008-2016 Maarch
-*
-*   This file is part of Maarch Framework.
-*
-*   Maarch Framework is free software: you can redistribute it and/or modify
-*   it under the terms of the GNU General Public License as published by
-*   the Free Software Foundation, either version 3 of the License, or
-*   (at your option) any later version.
-*
-*   Maarch Framework is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*   along with Maarch Framework. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/**
-* @brief Contains the diffusion_type Object
-* (herits of the BaseObject class)
-*
-* @file
-* @author Loïc Vinet - Maarch
-* @date $date$
-* @version $Revision$
-* @ingroup core
-*/
-
-require_once 'modules/notifications/class/diffusion_type_Abstract.php';
-
-/**
- * Class for controling docservers objects from database
- */
-class diffusion_type extends diffusion_type_Abstract
-{
-	// custom
-}
-
diff --git a/modules/notifications/class/diffusion_type_Abstract.php b/modules/notifications/class/diffusion_type_Abstract.php
deleted file mode 100755
index c35fbb6a8fe..00000000000
--- a/modules/notifications/class/diffusion_type_Abstract.php
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-
-/*
-*   Copyright 2008-2016 Maarch
-*
-*   This file is part of Maarch Framework.
-*
-*   Maarch Framework is free software: you can redistribute it and/or modify
-*   it under the terms of the GNU General Public License as published by
-*   the Free Software Foundation, either version 3 of the License, or
-*   (at your option) any later version.
-*
-*   Maarch Framework is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*   along with Maarch Framework. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/**
-* @brief Contains the diffusion_type Object
-* (herits of the BaseObject class)
-*
-* @file
-* @author Loïc Vinet - Maarch
-* @date $date$
-* @version $Revision$
-* @ingroup core
-*/
-
-
-// Loads the required class
-try {
-    require_once("core/class/BaseObject.php");
-    require_once("core/class/ObjectControlerAbstract.php");
-} catch (Exception $e){
-    functions::xecho($e->getMessage()).' // ';
-}
-
-/**
- * Class for controling docservers objects from database
- */
-abstract class diffusion_type_Abstract
-    extends ObjectControler
-{
-		/**
-		 *Print a viewable string to render the object.
-		 * @return string Rendering of the object
-		 */
-/*
-		public function __toString()
-		{
-			return $this->notification_sid;
-		}
-*/
-}
-
diff --git a/modules/notifications/class/diffusion_type_controler.php b/modules/notifications/class/diffusion_type_controler.php
deleted file mode 100755
index 17dbfd10944..00000000000
--- a/modules/notifications/class/diffusion_type_controler.php
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-
-/*
-*   Copyright 2008-2016 Maarch
-*
-*   This file is part of Maarch Framework.
-*
-*   Maarch Framework is free software: you can redistribute it and/or modify
-*   it under the terms of the GNU General Public License as published by
-*   the Free Software Foundation, either version 3 of the License, or
-*   (at your option) any later version.
-*
-*   Maarch Framework is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*   along with Maarch Framework. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/**
-* @brief Contains the diffusion_type Object
-* (herits of the BaseObject class)
-*
-* @file
-* @author Loïc Vinet - Maarch
-* @date $date$
-* @version $Revision$
-* @ingroup core
-*/
-
-require_once 'modules/notifications/class/diffusion_type_controler_Abstract.php';
-
-/**
- * Class for controling docservers objects from database
- */
-class diffusion_type_controler extends diffusion_type_controler_Abstract 
-{
-    // custom
-}
-
diff --git a/modules/notifications/class/diffusion_type_controler_Abstract.php b/modules/notifications/class/diffusion_type_controler_Abstract.php
deleted file mode 100755
index 8be9ca101aa..00000000000
--- a/modules/notifications/class/diffusion_type_controler_Abstract.php
+++ /dev/null
@@ -1,100 +0,0 @@
-<?php
-
-/*
-*   Copyright 2008-2016 Maarch
-*
-*   This file is part of Maarch Framework.
-*
-*   Maarch Framework is free software: you can redistribute it and/or modify
-*   it under the terms of the GNU General Public License as published by
-*   the Free Software Foundation, either version 3 of the License, or
-*   (at your option) any later version.
-*
-*   Maarch Framework is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*   along with Maarch Framework. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/**
-* @brief Contains the diffusion_type Object
-* (herits of the BaseObject class)
-*
-* @file
-* @author Loïc Vinet - Maarch
-* @date $date$
-* @version $Revision$
-* @ingroup core
-*/
-
-//Loads the required class
-try {
-    require_once 'modules/notifications/class/diffusion_type.php';
-    require_once 'core/class/ObjectControlerAbstract.php';
-} catch (Exception $e) {
-    functions::xecho($e->getMessage()) . ' // ';
-}
-
-/**
- * Class for controling docservers objects from database
- */
-abstract class diffusion_type_controler_Abstract extends ObjectControler
-    //implements ObjectControlerIF
-{
-    /**
-     * Get event with given event_id.
-     * Can return null if no corresponding object.
-     * @param $id Id of event to get
-     * @return event
-     */
-    public function getAllDiffusion()
-    {
-        core_tools::load_lang();
-        $return = array();
-        $xmlfile = 'modules/notifications/xml/diffusion_type.xml';
-        $xmlfileCustom = $_SESSION['config']['corepath']
-            . 'custom/' . $_SESSION['custom_override_id'] . '/' . $xmlfile;
-        if (file_exists($xmlfileCustom)) {
-            $xmlfile = $xmlfileCustom;
-        }
-        $xmldiffusion = simplexml_load_file($xmlfile);
-        foreach ($xmldiffusion->diffusion_type as $diffusion) {
-            $diffusion_type = new diffusion_type();
-            
-            if (@constant((string) $diffusion->label)) {
-                $label = constant((string)$diffusion->label);
-            } else {
-                $label = (string) $diffusion->label;
-            }
-            
-            $diffusion_type->id = (string) $diffusion->id;
-            $diffusion_type->label = $label;
-            $diffusion_type->script = (string) $diffusion->script;
-        
-            $return[$diffusion_type->id] = $diffusion_type;
-        }
-        
-        if (isset($return)) {
-            return $return;
-        } else {
-            return null;
-        }
-    }
-  
-    public function get($type_id)
-    {
-        if ($type_id <> '') {
-            $fulllist = array();
-            $fulllist = $this->getAllDiffusion();
-            foreach ($fulllist as $dt_id => $dt) {
-                if ($type_id == $dt_id) {
-                    return $dt;
-                }
-            }
-        }
-        return null;
-    }
-}
diff --git a/modules/notifications/class/events.php b/modules/notifications/class/events.php
deleted file mode 100755
index 430f67cb3e3..00000000000
--- a/modules/notifications/class/events.php
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-
-/*
-*   Copyright 2008-2016 Maarch
-*
-*   This file is part of Maarch Framework.
-*
-*   Maarch Framework is free software: you can redistribute it and/or modify
-*   it under the terms of the GNU General Public License as published by
-*   the Free Software Foundation, either version 3 of the License, or
-*   (at your option) any later version.
-*
-*   Maarch Framework is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*   along with Maarch Framework. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/**
-* @brief Contains the events Object
-* (herits of the BaseObject class)
-*
-* @file
-* @author Cyril Vazquez - Maarch
-* @date $date$
-* @version $Revision$
-* @ingroup core
-*/
-
-require_once 'modules/notifications/class/events_Abstract.php';
-
-/**
- * Class for controling docservers objects from database
- */
-class events extends events_Abstract
-{
-	// custom
-}
-
diff --git a/modules/notifications/class/events_Abstract.php b/modules/notifications/class/events_Abstract.php
deleted file mode 100755
index a8236bb1f3b..00000000000
--- a/modules/notifications/class/events_Abstract.php
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-
-/*
-*   Copyright 2008-2016 Maarch
-*
-*   This file is part of Maarch Framework.
-*
-*   Maarch Framework is free software: you can redistribute it and/or modify
-*   it under the terms of the GNU General Public License as published by
-*   the Free Software Foundation, either version 3 of the License, or
-*   (at your option) any later version.
-*
-*   Maarch Framework is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*   along with Maarch Framework. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/**
-* @brief Contains the events Object
-* (herits of the BaseObject class)
-*
-* @file
-* @author Cyril Vazquez - Maarch
-* @date $date$
-* @version $Revision$
-* @ingroup core
-*/
-
-
-// Loads the required class
-try {
-    require_once("core/class/BaseObject.php");
-    require_once("core/class/ObjectControlerAbstract.php");
-} catch (Exception $e){
-    functions::xecho($e->getMessage()).' // ';
-}
-
-/**
- * Class for controling docservers objects from database
- */
-abstract class events_Abstract extends ObjectControler
-{
-	/**
-	 *Print a viewable string to render the object.
-	 * @return string Rendering of the object
-	 */
-
-	public function __toString()
-	{
-		return $this->event_sid;
-	}
-}
-
diff --git a/modules/notifications/class/events_controler.php b/modules/notifications/class/events_controler.php
deleted file mode 100755
index 16b4bb6e6c3..00000000000
--- a/modules/notifications/class/events_controler.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-
-/*
-*   Copyright 2008-2016 Maarch
-*
-*   This file is part of Maarch Framework.
-*
-*   Maarch Framework is free software: you can redistribute it and/or modify
-*   it under the terms of the GNU General Public License as published by
-*   the Free Software Foundation, either version 3 of the License, or
-*   (at your option) any later version.
-*
-*   Maarch Framework is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*   along with Maarch Framework. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/**
-* @brief Contains the docservers_controler Object
-* (herits of the BaseObject class)
-*
-* @file
-* @author Loïc Vinet - Maarch
-* @date $date$
-* @version $Revision$
-* @ingroup core
-*/
-
-require_once 'modules/notifications/class/events_controler_Abstract.php';
-
-/**
- * Class for controling docservers objects from database
- */
-class events_controler extends events_controler_Abstract
-{
-    // custom    
-}
diff --git a/modules/notifications/class/events_controler_Abstract.php b/modules/notifications/class/events_controler_Abstract.php
deleted file mode 100755
index b963efdf0f6..00000000000
--- a/modules/notifications/class/events_controler_Abstract.php
+++ /dev/null
@@ -1,104 +0,0 @@
-<?php
-
-/*
-*   Copyright 2008-2016 Maarch
-*
-*   This file is part of Maarch Framework.
-*
-*   Maarch Framework is free software: you can redistribute it and/or modify
-*   it under the terms of the GNU General Public License as published by
-*   the Free Software Foundation, either version 3 of the License, or
-*   (at your option) any later version.
-*
-*   Maarch Framework is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*   along with Maarch Framework. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/**
-* @brief Contains the docservers_controler Object
-* (herits of the BaseObject class)
-*
-* @file
-* @author Loïc Vinet - Maarch
-* @date $date$
-* @version $Revision$
-* @ingroup core
-*/
-
-//Loads the required class
-try {
-    require_once 'modules/notifications/class/events.php';
-    require_once 'modules/notifications/notifications_tables_definition.php';
-    require_once 'core/class/ObjectControlerAbstract.php';
-    require_once 'core/class/class_db_pdo.php';
-} catch (Exception $e) {
-    functions::xecho($e->getMessage()) . ' // ';
-}
-
-/**
- * Class for controling docservers objects from database
- */
-abstract class events_controler_Abstract extends ObjectControler
-{
-  
-    function wildcard_match($pattern, $str)
-    {
-        $pattern = '/^' . str_replace(array('%', '\*', '\?', '\[', '\]'), array('.*', '.*', '.', '[', ']+'), preg_quote($pattern)) . '$/is';
-        $result = preg_match($pattern, $str);
-        return $result;
-    }
-    
-    public function fill_event_stack($event_id, $table_name, $record_id, $user, $info) {
-        if ($record_id == '') return;
-        
-        $query = "SELECT * "
-            ."FROM " . _NOTIFICATIONS_TABLE_NAME 
-            ." WHERE is_enabled = 'Y'";
-        $dbConn = new Database();
-        $stmt = $dbConn->query($query);
-        if($stmt->rowCount() === 0) {
-            return;
-        }
-        
-        while($notification = $stmt->fetchObject()) {
-            $event_ids = explode(',' , $notification->event_id);
-            if($event_id == $notification->event_id
-                || $this->wildcard_match($notification->event_id, $event_id)
-                || in_array($event_id, $event_ids)) {
-                $notifications[] = $notification;
-            }
-        }
-        if (empty($notifications) || !is_array($notifications) || count($notifications) == 0)
-            return;
-        foreach ($notifications as $notification) {
-            $dbConn->query(
-                "INSERT INTO "
-                    ._NOTIF_EVENT_STACK_TABLE_NAME." ("
-                        ."notification_sid, "
-                        ."table_name, "
-                        ."record_id, "
-                        ."user_id, "
-                        ."event_info, "
-                        ."event_date"
-                    .") "
-                ."VALUES(?, "
-                    ."?, "
-                    ."?, "
-                    ."?, "
-                    ."?, CURRENT_TIMESTAMP)",
-                array(
-                    $notification->notification_sid,
-                    $table_name,
-                    $record_id,
-                    $user,
-                    $info
-                )
-            );
-        }
-    }  
-}
diff --git a/modules/notifications/class/notifications.php b/modules/notifications/class/notifications.php
deleted file mode 100755
index f6d5a63994e..00000000000
--- a/modules/notifications/class/notifications.php
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-/*
-*   Copyright 2008-2016 Maarch
-*
-*   This file is part of Maarch Framework.
-*
-*   Maarch Framework is free software: you can redistribute it and/or modify
-*   it under the terms of the GNU General Public License as published by
-*   the Free Software Foundation, either version 3 of the License, or
-*   (at your option) any later version.
-*
-*   Maarch Framework is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*   along with Maarch Framework.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/**
-* @brief  Contains the notification Object (herits of the BaseObject class)
-* 
-* 
-* @file
-* @author Laurent Giovannoni <dev@maarch.org>
-* @date $date$
-* @version $Revision$
-* @ingroup template	
-*/
-
-require_once 'modules/notifications/class/notifications_Abstract.php';
-
-/**
-* @brief  lc_policies Object, herits of the BaseObject class 
-*
-* @ingroup template
-*/
-class notifications extends notifications_Abstract
-{
-    // custom
-}
diff --git a/modules/notifications/class/notifications_Abstract.php b/modules/notifications/class/notifications_Abstract.php
deleted file mode 100755
index b6129e2f28f..00000000000
--- a/modules/notifications/class/notifications_Abstract.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-/*
-*   Copyright 2008-2016 Maarch
-*
-*   This file is part of Maarch Framework.
-*
-*   Maarch Framework is free software: you can redistribute it and/or modify
-*   it under the terms of the GNU General Public License as published by
-*   the Free Software Foundation, either version 3 of the License, or
-*   (at your option) any later version.
-*
-*   Maarch Framework is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*   along with Maarch Framework.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/**
-* @brief  Contains the notification Object (herits of the BaseObject class)
-* 
-* 
-* @file
-* @author Laurent Giovannoni <dev@maarch.org>
-* @date $date$
-* @version $Revision$
-* @ingroup template	
-*/
-
-// Loads the required class
-try {
-    require_once("core/class/BaseObject.php");
-} catch (Exception $e){
-    functions::xecho($e->getMessage()).' // ';
-}
-
-/**
-* @brief  lc_policies Object, herits of the BaseObject class 
-*
-* @ingroup template
-*/
-abstract class notifications_Abstract extends BaseObject
-{
-    /**
-     *Print a viewable string to render the object.
-     * @return string Rendering of the object
-     */
-    public function __toString()
-    {
-        return $this->notification_sid;
-    }
-}
diff --git a/modules/notifications/create_notif_script.php b/modules/notifications/create_notif_script.php
deleted file mode 100755
index f9bbaf20354..00000000000
--- a/modules/notifications/create_notif_script.php
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-
-/*
-*    Copyright 2015 Maarch
-*
-*  This file is part of Maarch Framework.
-*
-*   Maarch Framework is free software: you can redistribute it and/or modify
-*   it under the terms of the GNU General Public License as published by
-*   the Free Software Foundation, either version 3 of the License, or
-*   (at your option) any later version.
-*
-*   Maarch Framework is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*    along with Maarch Framework.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/**
-* @brief  create notification script
-*
-*
-* @file
-* @author <dev@maarch.org>
-* @date $date$
-* @version $Revision$
-* @ingroup admin
-*/
-
-
-$core_tools = new core_tools();
-$core_tools->test_user();
-
-require_once 'modules/notifications/class/class_schedule_notifications.php';
-
-$ScheduleNotifications = new ScheduleNotifications();
-
-$ScheduleNotifications->createScriptNotification($_POST['notification_sid'], $_POST['notification_id']);
-
-echo "{status : 0}";
-exit;
\ No newline at end of file
diff --git a/modules/notifications/css/template.css b/modules/notifications/css/template.css
deleted file mode 100755
index aa0bca7cad9..00000000000
--- a/modules/notifications/css/template.css
+++ /dev/null
@@ -1,70 +0,0 @@
-/* misc */
-
-
-html {
-    height: 100%;
-}
-
-body {
-    color: #666;
-    /*background: white url(static.php?filename=bg_body.gif) top center repeat-y;*/
-    font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
-    font-size: 14px;
-    font-weight: normal;
-    letter-spacing: 0.02em;
-    margin: 0;
-    padding: 0;
-    text-align: left;
-    width: 99.9%;
-    height: 99%;
-}
-
-div, h1, h2, h3, h4, h5, h6, p, ul, ol, li {
-    margin: 0;
-    padding: 0;
-    list-style: none;
-}
-
-h2
-{
-    font-size: 16px;
-    clear:both;
-}
-h3
-{
-    font-size: 14px;
-}
-
-table {
-    font-size: 1em;
-}
-
-th {
-	border: 1px;
-	background-color : #135F7F;
-	text-align: center;
-    padding: 5px 10px 6px 20px;
-    vertical-align: middle;
-}
-td {
-	border: 1px;
-	background-color: #135F7F33;
-	text-align: left;
-    padding: 5px 10px 6px 20px;
-    vertical-align: middle;
-}
-
-img {
-    border: none;
-}
-
-a, a:link, a:visited, a:hover {
-    color: #666;
-    text-decoration: none;
-}
-
-a:hover {
-    color: #135F7F;
-}
-
-
diff --git a/modules/notifications/diffusion_types/contact.php b/modules/notifications/diffusion_types/contact.php
deleted file mode 100755
index 981c7cce19c..00000000000
--- a/modules/notifications/diffusion_types/contact.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-/**
-* Copyright Maarch since 2008 under licence GPLv3.
-* See LICENCE.txt file at the root folder for more details.
-* This file is part of Maarch software.
-
-*
-* @brief   contact
-*
-* @author  dev <dev@maarch.org>
-* @ingroup notifications
-*/
-switch ($request) {
-    case 'recipients':
-        $query = 'SELECT contact_id as user_id, contact_email as mail'
-            .' FROM res_view_letterbox '
-            ." WHERE (contact_email is not null or contact_email <> '') and res_id = ?";
-        $dbRecipients = new Database();
-        $stmt = $dbRecipients->query($query, array($event->record_id));
-        $recipients = array();
-        while ($recipient = $stmt->fetchObject()) {
-            $recipients[] = $recipient;
-        }
-        break;
-
-    case 'attach':
-        $query = 'SELECT contact_id as user_id, contact_email as mail'
-            .' FROM res_view_letterbox '
-            ." WHERE (contact_email is not null or contact_email <> '') and res_id = ?";
-        $attach = false;
-        $dbAttach = new Database();
-        $stmt = $dbAttach->query($query, array($event->record_id));
-        if ($stmt->rowCount() > 0) {
-            $attach = true;
-        }
-        break;
-}
diff --git a/modules/notifications/diffusion_types/copy_list.php b/modules/notifications/diffusion_types/copy_list.php
deleted file mode 100755
index 090675d0b48..00000000000
--- a/modules/notifications/diffusion_types/copy_list.php
+++ /dev/null
@@ -1,145 +0,0 @@
-<?php
-/**
-* Copyright Maarch since 2008 under licence GPLv3.
-* See LICENCE.txt file at the root folder for more details.
-* This file is part of Maarch software.
-
-*
-* @brief   copy_list
-*
-* @author  dev <dev@maarch.org>
-* @ingroup notification
-*/
-switch ($request) {
-    case 'recipients':
-        $recipients = array();
-        $dbRecipients = new Database();
-
-        // Copy to users
-        $select = 'SELECT distinct us.*';
-        $from = ' FROM listinstance li '
-            .' JOIN users us ON li.item_id = us.user_id';
-        $where = " WHERE li.coll_id = 'letterbox_coll'   AND li.item_mode = 'cc'"
-            ." AND item_type='user_id'";
-
-        $arrayPDO = array(':recordid' => $event->record_id);
-
-        switch ($event->table_name) {
-            case 'notes':
-                $from .= ' JOIN notes ON notes.identifier = li.res_id';
-                $where .= ' AND notes.id = :recordid AND li.item_id != notes.user_id'
-                    .' AND ('
-                        .' notes.id not in (SELECT DISTINCT note_id FROM note_entities) '
-                        .' OR us.user_id IN (SELECT ue.user_id FROM note_entities ne JOIN users_entities ue ON ne.item_id = ue.entity_id WHERE ne.note_id = :recordid)'
-                    .')'
-                ;
-                break;
-
-            case 'res_letterbox':
-            case 'res_view_letterbox':
-                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
-                $where .= ' AND lb.res_id = :recordid';
-                break;
-
-            case 'listinstance':
-            default:
-                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
-                $where .= " AND listinstance_id = :recordid AND lb.status not in ('INIT', 'AVAL') AND li.item_id <> :userid";
-                $arrayPDO = array_merge($arrayPDO, array(':userid' => $event->user_id));
-        }
-
-        $query = $select.$from.$where;
-
-        if ($GLOBALS['logger']) {
-            $GLOBALS['logger']->write($query, 'DEBUG');
-        }
-
-        $stmt = $dbRecipients->query($query, $arrayPDO);
-
-        while ($recipient = $stmt->fetchObject()) {
-            $recipients[] = $recipient;
-        }
-
-        $arrayPDO = array(':recordid' => $event->record_id);
-        // Copy to entities
-        $select = 'SELECT distinct us.*';
-        $from = ' FROM listinstance li '
-            .' LEFT JOIN users_entities ue ON li.item_id = ue.entity_id '
-            .' JOIN users us ON ue.user_id = us.user_id';
-        $where = " WHERE li.coll_id = 'letterbox_coll'   AND li.item_mode = 'cc'"
-            ." AND item_type='entity_id'";
-
-        switch ($event->table_name) {
-            case 'notes':
-                $from .= ' JOIN notes ON notes.identifier = li.res_id';
-                $where .= ' AND notes.id = :recordid AND li.item_id != notes.user_id'
-                    .' AND ('
-                        .' notes.id not in (SELECT DISTINCT note_id FROM note_entities) '
-                        .' OR us.user_id IN (SELECT ue.user_id FROM note_entities ne JOIN users_entities ue ON ne.item_id = ue.entity_id WHERE ne.note_id = :recordid)'
-                    .')'
-                ;
-                break;
-
-            case 'res_letterbox':
-            case 'res_view_letterbox':
-                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
-                $where .= ' AND lb.res_id = :recordid';
-                break;
-
-            case 'listinstance':
-            default:
-                $where .= ' AND listinstance_id = :recordid';
-        }
-
-        $query = $select.$from.$where;
-
-        if ($GLOBALS['logger']) {
-            $GLOBALS['logger']->write($query, 'DEBUG');
-        }
-
-        $stmt = $dbRecipients->query($query, $arrayPDO);
-
-        while ($recipient = $stmt->fetchObject()) {
-            $recipients[] = $recipient;
-        }
-        break;
-
-    case 'attach':
-        $attach = false;
-        break;
-
-    case 'res_id':
-        $arrayPDO = array(':recordid' => $event->record_id);
-        $select = 'SELECT li.res_id';
-        $from = ' FROM listinstance li';
-        $where = " WHERE li.coll_id = 'letterbox_coll'   ";
-
-        switch ($event->table_name) {
-            case 'notes':
-                $from .= ' JOIN notes ON notes.identifier = li.res_id';
-                $where .= ' AND notes.id = :recordid AND li.item_id != notes.user_id';
-                break;
-
-            case 'res_letterbox':
-            case 'res_view_letterbox':
-                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
-                $where .= ' AND lb.res_id = :recordid';
-                break;
-
-            case 'listinstance':
-            default:
-                $where .= ' AND listinstance_id = :recordid';
-        }
-
-        $query = $query = $select.$from.$where;
-
-        if ($GLOBALS['logger']) {
-            $GLOBALS['logger']->write($query, 'DEBUG');
-        }
-
-        $dbResId = new Database();
-        $stmt = $dbResId->query($query, $arrayPDO);
-        $res_id_record = $stmt->fetchObject();
-        $res_id = $res_id_record->res_id;
-        break;
-}
diff --git a/modules/notifications/diffusion_types/dest_entity.php b/modules/notifications/diffusion_types/dest_entity.php
deleted file mode 100755
index 36c0ba1e974..00000000000
--- a/modules/notifications/diffusion_types/dest_entity.php
+++ /dev/null
@@ -1,93 +0,0 @@
-<?php
-/**
-* Copyright Maarch since 2008 under licence GPLv3.
-* See LICENCE.txt file at the root folder for more details.
-* This file is part of Maarch software.
-
-*
-* @brief   dest_entity
-*
-* @author  dev <dev@maarch.org>
-* @ingroup notifications
-*/
-switch ($request) {
-    case 'recipients':
-        $recipients = array();
-        $dbRecipients = new Database();
-
-        $select = 'SELECT distinct en.entity_id, en.enabled, en.email AS mail';
-        $from = ' FROM res_view_letterbox rvl JOIN entities en ON rvl.destination = en.entity_id';
-        $where = ' WHERE rvl.res_id = :recordid';
-
-        $arrayPDO = array(':recordid' => $event->record_id);
-
-        $query = $select.$from.$where;
-
-        if ($GLOBALS['logger']) {
-            $GLOBALS['logger']->write($query, 'DEBUG');
-        }
-        $stmt = $dbRecipients->query($query, $arrayPDO);
-
-        while ($recipient = $stmt->fetchObject()) {
-            $recipients[] = $recipient;
-        }
-        break;
-
-    case 'attach':
-        $attach = false;
-        break;
-
-    case 'res_id':
-        $select = 'SELECT li.res_id';
-        $from = ' FROM listinstance li';
-        $where = " WHERE li.coll_id = 'letterbox_coll'   ";
-
-        $arrayPDO = array(':recordid' => $event->record_id);
-        switch ($event->table_name) {
-            case 'notes':
-                $from .= ' JOIN notes ON notes.identifier = li.res_id';
-                $from .= ' JOIN res_letterbox lb ON lb.res_id = notes.identifier';
-                $where .= ' AND notes.id = :recordid AND li.item_id != notes.user_id';
-                if ($notification->diffusion_properties != '') {
-                    $status_tab = explode(',', $notification->diffusion_properties);
-                    // $status_str=implode("','",$status_tab);
-                    $where .= ' AND lb.status in (:statustab)';
-                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
-                }
-                break;
-
-            case 'res_letterbox':
-            case 'res_view_letterbox':
-                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
-                $where .= ' AND lb.res_id = :recordid';
-                if ($notification->diffusion_properties != '') {
-                    $status_tab = explode(',', $notification->diffusion_properties);
-                    // $status_str=implode("','",$status_tab);
-                    $where .= ' AND lb.status in (:statustab)';
-                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
-                }
-                break;
-
-            case 'listinstance':
-            default:
-                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
-                $where .= ' AND listinstance_id = :recordid';
-                if ($notification->diffusion_properties != '') {
-                    $status_tab = explode(',', $notification->diffusion_properties);
-                    // $status_str=implode("','",$status_tab);
-                    $where .= ' AND lb.status in (:statustab)';
-                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
-                }
-        }
-
-        $query = $query = $select.$from.$where;
-
-        if ($GLOBALS['logger']) {
-            $GLOBALS['logger']->write($query, 'DEBUG');
-        }
-        $dbResId = new Database();
-        $stmt = $dbResId->query($query, $arrayPDO);
-        $res_id_record = $stmt->fetchObject();
-        $res_id = $res_id_record->res_id;
-        break;
-}
diff --git a/modules/notifications/diffusion_types/dest_user.php b/modules/notifications/diffusion_types/dest_user.php
deleted file mode 100755
index a13ac9c26f2..00000000000
--- a/modules/notifications/diffusion_types/dest_user.php
+++ /dev/null
@@ -1,128 +0,0 @@
-<?php
-/**
-* Copyright Maarch since 2008 under licence GPLv3.
-* See LICENCE.txt file at the root folder for more details.
-* This file is part of Maarch software.
-
-*
-* @brief   dest_user
-*
-* @author  dev <dev@maarch.org>
-* @ingroup notifications
-*/
-switch ($request) {
-    case 'recipients':
-        $recipients = array();
-        $dbRecipients = new Database();
-
-        $select = 'SELECT distinct us.*';
-        $from = ' FROM listinstance li JOIN users us ON li.item_id = us.user_id';
-        $where = " WHERE li.item_mode = 'dest'";
-
-        $arrayPDO = array(':recordid' => $event->record_id);
-        switch ($event->table_name) {
-            case 'notes':
-                $from .= ' JOIN notes ON notes.identifier = li.res_id';
-                $from .= ' JOIN res_letterbox lb ON lb.res_id = notes.identifier';
-                $where .= ' AND notes.id = :recordid AND us.id != notes.user_id'
-                    .' AND ('
-                        .' notes.id not in (SELECT DISTINCT note_id FROM note_entities) '
-                        .' OR us.user_id IN (SELECT ue.user_id FROM note_entities ne JOIN users_entities ue ON ne.item_id = ue.entity_id WHERE ne.note_id = :recordid)'
-                    .')';
-                if ($notification->diffusion_properties != '') {
-                    $status_tab = explode(',', $notification->diffusion_properties);
-                    $where .= ' AND lb.status in (:statustab)';
-                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
-                }
-
-                break;
-
-            case 'res_letterbox':
-            case 'res_view_letterbox':
-                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
-                $where .= ' AND lb.res_id = :recordid';
-                if ($notification->diffusion_properties != '') {
-                    $status_tab = explode(',', $notification->diffusion_properties);
-                    $where .= ' AND lb.status in (:statustab)';
-                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
-                }
-                break;
-
-            case 'listinstance':
-            default:
-                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
-                $where .= ' AND listinstance_id = :recordid';
-                if ($notification->diffusion_properties != '') {
-                    $status_tab = explode(',', $notification->diffusion_properties);
-                    $where .= ' AND lb.status in (:statustab)';
-                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
-                }
-        }
-
-        $query = $select.$from.$where;
-
-        if ($GLOBALS['logger']) {
-            $GLOBALS['logger']->write($query, 'DEBUG');
-        }
-        $stmt = $dbRecipients->query($query, $arrayPDO);
-
-        while ($recipient = $stmt->fetchObject()) {
-            $recipients[] = $recipient;
-        }
-        break;
-
-    case 'attach':
-        $attach = false;
-        break;
-
-    case 'res_id':
-        $select = 'SELECT li.res_id';
-        $from = ' FROM listinstance li JOIN users us ON li.item_id = us.user_id';
-        $where = " WHERE ";
-
-        $arrayPDO = array(':recordid' => $event->record_id);
-        switch ($event->table_name) {
-            case 'notes':
-                $from .= ' JOIN notes ON notes.identifier = li.res_id';
-                $from .= ' JOIN res_letterbox lb ON lb.res_id = notes.identifier';
-                $where .= ' notes.id = :recordid AND us.id != notes.user_id';
-                if ($notification->diffusion_properties != '') {
-                    $status_tab = explode(',', $notification->diffusion_properties);
-                    $where .= ' AND lb.status in (:statustab)';
-                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
-                }
-                break;
-
-            case 'res_letterbox':
-            case 'res_view_letterbox':
-                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
-                $where .= ' lb.res_id = :recordid';
-                if ($notification->diffusion_properties != '') {
-                    $status_tab = explode(',', $notification->diffusion_properties);
-                    $where .= ' AND lb.status in (:statustab)';
-                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
-                }
-                break;
-
-            case 'listinstance':
-            default:
-                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
-                $where .= ' listinstance_id = :recordid';
-                if ($notification->diffusion_properties != '') {
-                    $status_tab = explode(',', $notification->diffusion_properties);
-                    $where .= ' AND lb.status in (:statustab)';
-                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
-                }
-        }
-
-        $query = $query = $select.$from.$where;
-
-        if ($GLOBALS['logger']) {
-            $GLOBALS['logger']->write($query, 'DEBUG');
-        }
-        $dbResId = new Database();
-        $stmt = $dbResId->query($query, $arrayPDO);
-        $res_id_record = $stmt->fetchObject();
-        $res_id = $res_id_record->res_id;
-        break;
-}
diff --git a/modules/notifications/diffusion_types/dest_user_sign.php b/modules/notifications/diffusion_types/dest_user_sign.php
deleted file mode 100755
index 25a79fa3a20..00000000000
--- a/modules/notifications/diffusion_types/dest_user_sign.php
+++ /dev/null
@@ -1,136 +0,0 @@
-<?php
-/**
-* Copyright Maarch since 2008 under licence GPLv3.
-* See LICENCE.txt file at the root folder for more details.
-* This file is part of Maarch software.
-
-*
-* @brief   dest_user_sign
-*
-* @author  dev <dev@maarch.org>
-* @ingroup notifications
-*/
-switch ($request) {
-    case 'recipients':
-        $recipients = array();
-        $dbRecipients = new Database();
-
-        $select = 'SELECT distinct us.*';
-        $from = ' FROM listinstance li JOIN users us ON li.item_id = us.user_id';
-        $where = " WHERE li.coll_id = 'letterbox_coll' AND li.item_mode = 'sign' "
-            .'and process_date IS NULL ';
-
-        $arrayPDO = array(':recordid' => $event->record_id);
-        switch ($event->table_name) {
-            case 'notes':
-                $from .= ' JOIN notes ON notes.identifier = li.res_id';
-                $from .= ' JOIN res_letterbox lb ON lb.res_id = notes.identifier';
-                $where .= ' AND notes.id = :recordid AND li.item_id != notes.user_id'
-                    .' AND ('
-                        .' notes.id not in (SELECT DISTINCT note_id FROM note_entities) '
-                        .' OR us.user_id IN (SELECT ue.user_id FROM note_entities ne JOIN '
-                        .' users_entities ue ON ne.item_id = ue.entity_id WHERE ne.note_id = :recordid)'
-                    .')';
-                if ($notification->diffusion_properties != '') {
-                    $status_tab = explode(',', $notification->diffusion_properties);
-                    // $status_str=implode("','",$status_tab);
-                    $where .= ' AND lb.status in (:statustab)';
-                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
-                }
-
-                break;
-
-            case 'res_letterbox':
-            case 'res_view_letterbox':
-                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
-                $where .= ' AND lb.res_id = :recordid';
-                if ($notification->diffusion_properties != '') {
-                    $status_tab = explode(',', $notification->diffusion_properties);
-                    // $status_str=implode("','",$status_tab);
-                    $where .= ' AND lb.status in (:statustab)';
-                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
-                }
-                break;
-
-            case 'listinstance':
-            default:
-                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
-                $where .= ' AND listinstance_id = :recordid';
-                if ($notification->diffusion_properties != '') {
-                    $status_tab = explode(',', $notification->diffusion_properties);
-                    // $status_str=implode("','",$status_tab);
-                    $where .= ' AND lb.status in (:statustab)';
-                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
-                }
-        }
-
-        $query = $select.$from.$where;
-
-        if ($GLOBALS['logger']) {
-            $GLOBALS['logger']->write($query, 'DEBUG');
-        }
-        $stmt = $dbRecipients->query($query, $arrayPDO);
-
-        while ($recipient = $stmt->fetchObject()) {
-            $recipients[] = $recipient;
-        }
-        break;
-
-    case 'attach':
-        $attach = false;
-        break;
-
-    case 'res_id':
-        $select = 'SELECT li.res_id';
-        $from = ' FROM listinstance li';
-        $where = " WHERE li.coll_id = 'letterbox_coll'   ";
-
-        $arrayPDO = array(':recordid' => $event->record_id);
-        switch ($event->table_name) {
-            case 'notes':
-                $from .= ' JOIN notes ON notes.identifier = li.res_id';
-                $from .= ' JOIN res_letterbox lb ON lb.res_id = notes.identifier';
-                $where .= ' AND notes.id = :recordid AND li.item_id != notes.user_id';
-                if ($notification->diffusion_properties != '') {
-                    $status_tab = explode(',', $notification->diffusion_properties);
-                    // $status_str=implode("','",$status_tab);
-                    $where .= ' AND lb.status in (:statustab)';
-                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
-                }
-                break;
-
-            case 'res_letterbox':
-            case 'res_view_letterbox':
-                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
-                $where .= ' AND lb.res_id = :recordid';
-                if ($notification->diffusion_properties != '') {
-                    $status_tab = explode(',', $notification->diffusion_properties);
-                    // $status_str=implode("','",$status_tab);
-                    $where .= ' AND lb.status in (:statustab)';
-                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
-                }
-                break;
-
-            case 'listinstance':
-            default:
-                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
-                $where .= ' AND listinstance_id = :recordid';
-                if ($notification->diffusion_properties != '') {
-                    $status_tab = explode(',', $notification->diffusion_properties);
-                    // $status_str=implode("','",$status_tab);
-                    $where .= ' AND lb.status in (:statustab)';
-                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
-                }
-        }
-
-        $query = $query = $select.$from.$where;
-
-        if ($GLOBALS['logger']) {
-            $GLOBALS['logger']->write($query, 'DEBUG');
-        }
-        $dbResId = new Database();
-        $stmt = $dbResId->query($query, $arrayPDO);
-        $res_id_record = $stmt->fetchObject();
-        $res_id = $res_id_record->res_id;
-        break;
-}
diff --git a/modules/notifications/diffusion_types/dest_user_visa.php b/modules/notifications/diffusion_types/dest_user_visa.php
deleted file mode 100755
index ed9271505ef..00000000000
--- a/modules/notifications/diffusion_types/dest_user_visa.php
+++ /dev/null
@@ -1,136 +0,0 @@
-<?php
-/**
-* Copyright Maarch since 2008 under licence GPLv3.
-* See LICENCE.txt file at the root folder for more details.
-* This file is part of Maarch software.
-
-*
-* @brief   dest_user_visa
-*
-* @author  dev <dev@maarch.org>
-* @ingroup notifications
-*/
-switch ($request) {
-    case 'recipients':
-        $recipients = array();
-        $dbRecipients = new Database();
-
-        $select = 'SELECT distinct us.*';
-        $from = ' FROM listinstance li JOIN users us ON li.item_id = us.user_id';
-        $where = " WHERE li.coll_id = 'letterbox_coll' AND li.item_mode = 'visa' "
-            .'and process_date IS NULL ';
-
-        $arrayPDO = array(':recordid' => $event->record_id);
-        switch ($event->table_name) {
-            case 'notes':
-                $from .= ' JOIN notes ON notes.identifier = li.res_id';
-                $from .= ' JOIN res_letterbox lb ON lb.res_id = notes.identifier';
-                $where .= ' AND notes.id = :recordid AND li.item_id != notes.user_id'
-                    .' AND ('
-                        .' notes.id not in (SELECT DISTINCT note_id FROM note_entities) '
-                        .' OR us.user_id IN (SELECT ue.user_id FROM note_entities ne JOIN '
-                        .' users_entities ue ON ne.item_id = ue.entity_id WHERE ne.note_id = :recordid)'
-                    .')';
-                if ($notification->diffusion_properties != '') {
-                    $status_tab = explode(',', $notification->diffusion_properties);
-                    // $status_str=implode("','",$status_tab);
-                    $where .= ' AND lb.status in (:statustab)';
-                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
-                }
-
-                break;
-
-            case 'res_letterbox':
-            case 'res_view_letterbox':
-                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
-                $where .= ' AND lb.res_id = :recordid';
-                if ($notification->diffusion_properties != '') {
-                    $status_tab = explode(',', $notification->diffusion_properties);
-                    // $status_str=implode("','",$status_tab);
-                    $where .= ' AND lb.status in (:statustab)';
-                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
-                }
-                break;
-
-            case 'listinstance':
-            default:
-                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
-                $where .= ' AND listinstance_id = :recordid';
-                if ($notification->diffusion_properties != '') {
-                    $status_tab = explode(',', $notification->diffusion_properties);
-                    // $status_str=implode("','",$status_tab);
-                    $where .= ' AND lb.status in (:statustab)';
-                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
-                }
-        }
-
-        $query = $select.$from.$where;
-
-        if ($GLOBALS['logger']) {
-            $GLOBALS['logger']->write($query, 'DEBUG');
-        }
-        $stmt = $dbRecipients->query($query, $arrayPDO);
-
-        while ($recipient = $stmt->fetchObject()) {
-            $recipients[] = $recipient;
-        }
-        break;
-
-    case 'attach':
-        $attach = false;
-        break;
-
-    case 'res_id':
-        $select = 'SELECT li.res_id';
-        $from = ' FROM listinstance li';
-        $where = " WHERE li.coll_id = 'letterbox_coll'   ";
-
-        $arrayPDO = array(':recordid' => $event->record_id);
-        switch ($event->table_name) {
-            case 'notes':
-                $from .= ' JOIN notes ON notes.identifier = li.res_id';
-                $from .= ' JOIN res_letterbox lb ON lb.res_id = notes.identifier';
-                $where .= ' AND notes.id = :recordid AND li.item_id != notes.user_id';
-                if ($notification->diffusion_properties != '') {
-                    $status_tab = explode(',', $notification->diffusion_properties);
-                    // $status_str=implode("','",$status_tab);
-                    $where .= ' AND lb.status in (:statustab)';
-                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
-                }
-                break;
-
-            case 'res_letterbox':
-            case 'res_view_letterbox':
-                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
-                $where .= ' AND lb.res_id = :recordid';
-                if ($notification->diffusion_properties != '') {
-                    $status_tab = explode(',', $notification->diffusion_properties);
-                    // $status_str=implode("','",$status_tab);
-                    $where .= ' AND lb.status in (:statustab)';
-                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
-                }
-                break;
-
-            case 'listinstance':
-            default:
-                $from .= ' JOIN res_letterbox lb ON lb.res_id = li.res_id';
-                $where .= ' AND listinstance_id = :recordid';
-                if ($notification->diffusion_properties != '') {
-                    $status_tab = explode(',', $notification->diffusion_properties);
-                    // $status_str=implode("','",$status_tab);
-                    $where .= ' AND lb.status in (:statustab)';
-                    $arrayPDO = array_merge($arrayPDO, array(':statustab' => $status_tab));
-                }
-        }
-
-        $query = $query = $select.$from.$where;
-
-        if ($GLOBALS['logger']) {
-            $GLOBALS['logger']->write($query, 'DEBUG');
-        }
-        $dbResId = new Database();
-        $stmt = $dbResId->query($query, $arrayPDO);
-        $res_id_record = $stmt->fetchObject();
-        $res_id = $res_id_record->res_id;
-        break;
-}
diff --git a/modules/notifications/diffusion_types/entity.php b/modules/notifications/diffusion_types/entity.php
deleted file mode 100755
index cc40a9ae4b9..00000000000
--- a/modules/notifications/diffusion_types/entity.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-/**
-* Copyright Maarch since 2008 under licence GPLv3.
-* See LICENCE.txt file at the root folder for more details.
-* This file is part of Maarch software.
-
-*
-* @brief   entity
-*
-* @author  dev <dev@maarch.org>
-* @ingroup notifications
-*/
-require_once 'core/core_tables.php';
-require_once 'core/class/class_request.php';
-require_once 'modules/entities/class/EntityControler.php';
-
-switch ($request) {
-    case 'recipients':
-        $entities = "'".str_replace(',', "','", $notification->diffusion_properties)."'";
-        $query = 'SELECT distinct us.*'
-            .' FROM users_entities ue '
-            .' LEFT JOIN users us ON us.user_id = ue.user_id '
-            .' WHERE ue.entity_id in ('.$entities.')';
-        $dbRecipients = new Database();
-        $stmt = $dbRecipients->query($query);
-        $recipients = array();
-        while ($recipient = $stmt->fetchObject()) {
-            $recipients[] = $recipient;
-        }
-        break;
-
-    case 'attach':
-        $attach = false;
-        if ($notification->diffusion_type === 'dest_entity') {
-            $tmp_entities = explode(',', $notification->attachfor_properties);
-            $attach = in_array($user_id, $tmp_entities);
-        } else {
-            $entities = "'".str_replace(',', "','", $notification->attachfor_properties)."'";
-            $query = 'SELECT user_id'
-                .' FROM users_entities'
-                .' WHERE entity_id in ('.$entities.')'
-                .' AND user_id = ?';
-            $dbAttach = new Database();
-            $stmt = $dbAttach->query($query, array($user_id));
-            if ($stmt->rowCount() > 0) {
-                $attach = true;
-            }
-        }
-        break;
-}
diff --git a/modules/notifications/diffusion_types/group.php b/modules/notifications/diffusion_types/group.php
deleted file mode 100755
index 0a9933b961a..00000000000
--- a/modules/notifications/diffusion_types/group.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-
-/*
-*    Copyright 2008-2015 Maarch
-*
-*  This file is part of Maarch Framework.
-*
-*   Maarch Framework is free software: you can redistribute it and/or modify
-*   it under the terms of the GNU General Public License as published by
-*   the Free Software Foundation, either version 3 of the License, or
-*   (at your option) any later version.
-*
-*   Maarch Framework is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*    along with Maarch Framework.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-require_once 'core/core_tables.php';
-require_once 'core/class/class_request.php';
-require_once 'core/class/usergroups_controler.php';
-
-switch ($request) {
-    case 'recipients':
-        $groups = "'".str_replace(',', "','", $notification->diffusion_properties)."'";
-        $query = 'SELECT distinct us.*'
-            .' FROM usergroup_content ug '
-            .'	LEFT JOIN users us ON us.id = ug.user_id'
-            .'	LEFT JOIN usergroups ON ug.group_id = usergroups.group_id'
-            .' WHERE usergroups.group_id in ('.$groups.')';
-        $dbRecipients = new Database();
-        $stmt = $dbRecipients->query($query);
-        $recipients = array();
-        while ($recipient = $stmt->fetchObject()) {
-            $recipients[] = $recipient;
-        }
-        break;
-
-    case 'attach':
-        $groups = "'".str_replace(',', "','", $notification->attachfor_properties)."'";
-        $query = 'SELECT users.user_id FROM usergroup_content, users, usergroups WHERE usergroup_content.group_id = usergroups.group_id AND users.id = usergroup_content.user_id AND usergroups.group_id in ('.$groups.') AND users.user_id = ?';
-        $attach = false;
-        $dbAttach = new Database();
-        $stmt = $dbAttach->query($query, array($user_id));
-        if ($stmt->rowCount() > 0) {
-            $attach = true;
-        }
-        break;
-}
diff --git a/modules/notifications/diffusion_types/user.php b/modules/notifications/diffusion_types/user.php
deleted file mode 100755
index bf2e2369322..00000000000
--- a/modules/notifications/diffusion_types/user.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-/**
-* Copyright Maarch since 2008 under licence GPLv3.
-* See LICENCE.txt file at the root folder for more details.
-* This file is part of Maarch software.
-
-*
-* @brief   user
-*
-* @author  dev <dev@maarch.org>
-* @ingroup notifications
-*/
-require_once 'core/core_tables.php';
-require_once 'core/class/class_request.php';
-require_once 'core/class/users_controler.php';
-
-switch ($request) {
-    case 'recipients':
-        $users = "'".str_replace(',', "','", $notification->diffusion_properties)."'";
-        $query = 'SELECT us.*'
-            .' FROM users us'
-            .' WHERE us.user_id in ('.$users.')';
-        $dbRecipients = new Database();
-        $stmt = $dbRecipients->query($query);
-        $recipients = array();
-        while ($recipient = $stmt->fetchObject()) {
-            $recipients[] = $recipient;
-        }
-        break;
-
-    case 'attach':
-        $users = "'".str_replace(',', "','", (string) $notification->attachfor_properties)."'";
-        $query = 'SELECT user_id'
-            .' FROM users'
-            ." WHERE '".$user_id."' in (".$users.')';
-        $attach = false;
-        $dbAttach = new Database();
-        $stmt = $dbAttach->query($query);
-        if ($stmt->rowCount() > 0) {
-            $attach = true;
-        }
-        break;
-}
diff --git a/modules/notifications/js/functions.js b/modules/notifications/js/functions.js
deleted file mode 100755
index e2fd59a0a15..00000000000
--- a/modules/notifications/js/functions.js
+++ /dev/null
@@ -1,318 +0,0 @@
-function change_properties_box(difftype_id, path_manage_script, diff_list_id, origin_keyword)
-{
-    var div_id = diff_list_id;
-    var origin_arg = origin_keyword || '';
-  
-    document.getElementById(div_id).style = "height:0px; width:600px; border:0px;";
-    if(difftype_id != null)
-    {	
-		document.getElementById(div_id).style = "height:200px; width:600px; border:1px solid;";
-		/*new Ajax.Request(path_manage_script,
-        {
-            method:'post',
-            parameters: { id_type : difftype_id,
-                          origin : origin_arg
-                    },
-                onSuccess: function(answer){
-                    eval("response = "+answer.responseText);
-                    //alert(answer.responseText);
-                    if(response.status == 0 )
-                    {
-                        var diff_list_div = $(div_id);
-
-                        if(diff_list_div != null)
-                        {
-                            diff_list_div.innerHTML = response.div_content;
-                        }
-                    }
-                    else
-                    {
-                        var diff_list_div = $(div_id);
-                        if(diff_list_div != null)
-                        {
-                            diff_list_div.innerHTML = '';
-                        }
-
-                        try{
-                            $('frm_error').innerHTML = response.error_txt;
-                        }
-                        catch(e){}
-                    }
-               }
-        });*/
-
-        $j.ajax({
-            url: path_manage_script,
-            type: 'POST',
-            data: {
-                id_type : difftype_id,
-                origin : origin_arg
-            },
-            success: function(answer)
-            {
-                eval("response = "+answer);
-                if (response.status==0)
-                {
-                    var diff_list_div=$j('#'+div_id);
-                    if(diff_list_div != null)
-                    {
-                        diff_list_div.html(response.div_content);
-                    }
-                }
-                else
-                {
-                    var diff_list_div = $j('#'+div_id);
-                    if(diff_list_div != null)
-                    {
-                        diff_list_div.html('');
-                    }
-
-                    try{
-                        $('frm_error').html(response.error_txt);
-                    }
-                    catch(e){}
-                }
-            },
-            error: function(error)
-            {
-                alert(error);
-            }            
-        })
-    }
-}
-
-function clear_attach_type()
-{
-    var firstOption = document.querySelectorAll('option[tag="voidAttach"]');
-    firstOption[0].selected = "selected";
-    var theSelect = document.querySelectorAll('select[name="attach_for_type"]');
-    theSelect[0].onchange();
-}
-
-function set_attach_type(type)
-{
-    var allOptions = document.querySelectorAll('option[tag="attach"]');
-    var optionsToHide =  ["user", "group", "contact"];
-    for(var x=0;x < allOptions.length;x++)
-    {
-        if (type == "dest_entity" && optionsToHide.include(allOptions[x].value))
-            allOptions[x].style.display = "none";
-        else
-            allOptions[x].style.display = "";
-    }
-}
-
-function loadDiffusionProperties(difftype_id, path_manage_script, updatediv_id)
-{
-    console.log("LOADDIFF");
-    //var div_id = updatediv_id;
-    if(difftype_id != null)
-    {
-        $j.ajax({
-            url : path_manage_script,
-            type : 'POST',
-            data : {id_type : difftype_id},
-            success: function(answer)
-            {
-                eval("response = "+answer);
-				if(response.status == 0 )
-                {
-                    var selected_list = response.div_content.split(',');
-					var complete_list = $j("#diffusion_values")[0];
-					var diffusion_properties = $j("#diffusion_properties")[0];
-					for (i=0;i<complete_list.length;i++)
-					{
-						complete_list[i].selected = false;
-					}
-					for (i=0;i<complete_list.length;i++)
-					{
-						for(j=0;j<selected_list.length;j++)
-						{
-							if(complete_list[i].value == selected_list[j]) 
-							{
-								complete_list[i].selected = true;
-							}
-						}
-					}
-					Move(complete_list,diffusion_properties);
-                    /*if(diff_list_div != null)
-                    {
-                        diff_list_div.html(response.div_content);
-                    }*/
-                }
-					
-            },
-            error : function(error)
-            {
-                alert(error);
-            } 
-        });
-        /*new Ajax.Request(path_manage_script,
-        {
-            method:'post',
-            parameters: { id_type : difftype_id
-                    },
-                onSuccess: function(answer){
-				eval("response = "+answer.responseText);
-				if(response.status == 0 )
-                {
-					var diff_list_div = $(div_id);
-					var selected_list = response.div_content.split(',');
-					var complete_list = $("frmevent").elements["diffusion_values[]"];
-					var diffusion_properties = $("frmevent").elements["diffusion_properties[]"];
-					for (var i=0;i<complete_list.length;i++)
-					{
-						complete_list[i].selected = false;
-					}
-					for (var i=0;i<complete_list.length;i++)
-					{
-						for(var j=0;j<selected_list.length;j++)
-						{
-							if(complete_list[i].value == selected_list[j]) 
-							{
-								complete_list[i].selected = true;
-							}
-						}
-					}
-					Move(complete_list,diffusion_properties);
-                }
-                else
-                {
-					var diff_list_div = $(div_id);
-                    if(diff_list_div != null)
-                    {
-                        diff_list_div.innerHTML = '';
-                    }
-                    
-                    try{
-                        $('frm_error').innerHTML = response.error_txt;
-                    }
-                    catch(e){}
-                }
-            }
-        });*/
-    }
-}
-
-function loadAttachforProperties(difftype_id, path_manage_script, updatediv_id)
-{
-    var div_id = updatediv_id;
-	if(difftype_id != null)
-    {
-        /*new Ajax.Request(path_manage_script,
-        {
-            method:'post',
-            parameters: { id_type : difftype_id
-                    },
-                onSuccess: function(answer){
-				eval("response = "+answer.responseText);
-				if(response.status == 0 )
-                {
-					var selected_list = response.div_content.split(',');
-					var complete_list = $("frmevent").elements["attachfor_values[]"];
-					var attachfor_properties = $("frmevent").elements["attachfor_properties[]"];
-					for (var i=0;i<complete_list.length;i++)
-					{
-						complete_list[i].selected = false;
-					}
-					for (var i=0;i<complete_list.length;i++)
-					{
-						for(var j=0;j<selected_list.length;j++)
-						{
-							if(complete_list[i].value == selected_list[j]) 
-							{
-								complete_list[i].selected = true;
-							}
-						}
-					}
-					Move(complete_list,attachfor_properties);
-                }
-                else
-                {
-					var diff_list_div = $(div_id);
-                    if(diff_list_div != null)
-                    {
-                        diff_list_div.innerHTML = '';
-                    }
-                    
-                    try{
-                        $('frm_error').innerHTML = response.error_txt;
-                    }
-                    catch(e){}
-                }
-            }
-        });*/
-
-        $j.ajax({
-            url : path_manage_script,
-            data:{
-                id_type : difftype_id
-            },
-            success : function(answer){
-                eval("response = "+answer);
-				if(response.status == 0 )
-                {
-					var selected_list = response.div_content.split(',');
-					var complete_list = $j("#attachfor_values")[0];
-					var attachfor_properties = $j("#attachfor_properties")[0];
-					for (i=0;i<complete_list.length;i++)
-					{
-						complete_list[i].selected = false;
-					}
-					for (i=0;i<complete_list.length;i++)
-					{
-						for(j=0;j<selected_list.length;j++)
-						{
-							if(complete_list[i].value == selected_list[j]) 
-							{
-								complete_list[i].selected = true;
-							}
-						}
-					}
-					Move(complete_list,attachfor_properties);
-                }
-            },
-          error : function(error){
-              alert(error);
-          }
-        });
-    }
-}
-
-function del(id) {
-	$j("#state-"+id).val('deleted');
-	$j("#row-"+id).css('display','none');
-}
-
-function createNotifScript(path_manage_script, notification_sid, notification_id){
-    /*new Ajax.Request(path_manage_script,
-    {
-        method:'post',
-        parameters: { notification_sid : notification_sid,
-                      notification_id : notification_id
-                },
-        onSuccess: function(answer){
-            eval("response = "+answer.responseText);
-            if(response.status == 0 ) {
-                $('create_notif_script').style.display="none";
-            }
-        }
-    });*/
-    $j.ajax({
-        url : path_manage_script,
-        type : 'POST',
-        data : {
-            notification_sid : notification_sid,
-            notification_id : notification_id,
-        },
-        success : function(answer){
-            eval("response = "+answer);
-            if(response.status == 0 ) {
-                $j('#create_notif_script').css('display','none');
-            }
-        },
-        error : function(error){
-            alert(error);
-        }
-    });
-}
\ No newline at end of file
diff --git a/modules/notifications/lang/en.php b/modules/notifications/lang/en.php
index a8a0f139d5a..dbe83f2b837 100755
--- a/modules/notifications/lang/en.php
+++ b/modules/notifications/lang/en.php
@@ -20,289 +20,395 @@
  */
 
 //communs
-if (!defined("_NOTIFICATIONS_ERROR"))
+if (!defined("_NOTIFICATIONS_ERROR")) {
     define("_NOTIFICATIONS_ERROR", "Errorr on notification: ");
-if (!defined("_NOTIF_ALREADY_EXIST"))
+}
+if (!defined("_NOTIF_ALREADY_EXIST")) {
     define("_NOTIF_ALREADY_EXIST", "id already exist");
-if (!defined("_NOTIF_DESCRIPTION_TOO_LONG"))
+}
+if (!defined("_NOTIF_DESCRIPTION_TOO_LONG")) {
     define("_NOTIF_DESCRIPTION_TOO_LONG", "description too long");
-if (!defined("_NOTIF_EVENT_TOO_LONG"))
+}
+if (!defined("_NOTIF_EVENT_TOO_LONG")) {
     define("_NOTIF_EVENT_TOO_LONG", "event_id is too long");
-if (!defined("_NOTIF_MODE_TOO_LONG"))
+}
+if (!defined("_NOTIF_MODE_TOO_LONG")) {
     define("_NOTIF_MODE_TOO_LONG", "notification_mode is too long ");
-if (!defined("_NOTIF_TEMPLATE_NOT_A_INT"))
+}
+if (!defined("_NOTIF_TEMPLATE_NOT_A_INT")) {
     define("_NOTIF_TEMPLATE_NOT_A_INT", "template_id not a int ");
-if (!defined("_NOTIF_DIFFUSION_IS_A_INT"))
+}
+if (!defined("_NOTIF_DIFFUSION_IS_A_INT")) {
     define("_NOTIF_DIFFUSION_IS_A_INT", "diffusion_type is a int ");
-if (!defined("_NOTIF_DIFFUSION_PROPERTIES_NOT_INT"))
+}
+if (!defined("_NOTIF_DIFFUSION_PROPERTIES_NOT_INT")) {
     define("_NOTIF_DIFFUSION_PROPERTIES_NOT_INT", "diffusion_properties not a int ");
-if (!defined("_DELETED_NOTIFICATION"))
+}
+if (!defined("_DELETED_NOTIFICATION")) {
     define("_DELETED_NOTIFICATION", "Notification DELETED");
-if (!defined("_NOTIFICATIONS"))
+}
+if (!defined("_NOTIFICATIONS")) {
     define("_NOTIFICATIONS", "Notifications");
-if (!defined("_NOTIFS"))
-    define("_NOTIFS", "Notifications");    
-if (!defined("_NOTIF"))
+}
+if (!defined("_NOTIFS")) {
+    define("_NOTIFS", "Notifications");
+}
+if (!defined("_NOTIF")) {
     define("_NOTIF", "notif.");
-if (!defined("_MAIL_TO_PROCESS"))
+}
+if (!defined("_MAIL_TO_PROCESS")) {
     define("_MAIL_TO_PROCESS", "Mail for processing");
-if (!defined("_HELLO"))
-    define("_HELLO","Hello");
-if (!defined("_THE_MAIL_NUM"))
+}
+if (!defined("_HELLO")) {
+    define("_HELLO", "Hello");
+}
+if (!defined("_THE_MAIL_NUM")) {
     define("_THE_MAIL_NUM", "Mail number");
-if (!defined("_OF_TYPE"))
+}
+if (!defined("_OF_TYPE")) {
     define("_OF_TYPE", "Type of");
-if (!defined("_OBJECT"))
+}
+if (!defined("_OBJECT")) {
     define("_OBJECT", "object");
-if (!defined("_RECEIVED_THE"))
+}
+if (!defined("_RECEIVED_THE")) {
     define("_RECEIVED_THE", "Received the");
-if (!defined("_SEND_BY"))
+}
+if (!defined("_SEND_BY")) {
     define("_SEND_BY", "addressed by");
-if (!defined("_MUST_BE_PROCESSED_BEFORE"))
+}
+if (!defined("_MUST_BE_PROCESSED_BEFORE")) {
     define("_MUST_BE_PROCESSED_BEFORE", "must be processed before");
-if (!defined("_ACCESS_TO_MAIL_TO_PROCESS"))
+}
+if (!defined("_ACCESS_TO_MAIL_TO_PROCESS")) {
     define("_ACCESS_TO_MAIL_TO_PROCESS", "Access to the mail for processing");
-if (!defined("_PROCESS_MAIL"))
+}
+if (!defined("_PROCESS_MAIL")) {
     define("_PROCESS_MAIL", "Mail process");
-if (!defined("_USER"))
+}
+if (!defined("_USER")) {
     define("_USER", "User");
-if (!defined("_MAIL"))
+}
+if (!defined("_MAIL")) {
     define("_MAIL", "Mail");
-if (!defined("_WAS_SENT_TO"))
+}
+if (!defined("_WAS_SENT_TO")) {
     define("_WAS_SENT_TO", "was handed to");
-if (!defined("_SEE_MAIL"))
+}
+if (!defined("_SEE_MAIL")) {
     define("_SEE_MAIL", "See this mail");
-if (!defined("_NO_SENDED"))
-    define("_NO_SENDED"," The mail was not sent");
-if (!defined("_ACTIVATE_NOTIFICATION"))
-    define("_ACTIVATE_NOTIFICATION","Activate notifications by mail");
+}
+if (!defined("_NO_SENDED")) {
+    define("_NO_SENDED", " The mail was not sent");
+}
+if (!defined("_ACTIVATE_NOTIFICATION")) {
+    define("_ACTIVATE_NOTIFICATION", "Activate notifications by mail");
+}
 
 
 // notifs.php
-if (!defined("_MUST_SPECIFY_CONFIG_FILE"))
+if (!defined("_MUST_SPECIFY_CONFIG_FILE")) {
     define("_MUST_SPECIFY_CONFIG_FILE", "You have to specify the configuration file");
-if (!defined("_DU"))
+}
+if (!defined("_DU")) {
     define("_DU", "du");
-if (!defined("_OF"))
+}
+if (!defined("_OF")) {
     define("_OF", "of");
-if (!defined("_TO"))
+}
+if (!defined("_TO")) {
     define("_TO", "from ");
-if (!defined("_FOR"))
+}
+if (!defined("_FOR")) {
     define("_FOR", " to ");
-if (!defined("_LIST_OF_MAIL_TO_PROCESS"))
+}
+if (!defined("_LIST_OF_MAIL_TO_PROCESS")) {
     define("_LIST_OF_MAIL_TO_PROCESS", "This is the list of new mails to process");
-if (!defined("_MAIL_COPIES_TO"))
+}
+if (!defined("_MAIL_COPIES_TO")) {
     define("_MAIL_COPIES_TO", "Mails for information on");
-if (!defined("_MAIL_COPIES_LIST"))
+}
+if (!defined("_MAIL_COPIES_LIST")) {
     define("_MAIL_COPIES_LIST", "This is the list of mails copies whose you are recipient");
-if (!defined("_WHO_MUST_PROCESS_BEFORE"))
+}
+if (!defined("_WHO_MUST_PROCESS_BEFORE")) {
     define("_WHO_MUST_PROCESS_BEFORE", "who have to process it before");
-if (!defined("_ORIGINAL_PAPERS_ALREADY_SEND"))
+}
+if (!defined("_ORIGINAL_PAPERS_ALREADY_SEND")) {
     define("_ORIGINAL_PAPERS_ALREADY_SEND", "The paper originals have been addressed to you");
-if (!defined("_WARNING"))
+}
+if (!defined("_WARNING")) {
     define("_WARNING", "Warning");
-if (!defined("_YOU_MUST_BE_LOGGED"))
+}
+if (!defined("_YOU_MUST_BE_LOGGED")) {
     define("_YOU_MUST_BE_LOGGED", "You have to be identified on the software before tempting to access to mails");
-if (!defined("_MAIL_TO_PROCESS_LIST"))
-    define("_MAIL_TO_PROCESS_LIST","Mails list for processing");
-if (!defined("_COPIES_MAIL_LIST"))
+}
+if (!defined("_MAIL_TO_PROCESS_LIST")) {
+    define("_MAIL_TO_PROCESS_LIST", "Mails list for processing");
+}
+if (!defined("_COPIES_MAIL_LIST")) {
     define("_COPIES_MAIL_LIST", "Mails list for information");
-if (!defined("_BY"))
+}
+if (!defined("_BY")) {
     define("_BY", "by");
-if (!defined("_DEPARTMENT"))
+}
+if (!defined("_DEPARTMENT")) {
     define("_DEPARTMENT", "the department");
-if (!defined("_"))
-    define("_","");
+}
+if (!defined("_")) {
+    define("_", "");
+}
 
 //relance1.php
-if (!defined("_FIRST_WARNING"))
+if (!defined("_FIRST_WARNING")) {
     define("_FIRST_WARNING", "First reminder");
-if (!defined("_FIRST_WARNING_TITLE"))
+}
+if (!defined("_FIRST_WARNING_TITLE")) {
     define("_FIRST_WARNING_TITLE", "Reminder on mails");
-if (!defined("_THIS_IS_FIRST_WARNING"))
+}
+if (!defined("_THIS_IS_FIRST_WARNING")) {
     define("_THIS_IS_FIRST_WARNING", "This is the first reminder for the following mails");
-if (!defined("_MUST_BE_ADDED_TO_PRIORITY"))
+}
+if (!defined("_MUST_BE_ADDED_TO_PRIORITY")) {
     define("_MUST_BE_ADDED_TO_PRIORITY", "Please add this or those mails to your urgent processes");
-if (!defined("_TO_PROCESS"))
+}
+if (!defined("_TO_PROCESS")) {
     define("_TO_PROCESS", "To process");
+}
 
 //relance2.php
-if (!defined("_SECOND_WARNING"))
+if (!defined("_SECOND_WARNING")) {
     define("_SECOND_WARNING", "Reminder on my mails");
-if (!defined("_LATE_MAIL_TO_PROCESS"))
+}
+if (!defined("_LATE_MAIL_TO_PROCESS")) {
     define("_LATE_MAIL_TO_PROCESS", "Late mails to process");
-if (!defined("_YOU_ARE_LATE"))
+}
+if (!defined("_YOU_ARE_LATE")) {
     define("_YOU_ARE_LATE", "You are late on the following process mails");
-if (!defined("_WAS_TO_PROCESS_BEFORE"))
+}
+if (!defined("_WAS_TO_PROCESS_BEFORE")) {
     define("_WAS_TO_PROCESS_BEFORE", "Was to process before");
-if (!defined("_PROCESS_THIS_MAIL_QUICKLY"))
+}
+if (!defined("_PROCESS_THIS_MAIL_QUICKLY")) {
     define("_PROCESS_THIS_MAIL_QUICKLY", "Please edit a response under 48 hours");
-if (!defined("_LATE"))
+}
+if (!defined("_LATE")) {
     define("_LATE", "Delay");
-if (!defined("_MAIL_TO_CC"))
+}
+if (!defined("_MAIL_TO_CC")) {
     define("_MAIL_TO_CC", "mails on copies");
-if (!defined("_FOLLOWING_MAIL_ARE_LATE"))
+}
+if (!defined("_FOLLOWING_MAIL_ARE_LATE")) {
     define("_FOLLOWING_MAIL_ARE_LATE", "The process of the following mails has been delayed");
-if (!defined("_WHO_MUST_BE_PROCESSED_BEFORE"))
+}
+if (!defined("_WHO_MUST_BE_PROCESSED_BEFORE")) {
     define("_WHO_MUST_BE_PROCESSED_BEFORE", "who had to process it before");
-if (!defined("_COPY_TITLE"))
+}
+if (!defined("_COPY_TITLE")) {
     define("_COPY_TITLE", "On copy");
+}
 
 //notifications engine
-if (!defined("_WRONG_FUNCTION_OR_WRONG_PARAMETERS"))
-    define("_WRONG_FUNCTION_OR_WRONG_PARAMETERS","Wrong function or wrong setting");
+if (!defined("_WRONG_FUNCTION_OR_WRONG_PARAMETERS")) {
+    define("_WRONG_FUNCTION_OR_WRONG_PARAMETERS", "Wrong function or wrong setting");
+}
 
 //annotations
-if (!defined("_NEW_NOTE_BY_MAIL"))
+if (!defined("_NEW_NOTE_BY_MAIL")) {
     define("_NEW_NOTE_BY_MAIL", "New annotation for the mail");
-if (!defined("_HELLO_NOTE"))
+}
+if (!defined("_HELLO_NOTE")) {
     define("_HELLO_NOTE", "Hello, you have a new annotation for the mail");
-if (!defined("_NOTE_BODY"))
+}
+if (!defined("_NOTE_BODY")) {
     define("_NOTE_BODY", "The note is the next one: ");
-if (!defined("_NOTE_DATE_DETAILS"))
+}
+if (!defined("_NOTE_DATE_DETAILS")) {
     define("_NOTE_DATE_DETAILS", "On");
-if (!defined("_LINK_TO_MAARCH"))
+}
+if (!defined("_LINK_TO_MAARCH")) {
     define("_LINK_TO_MAARCH", "you can access to the mail from the link");
+}
 
 //v2.0
-if (!defined("_ADMIN_NOTIFICATIONS"))
+if (!defined("_ADMIN_NOTIFICATIONS")) {
     define("_ADMIN_NOTIFICATIONS", "Notifications");
-if (!defined("_MANAGE_NOTIFS"))
+}
+if (!defined("_MANAGE_NOTIFS")) {
     define("_MANAGE_NOTIFS", "Manage the notifications");
-if (!defined("_MANAGE_NOTIFS_DESC"))
+}
+if (!defined("_MANAGE_NOTIFS_DESC")) {
     define("_MANAGE_NOTIFS_DESC", "Add or modify notifications to inform ");
-if (!defined("_TEST_SENDMAIL"))
+}
+if (!defined("_TEST_SENDMAIL")) {
     define("_TEST_SENDMAIL", "Test the settings");
-if (!defined("_TEST_SENDMAIL_DESC"))
+}
+if (!defined("_TEST_SENDMAIL_DESC")) {
     define("_TEST_SENDMAIL_DESC", "Verify the setting of the notification module setting");
-if (!defined("_NOTIFS_LIST"))
+}
+if (!defined("_NOTIFS_LIST")) {
     define("_NOTIFS_LIST", "Notifications list");
-if (!defined("_THIS_NOTIF"))
+}
+if (!defined("_THIS_NOTIF")) {
     define("_THIS_NOTIF", "this notification");
-if (!defined("_IS_UNKNOWN"))
+}
+if (!defined("_IS_UNKNOWN")) {
     define("_IS_UNKNOWN", "is unknown");
-if (!defined("_MODIFY_NOTIF"))
+}
+if (!defined("_MODIFY_NOTIF")) {
     define("_MODIFY_NOTIF", "Modify notification");
-if (!defined("_ADD_NOTIF"))
+}
+if (!defined("_ADD_NOTIF")) {
     define("_ADD_NOTIF", "Add notification");
-if (!defined("_NOTIFICATION_ID"))
+}
+if (!defined("_NOTIFICATION_ID")) {
     define("_NOTIFICATION_ID", "Notification ID");
-if (!defined("_DIFFUSION_TYPE"))
+}
+if (!defined("_DIFFUSION_TYPE")) {
     define("_DIFFUSION_TYPE", "Diffusion type");
-if (!defined("_NOTIFICATION_MODE"))
+}
+if (!defined("_NOTIFICATION_MODE")) {
     define("_NOTIFICATION_MODE", "Notification mode");
-if (!defined("_RSS"))
+}
+if (!defined("_RSS")) {
     define("_RSS", "RSS feed");
-if (!defined("_RSS_URL_TEMPLATE"))
+}
+if (!defined("_RSS_URL_TEMPLATE")) {
     define("_RSS_URL_TEMPLATE", "Feed link");
-if (!defined("_SYSTEM_NOTIF"))
+}
+if (!defined("_SYSTEM_NOTIF")) {
     define("_SYSTEM_NOTIF", "System of notification");
-if (!defined("_ATTACH_MAIL_FILE"))
+}
+if (!defined("_ATTACH_MAIL_FILE")) {
     define("_ATTACH_MAIL_FILE", "Attach the file to the notification");
-if (!defined("_NEVER"))
+}
+if (!defined("_NEVER")) {
     define("_NEVER", "Never");
-if (!defined("_NO_ATTACHMENT_WITH_NOTIFICATION"))
+}
+if (!defined("_NO_ATTACHMENT_WITH_NOTIFICATION")) {
     define("_NO_ATTACHMENT_WITH_NOTIFICATION", "The files aren't attached to the notification for no users");
+}
 
 //List of require
-if (!defined("_NOTIFICATIONS_LISTINSTANC_DIFF_TYPE"))
+if (!defined("_NOTIFICATIONS_LISTINSTANC_DIFF_TYPE")) {
     define("_NOTIFICATIONS_LISTINSTANC_DIFF_TYPE", "Notification mails will be sent to all users from the diffusion list (main recipient and copies)");
-if (!defined("_DIFFUSION_LIST"))
+}
+if (!defined("_DIFFUSION_LIST")) {
     define("_DIFFUSION_LIST", "Diffusion list");
-if (!defined("_DEST_USER"))
+}
+if (!defined("_DEST_USER")) {
     define("_DEST_USER", "Main recipient");
-if (!defined("_NOTE_DEST_USER"))
+}
+if (!defined("_NOTE_DEST_USER")) {
     define("_NOTE_DEST_USER", "Main recipient of the annotated file");
-if (!defined("_NOTIFICATIONS_DEST_ENTITY_DIFF_TYPE_WITH_STATUS"))
+}
+if (!defined("_NOTIFICATIONS_DEST_ENTITY_DIFF_TYPE_WITH_STATUS")) {
     define("_NOTIFICATIONS_DEST_ENTITY_DIFF_TYPE_WITH_STATUS", "Mailing to the main entity department with status:");
-if (!defined("_NOTIFICATIONS_COPY_LIST_DIFF_TYPE"))
+}
+if (!defined("_NOTIFICATIONS_COPY_LIST_DIFF_TYPE")) {
     define("_NOTIFICATIONS_COPY_LIST_DIFF_TYPE", "Mailing to users on file copy");
-if (!defined("_COPYLIST"))
+}
+if (!defined("_COPYLIST")) {
     define("_COPYLIST", "Users on copy");
-if (!defined("_NOTE_COPY_LIST"))
+}
+if (!defined("_NOTE_COPY_LIST")) {
     define("_NOTE_COPY_LIST", "Recipient on copy of the annotated file");
-if (!defined("_NOTIFICATIONS_GROUP_DIFF_TYPE"))
+}
+if (!defined("_NOTIFICATIONS_GROUP_DIFF_TYPE")) {
     define("_NOTIFICATIONS_GROUP_DIFF_TYPE", "Mailing to users from specified group(s)");
-if (!defined("_NOTIFICATIONS_ENTITY_DIFF_TYPE"))
+}
+if (!defined("_NOTIFICATIONS_ENTITY_DIFF_TYPE")) {
     define("_NOTIFICATIONS_ENTITY_DIFF_TYPE", "Sending to users on specified entity(ies)");
-if (!defined("_NOTIFICATIONS_USER_DIFF_TYPE"))
+}
+if (!defined("_NOTIFICATIONS_USER_DIFF_TYPE")) {
     define("_NOTIFICATIONS_USER_DIFF_TYPE", "Mailing to specified users");
-if (!defined("_SELECT_EVENT_TYPE"))
+}
+if (!defined("_SELECT_EVENT_TYPE")) {
     define("_SELECT_EVENT_TYPE", "-- Select event --");
-if (!defined("_SELECT_TEMPLATE"))
+}
+if (!defined("_SELECT_TEMPLATE")) {
     define("_SELECT_TEMPLATE", "-- Select the model --");
-if (!defined("_SELECT_DIFFUSION_TYPE"))
+}
+if (!defined("_SELECT_DIFFUSION_TYPE")) {
     define("_SELECT_DIFFUSION_TYPE", "-- Select the diffusion --");
-if (!defined("_NOTIF_ADDED"))
+}
+if (!defined("_NOTIF_ADDED")) {
     define("_NOTIF_ADDED", "Added notification");
-if (!defined("_NOTIF_DELETED"))
+}
+if (!defined("_NOTIF_DELETED")) {
     define("_NOTIF_DELETED", "Deleted notification");
-if (!defined("_NOTIF_MODIFIED"))
+}
+if (!defined("_NOTIF_MODIFIED")) {
     define("_NOTIF_MODIFIED", "Modified notification");
-if (!defined("_NOTIF_EMPTY"))
+}
+if (!defined("_NOTIF_EMPTY")) {
     define("_NOTIF_EMPTY", "Empty notification");
-if (!defined("_ALL_NOTIFS"))
+}
+if (!defined("_ALL_NOTIFS")) {
     define("_ALL_NOTIFS", "All");
-if (!defined("_SYSTEM"))
+}
+if (!defined("_SYSTEM")) {
     define("_SYSTEM", "System");
-if (!defined("_ENTITY"))
+}
+if (!defined("_ENTITY")) {
     define("_ENTITY", "Entity");
-if (!defined("_DEST_ENTITY"))
+}
+if (!defined("_DEST_ENTITY")) {
     define("_DEST_ENTITY", "Recipient entity");
-if (!defined("_NOTIFICATIONS_CONTACT_DIFF_TYPE"))
+}
+if (!defined("_NOTIFICATIONS_CONTACT_DIFF_TYPE")) {
     define("_NOTIFICATIONS_CONTACT_DIFF_TYPE", "Mailing to mail sender");
-if (!defined("_SCHEDULE_NOTIFICATIONS"))
-    define("_SCHEDULE_NOTIFICATIONS", "Schedule the notifications");
-if (!defined("_HOUR"))
+}
+if (!defined("_HOUR")) {
     define("_HOUR", "Hour");
-if (!defined("_MINUTE"))
+}
+if (!defined("_MINUTE")) {
     define("_MINUTE", "Minute");
-if (!defined("_DAY"))
+}
+if (!defined("_DAY")) {
     define("_DAY", "Day");
-if (!defined("_WEEKDAY"))
+}
+if (!defined("_WEEKDAY")) {
     define("_WEEKDAY", "Weekday");
-if (!defined("_NOTIF_DESCRIPTION"))
+}
+if (!defined("_NOTIF_DESCRIPTION")) {
     define("_NOTIF_DESCRIPTION", "Notification description");
-if (!defined("_CRONTAB_SAVED"))
+}
+if (!defined("_CRONTAB_SAVED")) {
     define("_CRONTAB_SAVED", "Scheduled tasks was saved");
-if (!defined("_MONDAY"))
+}
+if (!defined("_MONDAY")) {
     define("_MONDAY", "Monday");
-if (!defined("_TUESDAY"))
+}
+if (!defined("_TUESDAY")) {
     define("_TUESDAY", "Tuesday");
-if (!defined("_WEDNESDAY"))
+}
+if (!defined("_WEDNESDAY")) {
     define("_WEDNESDAY", "Wednesday");
-if (!defined("_THURSDAY"))
+}
+if (!defined("_THURSDAY")) {
     define("_THURSDAY", "Thursday");
-if (!defined("_FRIDAY"))
+}
+if (!defined("_FRIDAY")) {
     define("_FRIDAY", "Friday");
-if (!defined("_SATURDAY"))
+}
+if (!defined("_SATURDAY")) {
     define("_SATURDAY", "Saturday");
-if (!defined("_SUNDAY"))
+}
+if (!defined("_SUNDAY")) {
     define("_SUNDAY", "Sunday");
-if (!defined("_HELP_CRON"))
+}
+if (!defined("_HELP_CRON")) {
     define("_HELP_CRON", "This part allows to define when the notifications will be sent.
         <br/><br/>If you choose * in all drop-down box, the notification will be sent every minutes, 365 days per year.
         <br/><br/>Example of frequency : 
         <br/>
         <br/>14 30 * * * [mail] New mails to process : the notification will be sent every day at 2:30 pm. 
         <br/>9 30 * * Monday [mail] New mails to process : the notification will be sent every Monday at 9:30 am. ");
-if (!defined("_CHOOSE_NOTIF"))
+}
+if (!defined("_CHOOSE_NOTIF")) {
     define("_CHOOSE_NOTIF", "Choose a notification");
-if (!defined("_NO_NOTIF"))
+}
+if (!defined("_NO_NOTIF")) {
     define("_NO_NOTIF", "No scheduled notification");
-if (!defined("_CREATE_NOTIF_SCRIPT"))
-    define("_CREATE_NOTIF_SCRIPT", "Create the script");
-if (!defined("_PB_CRON_COMMAND"))
-    define("_PB_CRON_COMMAND", "A scheduled task wasn't correctly modified. Please start again.");
-
-if (!defined("_DEST_USER_VISA"))
-    define("_DEST_USER_VISA", "VISA mailing to the user who has to aim");
-
-if (!defined("_DEST_USER_SIGN"))
-    define("_DEST_USER_SIGN", "VISA mailing to the user who has to sign");
-
-if (!defined("_NOTIFICATIONS_DEST_USER_VISA_DIFF_TYPE_WITH_STATUS"))
-    define("_NOTIFICATIONS_DEST_USER_VISA_DIFF_TYPE_WITH_STATUS", "Mailing to the user who has to aim with the status");
-
-if (!defined("_NOTIFICATIONS_DEST_USER_SIGN_DIFF_TYPE_WITH_STATUS"))
-    define("_NOTIFICATIONS_DEST_USER_SIGN_DIFF_TYPE_WITH_STATUS", "Mailing to the user who has to sign with the status");
+}
diff --git a/modules/notifications/lang/fr.php b/modules/notifications/lang/fr.php
index 7d57aef0611..b1baa357301 100755
--- a/modules/notifications/lang/fr.php
+++ b/modules/notifications/lang/fr.php
@@ -20,289 +20,395 @@
  */
 
 //communs
-if (!defined("_NOTIFICATIONS_ERROR"))
+if (!defined("_NOTIFICATIONS_ERROR")) {
     define("_NOTIFICATIONS_ERROR", "Erreur sur la Notification: ");
-if (!defined("_NOTIF_ALREADY_EXIST"))
+}
+if (!defined("_NOTIF_ALREADY_EXIST")) {
     define("_NOTIF_ALREADY_EXIST", "identifiant déjà existant");
-if (!defined("_NOTIF_DESCRIPTION_TOO_LONG"))
+}
+if (!defined("_NOTIF_DESCRIPTION_TOO_LONG")) {
     define("_NOTIF_DESCRIPTION_TOO_LONG", "description trop longue");
-if (!defined("_NOTIF_EVENT_TOO_LONG"))
+}
+if (!defined("_NOTIF_EVENT_TOO_LONG")) {
     define("_NOTIF_EVENT_TOO_LONG", "Evénement dans le mauvais format");
-if (!defined("_NOTIF_MODE_TOO_LONG"))
+}
+if (!defined("_NOTIF_MODE_TOO_LONG")) {
     define("_NOTIF_MODE_TOO_LONG", "Mode trop long ");
-if (!defined("_NOTIF_TEMPLATE_NOT_A_INT"))
+}
+if (!defined("_NOTIF_TEMPLATE_NOT_A_INT")) {
     define("_NOTIF_TEMPLATE_NOT_A_INT", "identifiant du template n est pas un integer ");
-if (!defined("_NOTIF_DIFFUSION_IS_A_INT"))
+}
+if (!defined("_NOTIF_DIFFUSION_IS_A_INT")) {
     define("_NOTIF_DIFFUSION_IS_A_INT", "identifiant du type de diffusion est un integer ");
-if (!defined("_NOTIF_DIFFUSION_PROPERTIES_NOT_INT"))
+}
+if (!defined("_NOTIF_DIFFUSION_PROPERTIES_NOT_INT")) {
     define("_NOTIF_DIFFUSION_PROPERTIES_NOT_INT", "identifiant de la propriété de diffusion n est pas un integer ");
-if (!defined("_DELETED_NOTIFICATION"))
+}
+if (!defined("_DELETED_NOTIFICATION")) {
     define("_DELETED_NOTIFICATION", "Notification supprimée");
-if (!defined("_NOTIFICATIONS"))
+}
+if (!defined("_NOTIFICATIONS")) {
     define("_NOTIFICATIONS", "Notifications");
-if (!defined("_NOTIFS"))
-    define("_NOTIFS", "Notifications");    
-if (!defined("_NOTIF"))
+}
+if (!defined("_NOTIFS")) {
+    define("_NOTIFS", "Notifications");
+}
+if (!defined("_NOTIF")) {
     define("_NOTIF", "notif.");
-if (!defined("_MAIL_TO_PROCESS"))
+}
+if (!defined("_MAIL_TO_PROCESS")) {
     define("_MAIL_TO_PROCESS", "Courriers pour traitement");
-if (!defined("_HELLO"))
-    define("_HELLO","Bonjour");
-if (!defined("_THE_MAIL_NUM"))
+}
+if (!defined("_HELLO")) {
+    define("_HELLO", "Bonjour");
+}
+if (!defined("_THE_MAIL_NUM")) {
     define("_THE_MAIL_NUM", "le courrier n°");
-if (!defined("_OF_TYPE"))
+}
+if (!defined("_OF_TYPE")) {
     define("_OF_TYPE", "de type");
-if (!defined("_OBJECT"))
+}
+if (!defined("_OBJECT")) {
     define("_OBJECT", "objet");
-if (!defined("_RECEIVED_THE"))
+}
+if (!defined("_RECEIVED_THE")) {
     define("_RECEIVED_THE", "reçu le");
-if (!defined("_SEND_BY"))
+}
+if (!defined("_SEND_BY")) {
     define("_SEND_BY", "adressé par");
-if (!defined("_MUST_BE_PROCESSED_BEFORE"))
+}
+if (!defined("_MUST_BE_PROCESSED_BEFORE")) {
     define("_MUST_BE_PROCESSED_BEFORE", "est à traiter avant le");
-if (!defined("_ACCESS_TO_MAIL_TO_PROCESS"))
+}
+if (!defined("_ACCESS_TO_MAIL_TO_PROCESS")) {
     define("_ACCESS_TO_MAIL_TO_PROCESS", "Accéder au courrier pour le traiter");
-if (!defined("_PROCESS_MAIL"))
+}
+if (!defined("_PROCESS_MAIL")) {
     define("_PROCESS_MAIL", "Traitement courrier");
-if (!defined("_USER"))
+}
+if (!defined("_USER")) {
     define("_USER", "Utilisateur");
-if (!defined("_MAIL"))
+}
+if (!defined("_MAIL")) {
     define("_MAIL", "Courrier");
-if (!defined("_WAS_SENT_TO"))
+}
+if (!defined("_WAS_SENT_TO")) {
     define("_WAS_SENT_TO", "a été transmis à");
-if (!defined("_SEE_MAIL"))
+}
+if (!defined("_SEE_MAIL")) {
     define("_SEE_MAIL", "Voir ce courrier");
-if (!defined("_NO_SENDED"))
-    define("_NO_SENDED"," L'email n'a pas  été envoyé");
-if (!defined("_ACTIVATE_NOTIFICATION"))
-    define("_ACTIVATE_NOTIFICATION","Activer les notifications par mail");
+}
+if (!defined("_NO_SENDED")) {
+    define("_NO_SENDED", " L'email n'a pas  été envoyé");
+}
+if (!defined("_ACTIVATE_NOTIFICATION")) {
+    define("_ACTIVATE_NOTIFICATION", "Activer les notifications par mail");
+}
 
 
 // notifs.php
-if (!defined("_MUST_SPECIFY_CONFIG_FILE"))
+if (!defined("_MUST_SPECIFY_CONFIG_FILE")) {
     define("_MUST_SPECIFY_CONFIG_FILE", "Vous devez spécifier le fichier de configuration");
-if (!defined("_DU"))
+}
+if (!defined("_DU")) {
     define("_DU", "du");
-if (!defined("_OF"))
+}
+if (!defined("_OF")) {
     define("_OF", "de");
-if (!defined("_TO"))
+}
+if (!defined("_TO")) {
     define("_TO", "de la part de ");
-if (!defined("_FOR"))
+}
+if (!defined("_FOR")) {
     define("_FOR", "déstiné à");
-if (!defined("_LIST_OF_MAIL_TO_PROCESS"))
+}
+if (!defined("_LIST_OF_MAIL_TO_PROCESS")) {
     define("_LIST_OF_MAIL_TO_PROCESS", "voici la liste des nouveaux courriers à traiter");
-if (!defined("_MAIL_COPIES_TO"))
+}
+if (!defined("_MAIL_COPIES_TO")) {
     define("_MAIL_COPIES_TO", "Courriers pour information du");
-if (!defined("_MAIL_COPIES_LIST"))
+}
+if (!defined("_MAIL_COPIES_LIST")) {
     define("_MAIL_COPIES_LIST", "voici la liste des copies des courriers dont vous êtes destinataire");
-if (!defined("_WHO_MUST_PROCESS_BEFORE"))
+}
+if (!defined("_WHO_MUST_PROCESS_BEFORE")) {
     define("_WHO_MUST_PROCESS_BEFORE", "qui doit le traiter avant le");
-if (!defined("_ORIGINAL_PAPERS_ALREADY_SEND"))
+}
+if (!defined("_ORIGINAL_PAPERS_ALREADY_SEND")) {
     define("_ORIGINAL_PAPERS_ALREADY_SEND", "Les originaux papier vous ont été adressés");
-if (!defined("_WARNING"))
+}
+if (!defined("_WARNING")) {
     define("_WARNING", "Attention");
-if (!defined("_YOU_MUST_BE_LOGGED"))
+}
+if (!defined("_YOU_MUST_BE_LOGGED")) {
     define("_YOU_MUST_BE_LOGGED", "vous devez être identifié sur le logiciel avant de tenter d'accéder au courrier");
-if (!defined("_MAIL_TO_PROCESS_LIST"))
-    define("_MAIL_TO_PROCESS_LIST","Liste des courriers pour traitement");
-if (!defined("_COPIES_MAIL_LIST"))
+}
+if (!defined("_MAIL_TO_PROCESS_LIST")) {
+    define("_MAIL_TO_PROCESS_LIST", "Liste des courriers pour traitement");
+}
+if (!defined("_COPIES_MAIL_LIST")) {
     define("_COPIES_MAIL_LIST", "Liste des courriers pour information");
-if (!defined("_BY"))
+}
+if (!defined("_BY")) {
     define("_BY", "par");
-if (!defined("_DEPARTMENT"))
+}
+if (!defined("_DEPARTMENT")) {
     define("_DEPARTMENT", "l'entité");
-if (!defined("_"))
-    define("_","");
+}
+if (!defined("_")) {
+    define("_", "");
+}
 
 //relance1.php
-if (!defined("_FIRST_WARNING"))
+if (!defined("_FIRST_WARNING")) {
     define("_FIRST_WARNING", "Première relance");
-if (!defined("_FIRST_WARNING_TITLE"))
+}
+if (!defined("_FIRST_WARNING_TITLE")) {
     define("_FIRST_WARNING_TITLE", "Relance sur les courriers");
-if (!defined("_THIS_IS_FIRST_WARNING"))
+}
+if (!defined("_THIS_IS_FIRST_WARNING")) {
     define("_THIS_IS_FIRST_WARNING", "Ceci est la première relance pour les courriers suivants");
-if (!defined("_MUST_BE_ADDED_TO_PRIORITY"))
+}
+if (!defined("_MUST_BE_ADDED_TO_PRIORITY")) {
     define("_MUST_BE_ADDED_TO_PRIORITY", "Merci d'ajouter ce ou ces courriers à vos traitements prioritaires");
-if (!defined("_TO_PROCESS"))
+}
+if (!defined("_TO_PROCESS")) {
     define("_TO_PROCESS", "à traiter");
+}
 
 //relance2.php
-if (!defined("_SECOND_WARNING"))
+if (!defined("_SECOND_WARNING")) {
     define("_SECOND_WARNING", "Relance sur mes courriers");
-if (!defined("_LATE_MAIL_TO_PROCESS"))
+}
+if (!defined("_LATE_MAIL_TO_PROCESS")) {
     define("_LATE_MAIL_TO_PROCESS", "Courriers en retard à traiter");
-if (!defined("_YOU_ARE_LATE"))
+}
+if (!defined("_YOU_ARE_LATE")) {
     define("_YOU_ARE_LATE", "Vous avez du retard dans le traitement des courriers suivants");
-if (!defined("_WAS_TO_PROCESS_BEFORE"))
+}
+if (!defined("_WAS_TO_PROCESS_BEFORE")) {
     define("_WAS_TO_PROCESS_BEFORE", "était à traiter avant le");
-if (!defined("_PROCESS_THIS_MAIL_QUICKLY"))
+}
+if (!defined("_PROCESS_THIS_MAIL_QUICKLY")) {
     define("_PROCESS_THIS_MAIL_QUICKLY", "Merci de rédiger une réponse sous 48 heures");
-if (!defined("_LATE"))
+}
+if (!defined("_LATE")) {
     define("_LATE", "Retard");
-if (!defined("_MAIL_TO_CC"))
+}
+if (!defined("_MAIL_TO_CC")) {
     define("_MAIL_TO_CC", "courriers en copies");
-if (!defined("_FOLLOWING_MAIL_ARE_LATE"))
+}
+if (!defined("_FOLLOWING_MAIL_ARE_LATE")) {
     define("_FOLLOWING_MAIL_ARE_LATE", "Le traitement des courriers suivants a pris du retard");
-if (!defined("_WHO_MUST_BE_PROCESSED_BEFORE"))
+}
+if (!defined("_WHO_MUST_BE_PROCESSED_BEFORE")) {
     define("_WHO_MUST_BE_PROCESSED_BEFORE", "qui devait le traiter avant le");
-if (!defined("_COPY_TITLE"))
+}
+if (!defined("_COPY_TITLE")) {
     define("_COPY_TITLE", "En copie");
+}
 
 //notifications engine
-if (!defined("_WRONG_FUNCTION_OR_WRONG_PARAMETERS"))
-    define("_WRONG_FUNCTION_OR_WRONG_PARAMETERS","Mauvaise fonction ou mauvais paramètre");
+if (!defined("_WRONG_FUNCTION_OR_WRONG_PARAMETERS")) {
+    define("_WRONG_FUNCTION_OR_WRONG_PARAMETERS", "Mauvaise fonction ou mauvais paramètre");
+}
 
 //annotations
-if (!defined("_NEW_NOTE_BY_MAIL"))
+if (!defined("_NEW_NOTE_BY_MAIL")) {
     define("_NEW_NOTE_BY_MAIL", "Nouvelle annotation pour le courrier");
-if (!defined("_HELLO_NOTE"))
+}
+if (!defined("_HELLO_NOTE")) {
     define("_HELLO_NOTE", "Bonjour, vous avez une nouvelle annotation pour le courrier");
-if (!defined("_NOTE_BODY"))
+}
+if (!defined("_NOTE_BODY")) {
     define("_NOTE_BODY", "L'annotation est la suivante : ");
-if (!defined("_NOTE_DATE_DETAILS"))
+}
+if (!defined("_NOTE_DATE_DETAILS")) {
     define("_NOTE_DATE_DETAILS", "le");
-if (!defined("_LINK_TO_MAARCH"))
+}
+if (!defined("_LINK_TO_MAARCH")) {
     define("_LINK_TO_MAARCH", "Vous pouvez accéder au courrier depuis ce lien");
+}
 
 //v2.0
-if (!defined("_ADMIN_NOTIFICATIONS"))
+if (!defined("_ADMIN_NOTIFICATIONS")) {
     define("_ADMIN_NOTIFICATIONS", "Notifications");
-if (!defined("_MANAGE_NOTIFS"))
+}
+if (!defined("_MANAGE_NOTIFS")) {
     define("_MANAGE_NOTIFS", "Gérer les notifications");
-if (!defined("_MANAGE_NOTIFS_DESC"))
+}
+if (!defined("_MANAGE_NOTIFS_DESC")) {
     define("_MANAGE_NOTIFS_DESC", "Ajouter ou modifier des notifications à notifier");
-if (!defined("_TEST_SENDMAIL"))
+}
+if (!defined("_TEST_SENDMAIL")) {
     define("_TEST_SENDMAIL", "Tester la configuration");
-if (!defined("_TEST_SENDMAIL_DESC"))
+}
+if (!defined("_TEST_SENDMAIL_DESC")) {
     define("_TEST_SENDMAIL_DESC", "Vérifier le paramétrage du module de notification");
-if (!defined("_NOTIFS_LIST"))
+}
+if (!defined("_NOTIFS_LIST")) {
     define("_NOTIFS_LIST", "Liste des notifications");
-if (!defined("_THIS_NOTIF"))
+}
+if (!defined("_THIS_NOTIF")) {
     define("_THIS_NOTIF", "Cette notification");
-if (!defined("_IS_UNKNOWN"))
+}
+if (!defined("_IS_UNKNOWN")) {
     define("_IS_UNKNOWN", "est inconnue");
-if (!defined("_MODIFY_NOTIF"))
+}
+if (!defined("_MODIFY_NOTIF")) {
     define("_MODIFY_NOTIF", "Modifier notification");
-if (!defined("_ADD_NOTIF"))
+}
+if (!defined("_ADD_NOTIF")) {
     define("_ADD_NOTIF", "Ajouter notification");
-if (!defined("_NOTIFICATION_ID"))
+}
+if (!defined("_NOTIFICATION_ID")) {
     define("_NOTIFICATION_ID", "Identifiant de notification");
-if (!defined("_DIFFUSION_TYPE"))
+}
+if (!defined("_DIFFUSION_TYPE")) {
     define("_DIFFUSION_TYPE", "Type de diffusion");
-if (!defined("_NOTIFICATION_MODE"))
+}
+if (!defined("_NOTIFICATION_MODE")) {
     define("_NOTIFICATION_MODE", "Mode de notification");
-if (!defined("_RSS"))
+}
+if (!defined("_RSS")) {
     define("_RSS", "Flux RSS");
-if (!defined("_RSS_URL_TEMPLATE"))
+}
+if (!defined("_RSS_URL_TEMPLATE")) {
     define("_RSS_URL_TEMPLATE", "Lien du flux");
-if (!defined("_SYSTEM_NOTIF"))
+}
+if (!defined("_SYSTEM_NOTIF")) {
     define("_SYSTEM_NOTIF", "Notification système");
-if (!defined("_ATTACH_MAIL_FILE"))
+}
+if (!defined("_ATTACH_MAIL_FILE")) {
     define("_ATTACH_MAIL_FILE", "Joindre le document à la notification");
-if (!defined("_NEVER"))
+}
+if (!defined("_NEVER")) {
     define("_NEVER", "Jamais");
-if (!defined("_NO_ATTACHMENT_WITH_NOTIFICATION"))
+}
+if (!defined("_NO_ATTACHMENT_WITH_NOTIFICATION")) {
     define("_NO_ATTACHMENT_WITH_NOTIFICATION", "Les documents ne sont joints à la notification pour aucun utilisateur");
+}
 
 //List of require
-if (!defined("_NOTIFICATIONS_LISTINSTANC_DIFF_TYPE"))
+if (!defined("_NOTIFICATIONS_LISTINSTANC_DIFF_TYPE")) {
     define("_NOTIFICATIONS_LISTINSTANC_DIFF_TYPE", "Les courriels de notifications seront diffusés à tous les utilisateurs de la liste de diffusion (destinataire principal et copies)");
-if (!defined("_DIFFUSION_LIST"))
+}
+if (!defined("_DIFFUSION_LIST")) {
     define("_DIFFUSION_LIST", "Liste de diffusion");
-if (!defined("_DEST_USER"))
+}
+if (!defined("_DEST_USER")) {
     define("_DEST_USER", "Destinataire principal");
-if (!defined("_NOTE_DEST_USER"))
+}
+if (!defined("_NOTE_DEST_USER")) {
     define("_NOTE_DEST_USER", "Destinataire principal du courrier annoté");
-if (!defined("_NOTIFICATIONS_DEST_ENTITY_DIFF_TYPE_WITH_STATUS"))
+}
+if (!defined("_NOTIFICATIONS_DEST_ENTITY_DIFF_TYPE_WITH_STATUS")) {
     define("_NOTIFICATIONS_DEST_ENTITY_DIFF_TYPE_WITH_STATUS", "Envoi à l'entité principale du courrier avec le(s) statut(s):");
-if (!defined("_NOTIFICATIONS_COPY_LIST_DIFF_TYPE"))
+}
+if (!defined("_NOTIFICATIONS_COPY_LIST_DIFF_TYPE")) {
     define("_NOTIFICATIONS_COPY_LIST_DIFF_TYPE", "Envoi aux utilisateurs en copie du courrier");
-if (!defined("_COPYLIST"))
+}
+if (!defined("_COPYLIST")) {
     define("_COPYLIST", "Utilisateurs en copie");
-if (!defined("_NOTE_COPY_LIST"))
+}
+if (!defined("_NOTE_COPY_LIST")) {
     define("_NOTE_COPY_LIST", "Destinataires en copie du courrier annoté");
-if (!defined("_NOTIFICATIONS_GROUP_DIFF_TYPE"))
+}
+if (!defined("_NOTIFICATIONS_GROUP_DIFF_TYPE")) {
     define("_NOTIFICATIONS_GROUP_DIFF_TYPE", "Envoi aux utilisateurs du(des) groupe(s) spécifié(s)");
-if (!defined("_NOTIFICATIONS_ENTITY_DIFF_TYPE"))
+}
+if (!defined("_NOTIFICATIONS_ENTITY_DIFF_TYPE")) {
     define("_NOTIFICATIONS_ENTITY_DIFF_TYPE", "Envoi aux utilisateurs des entité(s) spécifiée(s)");
-if (!defined("_NOTIFICATIONS_USER_DIFF_TYPE"))
+}
+if (!defined("_NOTIFICATIONS_USER_DIFF_TYPE")) {
     define("_NOTIFICATIONS_USER_DIFF_TYPE", "Envoi aux utilisateurs spécifiés");
-if (!defined("_SELECT_EVENT_TYPE"))
+}
+if (!defined("_SELECT_EVENT_TYPE")) {
     define("_SELECT_EVENT_TYPE", "-- Sélectionner l'événement --");
-if (!defined("_SELECT_TEMPLATE"))
+}
+if (!defined("_SELECT_TEMPLATE")) {
     define("_SELECT_TEMPLATE", "-- Sélectionner le modèle --");
-if (!defined("_SELECT_DIFFUSION_TYPE"))
+}
+if (!defined("_SELECT_DIFFUSION_TYPE")) {
     define("_SELECT_DIFFUSION_TYPE", "-- Sélectionner la diffusion --");
-if (!defined("_NOTIF_ADDED"))
+}
+if (!defined("_NOTIF_ADDED")) {
     define("_NOTIF_ADDED", "Notification ajoutée");
-if (!defined("_NOTIF_DELETED"))
+}
+if (!defined("_NOTIF_DELETED")) {
     define("_NOTIF_DELETED", "Notification supprimée");
-if (!defined("_NOTIF_MODIFIED"))
+}
+if (!defined("_NOTIF_MODIFIED")) {
     define("_NOTIF_MODIFIED", "Notification modifiée");
-if (!defined("_NOTIF_EMPTY"))
+}
+if (!defined("_NOTIF_EMPTY")) {
     define("_NOTIF_EMPTY", "Notification vide");
-if (!defined("_ALL_NOTIFS"))
+}
+if (!defined("_ALL_NOTIFS")) {
     define("_ALL_NOTIFS", "Toutes");
-if (!defined("_SYSTEM"))
+}
+if (!defined("_SYSTEM")) {
     define("_SYSTEM", "Système");
-if (!defined("_ENTITY"))
+}
+if (!defined("_ENTITY")) {
     define("_ENTITY", "Entité");
-if (!defined("_DEST_ENTITY"))
+}
+if (!defined("_DEST_ENTITY")) {
     define("_DEST_ENTITY", "Entité destinatrice");
-if (!defined("_NOTIFICATIONS_CONTACT_DIFF_TYPE"))
+}
+if (!defined("_NOTIFICATIONS_CONTACT_DIFF_TYPE")) {
     define("_NOTIFICATIONS_CONTACT_DIFF_TYPE", "Envoi à l'expéditeur du courrier");
-if (!defined("_SCHEDULE_NOTIFICATIONS"))
-    define("_SCHEDULE_NOTIFICATIONS", "Planifier les notifications");
-if (!defined("_HOUR"))
+}
+if (!defined("_HOUR")) {
     define("_HOUR", "Heure");
-if (!defined("_MINUTE"))
+}
+if (!defined("_MINUTE")) {
     define("_MINUTE", "Minute");
-if (!defined("_DAY"))
+}
+if (!defined("_DAY")) {
     define("_DAY", "Jour");
-if (!defined("_WEEKDAY"))
+}
+if (!defined("_WEEKDAY")) {
     define("_WEEKDAY", "Jour de la semaine");
-if (!defined("_NOTIF_DESCRIPTION"))
+}
+if (!defined("_NOTIF_DESCRIPTION")) {
     define("_NOTIF_DESCRIPTION", "Description de la notification");
-if (!defined("_CRONTAB_SAVED"))
+}
+if (!defined("_CRONTAB_SAVED")) {
     define("_CRONTAB_SAVED", "La tâche planifiée a été sauvegardée");
-if (!defined("_MONDAY"))
+}
+if (!defined("_MONDAY")) {
     define("_MONDAY", "Lundi");
-if (!defined("_TUESDAY"))
+}
+if (!defined("_TUESDAY")) {
     define("_TUESDAY", "Mardi");
-if (!defined("_WEDNESDAY"))
+}
+if (!defined("_WEDNESDAY")) {
     define("_WEDNESDAY", "Mercredi");
-if (!defined("_THURSDAY"))
+}
+if (!defined("_THURSDAY")) {
     define("_THURSDAY", "Jeudi");
-if (!defined("_FRIDAY"))
+}
+if (!defined("_FRIDAY")) {
     define("_FRIDAY", "Vendredi");
-if (!defined("_SATURDAY"))
+}
+if (!defined("_SATURDAY")) {
     define("_SATURDAY", "Samedi");
-if (!defined("_SUNDAY"))
+}
+if (!defined("_SUNDAY")) {
     define("_SUNDAY", "Dimanche");
-if (!defined("_HELP_CRON"))
+}
+if (!defined("_HELP_CRON")) {
     define("_HELP_CRON", "Cette partie permet de définir quand seront envoyées les notifications.
         <br/><br/>Si vous choisissez * dans toutes les listes déroulantes, la notification sera envoyée toutes les minutes 365 jours par an.
         <br/><br/>Exemple de fréquence : 
         <br/>
         <br/>14 30 * * * [courrier] Nouveaux courriers à traiter : La notification sera envoyée tous les jours à 14h30
         <br/>9 30 * * Lundi [courrier] Nouveaux courriers à traiter : La notification sera envoyée tous les lundi à 9h30");
-if (!defined("_CHOOSE_NOTIF"))
+}
+if (!defined("_CHOOSE_NOTIF")) {
     define("_CHOOSE_NOTIF", "Choisissez une notification");
-if (!defined("_NO_NOTIF"))
+}
+if (!defined("_NO_NOTIF")) {
     define("_NO_NOTIF", "Aucune notification planifiée");
-if (!defined("_CREATE_NOTIF_SCRIPT"))
-    define("_CREATE_NOTIF_SCRIPT", "Créer le script");
-if (!defined("_PB_CRON_COMMAND"))
-    define("_PB_CRON_COMMAND", "Une tache planifiée n'a pas été modifiée correctement. Merci de recommencer.");
-
-if (!defined("_DEST_USER_VISA"))
-    define("_DEST_USER_VISA", "VISA envoi à l'utilisateur devant viser");
-
-if (!defined("_DEST_USER_SIGN"))
-    define("_DEST_USER_SIGN", "VISA envoi à l'utilisateur devant signer");
-
-if (!defined("_NOTIFICATIONS_DEST_USER_VISA_DIFF_TYPE_WITH_STATUS"))
-    define("_NOTIFICATIONS_DEST_USER_VISA_DIFF_TYPE_WITH_STATUS", "Envoi à l'utilisateur devant viser avec le(s) statut(s):");
-
-if (!defined("_NOTIFICATIONS_DEST_USER_SIGN_DIFF_TYPE_WITH_STATUS"))
-    define("_NOTIFICATIONS_DEST_USER_SIGN_DIFF_TYPE_WITH_STATUS", "Envoi à l'utilisateur devant signer avec le(s) statut(s):");
+}
diff --git a/modules/notifications/lang/nl.php b/modules/notifications/lang/nl.php
index fa29149fe3e..3c44ca5aa17 100755
--- a/modules/notifications/lang/nl.php
+++ b/modules/notifications/lang/nl.php
@@ -327,9 +327,6 @@ if (!defined('_DEST_ENTITY')) {
 if (!defined('_NOTIFICATIONS_CONTACT_DIFF_TYPE')) {
     define('_NOTIFICATIONS_CONTACT_DIFF_TYPE', 'Verzending naar de verzender van de brief');
 }
-if (!defined('_SCHEDULE_NOTIFICATIONS')) {
-    define('_SCHEDULE_NOTIFICATIONS', 'De meldingen plannen');
-}
 if (!defined('_HOUR')) {
     define('_HOUR', 'Uur');
 }
@@ -378,24 +375,6 @@ if (!defined('_CHOOSE_NOTIF')) {
 if (!defined('_NO_NOTIF')) {
     define('_NO_NOTIF', 'Geen melding gepland');
 }
-if (!defined('_CREATE_NOTIF_SCRIPT')) {
-    define('_CREATE_NOTIF_SCRIPT', 'Het script aanmaken');
-}
-if (!defined('_PB_CRON_COMMAND')) {
-    define('_PB_CRON_COMMAND', 'Een geplande taak werd niet correct gewijzigd. Begin opnieuw.');
-}
-if (!defined('_DEST_USER_VISA')) {
-    define('_DEST_USER_VISA', 'GOEDKEURING Verzending aan de gebruiker die moet goedkeuren');
-}
-if (!defined('_DEST_USER_SIGN')) {
-    define('_DEST_USER_SIGN', 'GOEDKEURING Verzending aan de gebruiker die moet tekenen');
-}
-if (!defined('_NOTIFICATIONS_DEST_USER_VISA_DIFF_TYPE_WITH_STATUS')) {
-    define('_NOTIFICATIONS_DEST_USER_VISA_DIFF_TYPE_WITH_STATUS', 'Verzending naar de gebruiker die moet goedkeuren met de status(sen):');
-}
-if (!defined('_NOTIFICATIONS_DEST_USER_SIGN_DIFF_TYPE_WITH_STATUS')) {
-    define('_NOTIFICATIONS_DEST_USER_SIGN_DIFF_TYPE_WITH_STATUS', 'Verzending naar de gebruiker die moet tekenen met de status(sen):');
-}
 if (!defined('_DEPARTMENT')) {
     define('_DEPARTMENT', 'de eenheid');
 }
diff --git a/modules/notifications/load_attachforproperties_formcontent.php b/modules/notifications/load_attachforproperties_formcontent.php
deleted file mode 100755
index c652bd28c73..00000000000
--- a/modules/notifications/load_attachforproperties_formcontent.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-/**
-* File : load_diffusiontype_formcontent
-*
-* Script called by an ajax object to process the diffusion type change during
-*
-* @package  Maarch Entreprise Notifiation Modules
-* @version 1.3
-* @since 10/2005
-* @license GPL v3
-* @author Loïc Vinet  <dev@maarch.org>
-*/
-
-require_once 'modules' . DIRECTORY_SEPARATOR . 'notifications' . DIRECTORY_SEPARATOR
-    . 'class' . DIRECTORY_SEPARATOR . 'diffusion_type_controler.php';
-
-if ((! isset($_REQUEST['id_type']) || empty($_REQUEST['id_type']))) {
-        $_SESSION['error'] = _TYPE_EMPTY;
-    
-    echo "{status : 1, error_txt : '" . addslashes($_SESSION['error']) . "'}";
-    exit();
-}
-
-//--------------------------------------------------
-
-$result = $_SESSION['m_admin']['notification']['attachfor_properties'];
-echo "{status : 0, div_content : '" . addslashes($result) . "'}";
-exit();
diff --git a/modules/notifications/load_attachfortype_formcontent.php b/modules/notifications/load_attachfortype_formcontent.php
deleted file mode 100755
index d109a48ec27..00000000000
--- a/modules/notifications/load_attachfortype_formcontent.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-/**
-* File : load_diffusiontype_formcontent
-*
-* Script called by an ajax object to process the diffusion type change during
-*
-* @package  Maarch Entreprise Notifiation Modules
-* @version 1.3
-* @since 10/2005
-* @license GPL v3
-* @author Loïc Vinet  <dev@maarch.org>
-*/
-
-require_once 'modules' . DIRECTORY_SEPARATOR . 'notifications' . DIRECTORY_SEPARATOR
-    . 'class' . DIRECTORY_SEPARATOR . 'diffusion_type_controler.php';
-
-if ((! isset($_REQUEST['id_type']) || empty($_REQUEST['id_type']))) {
-    //$_SESSION['error'] = _TYPE_EMPTY;
-    //echo "{status : 1, error_txt : '" . addslashes($_SESSION['error']) . "'}";
-	$form_content = '<p class="sstit">' . _NO_ATTACHMENT_WITH_NOTIFICATION . '</p>';
-	echo "{status : 0, div_content : '" . addslashes($form_content) . "'}";
-
-	exit();
-}
-
-if (empty($_REQUEST['origin'])) {
-    $_SESSION['error'] = _ORIGIN . ' ' . _UNKNOWN;
-    echo "{status : 2, error_txt : '" . addslashes($_SESSION['error']) . "'}";
-    exit();
-}
-//--------------------------------------------------
-
-$core = new core_tools();
-$core->load_lang();
-$dType = new diffusion_type_controler();
-$diffType = array();
-$diffType = $dType->getAllDiffusion();
-
-foreach($diffType as $loadedType) {
-	if ($loadedType->id == $_REQUEST['id_type']){
-		if ($loadedType->script <> '') {
-			$request = 'form_content';
-			$formId = 'attachfor_type';
-			$leftList = 'attachfor_values';
-			$rightList = 'attachfor_properties';
-			$form_content = '';	
-			include_once($loadedType->script);
-			echo "{status : 0, div_content : '" . addslashes($form_content) . "'}";
-		} else {
-			 echo "{status : 1, error_txt : '" . addslashes($_SESSION['error']) . "'}";
-		}
-	}
-}	
-exit();
diff --git a/modules/notifications/load_diffusionproperties_formcontent.php b/modules/notifications/load_diffusionproperties_formcontent.php
deleted file mode 100755
index 2f7f58b591d..00000000000
--- a/modules/notifications/load_diffusionproperties_formcontent.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-/**
-* File : load_diffusiontype_formcontent
-*
-* Script called by an ajax object to process the diffusion type change during
-*
-* @package  Maarch Entreprise Notifiation Modules
-* @version 1.3
-* @since 10/2005
-* @license GPL v3
-* @author Loïc Vinet  <dev@maarch.org>
-*/
-
-require_once 'modules' . DIRECTORY_SEPARATOR . 'notifications' . DIRECTORY_SEPARATOR
-    . 'class' . DIRECTORY_SEPARATOR . 'diffusion_type_controler.php';
-
-if ((! isset($_REQUEST['id_type']) || empty($_REQUEST['id_type']))) {
-        $_SESSION['error'] = _TYPE_EMPTY;
-    
-    echo "{status : 1, error_txt : '" . addslashes($_SESSION['error']) . "'}";
-    exit();
-}
-
-//--------------------------------------------------
-
-$result = $_SESSION['m_admin']['notification']['diffusion_properties'];
-echo "{status : 0, div_content : '" . addslashes($result) . "'}";
-exit();
diff --git a/modules/notifications/load_diffusiontype_formcontent.php b/modules/notifications/load_diffusiontype_formcontent.php
deleted file mode 100755
index 3734145285a..00000000000
--- a/modules/notifications/load_diffusiontype_formcontent.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-/**
-* File : load_diffusiontype_formcontent
-*
-* Script called by an ajax object to process the diffusion type change during
-*
-* @package  Maarch Entreprise Notifiation Modules
-* @version 1.3
-* @since 10/2005
-* @license GPL v3
-* @author Loïc Vinet  <dev@maarch.org>
-*/
-
-require_once 'modules' . DIRECTORY_SEPARATOR . 'notifications' . DIRECTORY_SEPARATOR
-    . 'class' . DIRECTORY_SEPARATOR . 'diffusion_type_controler.php';
-
-if ((! isset($_REQUEST['id_type']) || empty($_REQUEST['id_type']))) {
-        // $_SESSION['error'] = _TYPE_EMPTY;
-    
-    echo "{status : 1, error_txt : '" . addslashes($_SESSION['error']) . "'}";
-    exit();
-}
-
-if (empty($_REQUEST['origin'])) {
-    $_SESSION['error'] = _ORIGIN . ' ' . _UNKNOWN;
-    echo "{status : 2, error_txt : '" . addslashes($_SESSION['error']) . "'}";
-    exit();
-}
-//--------------------------------------------------
-
-$core = new core_tools();
-$core->load_lang();
-$dType = new diffusion_type_controler();
-$diffType = array();
-$diffType = $dType->getAllDiffusion();
-
-foreach($diffType as $loadedType) {
-	if ($loadedType->id == $_REQUEST['id_type']){
-		if ($loadedType->script <> '') {		
-			$request = 'form_content';
-			$formId = 'diffusion_type';
-			$leftList = 'diffusion_values';
-			$rightList = 'diffusion_properties';
-			$form_content = '';
-			include_once($loadedType->script);
-			echo "{status : 0, div_content : '" . addslashes($form_content) . "'}";
-		} else {
-			 echo "{status : 1, error_txt : '" . addslashes($_SESSION['error']) . "'}";
-		}
-	}
-}	
-exit();
diff --git a/modules/notifications/manage_notifs_list_by_name.php b/modules/notifications/manage_notifs_list_by_name.php
deleted file mode 100755
index 6df51b575cb..00000000000
--- a/modules/notifications/manage_notifs_list_by_name.php
+++ /dev/null
@@ -1,61 +0,0 @@
-<?php
-/*
-*    Copyright 2008,2009 Maarch
-*
-*  This file is part of Maarch Framework.
-*
-*   Maarch Framework is free software: you can redistribute it and/or modify
-*   it under the terms of the GNU General Public License as published by
-*   the Free Software Foundation, either version 3 of the License, or
-*   (at your option) any later version.
-*
-*   Maarch Framework is distributed in the hope that it will be useful,
-*   but WITHOUT ANY WARRANTY; without even the implied warranty of
-*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*   GNU General Public License for more details.
-*
-*   You should have received a copy of the GNU General Public License
-*    along with Maarch Framework.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/**
-* @brief List of status for autocompletion
-*
-*
-* @file
-* @author  Laurent Giovannoni  <dev@maarch.org>
-* @date $date$
-* @version $Revision$
-* @ingroup admin
-*/
-
-require_once('core' . DIRECTORY_SEPARATOR . 'class' . DIRECTORY_SEPARATOR
-             . 'class_request.php');
-$db = new Database();
-$stmt = $db->query(
-        'SELECT description as tag FROM notifications' .
-        " WHERE lower(description) like lower(:what) or lower(notification_id) like lower(:what) order by description",
-        array(":what" => $_REQUEST['what'] . "%")
-        );
-
-$listArray = array();
-while ($line = $stmt->fetchObject()) {
-    array_push($listArray, $line->tag);
-}
-echo '<ul>';
-$notificatiViewList = 0;
-
-foreach ($listArray as $what) {
-    if ($notificationViewList >= 10) {
-        $flagNotificationView = true;
-    }
-    //if (stripos($what, $_REQUEST['what']) === 0) {
-        echo '<li>'.$what.'</li>';
-        if (isset($flagNotificationView) && $flagNotificationView) {
-            echo '<li>...</li>\n';
-            break;
-        }
-        $notificationViewList++;
-    //}
-}
-echo '</ul>';
\ No newline at end of file
diff --git a/modules/notifications/xml/IVS/data_types.xml b/modules/notifications/xml/IVS/data_types.xml
deleted file mode 100755
index 710b3b56651..00000000000
--- a/modules/notifications/xml/IVS/data_types.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-<dataTypes>
-
-</dataTypes>
\ No newline at end of file
diff --git a/modules/notifications/xml/IVS/requests_definitions.xml b/modules/notifications/xml/IVS/requests_definitions.xml
deleted file mode 100755
index bb09a49944c..00000000000
--- a/modules/notifications/xml/IVS/requests_definitions.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<requestDefinitions>
-    <requestDefinition method="POST" path="/apps/maarch_entreprise/index.php" validationRule="manage_notifs_list_by_name" >
-        <parameter name="page" value="manage_notifs_list_by_name"/>
-        <parameter name="display" value="true"/>
-        <parameter name="module" value="notifications"/>
-    </requestDefinition>
-    <requestDefinition method="POST" path="/apps/maarch_entreprise/index.php" validationRule="load_diffusiontype_formcontent" >
-        <parameter name="page" value="load_diffusiontype_formcontent"/>
-        <parameter name="display" value="true"/>
-        <parameter name="module" value="notifications"/>
-    </requestDefinition>
-    <requestDefinition method="POST" path="/apps/maarch_entreprise/index.php" validationRule="load_attachfortype_formcontent" >
-        <parameter name="page" value="load_attachfortype_formcontent"/>
-        <parameter name="display" value="true"/>
-        <parameter name="module" value="notifications"/>
-    </requestDefinition>
-    <requestDefinition method="POST" path="/apps/maarch_entreprise/index.php" validationRule="load_diffusionproperties_formcontent" >
-        <parameter name="page" value="load_diffusionproperties_formcontent"/>
-        <parameter name="display" value="true"/>
-        <parameter name="module" value="notifications"/>
-    </requestDefinition>
-    <requestDefinition method="POST" path="/apps/maarch_entreprise/index.php" validationRule="load_attachforproperties_formcontent" >
-        <parameter name="page" value="load_attachforproperties_formcontent"/>
-        <parameter name="display" value="true"/>
-        <parameter name="module" value="notifications"/>
-    </requestDefinition>
-    <requestDefinition method="POST" path="/apps/maarch_entreprise/index.php" validationRule="create_notif_script" >
-        <parameter name="page" value="create_notif_script"/>
-        <parameter name="display" value="true"/>
-        <parameter name="module" value="notifications"/>
-    </requestDefinition>
-</requestDefinitions>
\ No newline at end of file
diff --git a/modules/notifications/xml/IVS/validation_rules.xml b/modules/notifications/xml/IVS/validation_rules.xml
deleted file mode 100755
index f55f5a65c23..00000000000
--- a/modules/notifications/xml/IVS/validation_rules.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<validationRules>
-	<validationRule name="manage_notifications_controler" extends="standardForm" mode="error">
-		<parameter name="module" type="identifier" />
-		<parameter name="mode" type="mode" />
-		<parameter name="id" type="identifier" />
-		<parameter name="notif_submit" type="string" />
-		<parameter name="what" type="string" />
-		<parameter name="order" type="order" />
-		<parameter name="order_field" type="order" />
-		<parameter name="notification_sid" type="integer" />
-		<parameter name="notification_id" type="identifier" />
-		<parameter name="description" type="string" />
-		<parameter name="event_id" type="integer" />
-		<parameter name="notification_mode" type="string" />
-		<parameter name="template_id" type="integer" />
-		<parameter name="is_enabled" type="YN" />
-		<parameter name="diffusion_type" type="string" />
-		<parameter name="attachfor_type" type="string" />
-		<parameter name="attach_for_type" type="identifier" />
-		<parameter name="attachfor_values" type="identifier" />
-		<parameter name="diffusion_properties" type="string" />
-		<parameter name="attachfor_properties" type="string" />
-		<parameter name="statuseslist" type="identifier" />
-		<parameter name="event_id" type="string" />
-		<parameter name="is_enabled" type="boolean" />
-		<parameter name="order_field" type="string" />
-		<parameter name="diffusion_values" type="string" />
-		<parameter name="Submit" type="string" />
-	</validationRule>
-	<validationRule name="manage_notifs_list_by_name" extends="standardForm" mode="error">
-		<parameter name="module" type="identifier" />
-		<parameter name="what" type="string" />
-	</validationRule>
-	<validationRule name="load_diffusiontype_formcontent" extends="standardForm" mode="error">
-		<parameter name="module" type="identifier" />
-		<parameter name="id_type" type="identifier" />
-		<parameter name="origin" type="identifier" />
-	</validationRule>
-	<validationRule name="load_attachfortype_formcontent" extends="standardForm" mode="error">
-		<parameter name="module" type="identifier" />
-		<parameter name="id_type" type="identifier" />
-		<parameter name="origin" type="identifier" />
-	</validationRule>
-	<validationRule name="load_diffusionproperties_formcontent" extends="standardForm" mode="error">
-		<parameter name="module" type="identifier" />
-		<parameter name="id_type" type="identifier" />
-	</validationRule>
-	<validationRule name="load_attachforproperties_formcontent" extends="standardForm" mode="error">
-		<parameter name="module" type="identifier" />
-		<parameter name="id_type" type="identifier" />
-	</validationRule>
-	<validationRule name="create_notif_script" extends="standardForm" mode="error">
-		<parameter name="module" type="identifier" />
-		<parameter name="notification_sid" type="integer" />
-		<parameter name="notification_id" type="identifier" />
-	</validationRule>
-</validationRules>
\ No newline at end of file
diff --git a/modules/notifications/xml/diffusion_type.xml b/modules/notifications/xml/diffusion_type.xml
deleted file mode 100755
index 33fa164eae4..00000000000
--- a/modules/notifications/xml/diffusion_type.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-    <diffusion_type>
-        <id>group</id>
-        <label>Groupe</label>
-        <script>modules/notifications/diffusion_types/group.php</script>
-        <use_email>true</use_email>
-        <use_attachment>true</use_attachment>
-    </diffusion_type>
-    <diffusion_type>
-        <id>entity</id>
-        <label>Entité</label>
-        <script>modules/notifications/diffusion_types/entity.php</script>
-        <use_email>true</use_email>
-        <use_attachment>true</use_attachment>
-    </diffusion_type>
-    <diffusion_type>
-        <id>dest_entity</id>
-        <label>Service de l'utilisateur destinataire</label>
-        <script>modules/notifications/diffusion_types/dest_entity.php</script>
-        <use_email>true</use_email>
-        <use_attachment>false</use_attachment>
-    </diffusion_type>
-    <diffusion_type>
-        <id>user</id>
-        <label>Utilisateur désigné</label>
-        <script>modules/notifications/diffusion_types/user.php</script>
-        <use_email>true</use_email>
-        <use_attachment>true</use_attachment>
-    </diffusion_type>
-    <diffusion_type>
-        <id>dest_user</id>
-        <label>Liste de diffusion du document</label>
-        <script>modules/notifications/diffusion_types/dest_user.php</script>
-        <use_email>true</use_email>
-        <use_attachment>false</use_attachment>
-    </diffusion_type>
-    <diffusion_type>
-        <id>copy_list</id>
-        <label>Liste de diffusion du document</label>
-        <script>modules/notifications/diffusion_types/copy_list.php</script>
-        <use_email>true</use_email>
-        <use_attachment>false</use_attachment>
-    </diffusion_type>
-    <diffusion_type>
-        <id>contact</id>
-        <label>Contact du document</label>
-        <script>modules/notifications/diffusion_types/contact.php</script>
-        <use_email>true</use_email>
-        <use_attachment>false</use_attachment>
-    </diffusion_type>
-    <diffusion_type>
-        <id>dest_user_visa</id>
-        <label>Viseur actuel du document</label>
-        <script>modules/notifications/diffusion_types/dest_user_visa.php</script>
-        <use_email>true</use_email>
-        <use_attachment>false</use_attachment>
-    </diffusion_type>
-    <diffusion_type>
-        <id>dest_user_sign</id>
-        <label>Signataire actuel du document</label>
-        <script>modules/notifications/diffusion_types/dest_user_sign.php</script>
-        <use_email>true</use_email>
-        <use_attachment>false</use_attachment>
-    </diffusion_type>
-</root>
-- 
GitLab