diff --git a/apps/maarch_entreprise/class/class_lists_Abstract.php b/apps/maarch_entreprise/class/class_lists_Abstract.php
index 6f54ab6251bbb6084eef40f2d407fed17690f70b..5bf3f5ff6e654ae6b9e62f310cdf629b93f0febc 100644
--- a/apps/maarch_entreprise/class/class_lists_Abstract.php
+++ b/apps/maarch_entreprise/class/class_lists_Abstract.php
@@ -1466,7 +1466,7 @@ abstract class lists_Abstract extends Database
                 }
             }
             $aService = Basket_Baskets_Service::getServiceFromActionId(['id' => $this->params['defaultAction']]);
-            if ($aService['actionPage'] == 'visa_mail0') {
+            if ($aService['actionPage'] == 'visa_mail' && V2_ENABLED == true) {
                 $return = 'onmouseover="this.style.cursor=\'pointer\';" onClick="location.href=\'#/baskets/evis/' .$keyValue. '\'" ';
             } else {
                 $return = 'onmouseover="this.style.cursor=\'pointer\';" onClick="validForm( \'page\', \''.$keyValue.'\', \''.$this->params['defaultAction'].'\');" ';
diff --git a/apps/maarch_entreprise/define.php b/apps/maarch_entreprise/define.php
index c8926c55a5fead26bdc4e9609e83c0c8fdf0f617..4343fc8b4314a39bcd5db22a0faba7de2756caea 100644
--- a/apps/maarch_entreprise/define.php
+++ b/apps/maarch_entreprise/define.php
@@ -18,78 +18,12 @@
 *    along with Maarch Framework.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-/**
- * Ce fichier a placer dans custom/[CUSTOM]/define_local.php permet de mettre des definitions spécifique au serveur
- **/
-if ( !empty($_SESSION['custom_override_id']) && file_exists("{$_SESSION['config']['corepath']}custom/{$_SESSION['custom_override_id']}/define_local.php") ) {
-	require_once "{$_SESSION['config']['corepath']}custom/{$_SESSION['custom_override_id']}/define_local.php";
-}
-
 /**
  * Ce fichier a mettre en paralléle dans le custom, permet de mettre des definitions spécifique au custom (exemple langue ou remplacement de define de ce fichier de base)
  **/
 require_once 'apps/maarch_entreprise/define_custom.php';
 
-if ( ! defined('DEBUG') ) {
-	define('DEBUG', false);
-}
-if ( DEBUG ) {
-	if (!ini_get('display_errors')) {
-	    ini_set('display_errors', 1);
-	}
-	if ( defined('E_ERROR_REPORTING') ) {
-		error_reporting(E_ERROR_REPORTING);
-	} else {
-		error_reporting(E_ALL);
-	}
-}
-if ( @$_SERVER['HTTP_USER_AGENT'] == 'TestU' ) {
-	ini_set('display_errors', 1);
-	error_reporting(E_ALL & ~ E_NOTICE);
-}
-
-if ( ! defined('HEADER_USER_UID_SALT') ) {
-	define('HEADER_USER_UID_SALT', '%s');
-}
-
-// BaseUrl for Web side :
-if ( ! defined('URL_IMG') ){
-	define('URL_IMG', '');
-}
-
-function return_bytes ($size_str)
-{
-    switch (substr ($size_str, -1))
-    {
-        case 'M': case 'm': return (int)$size_str * 1048576;
-        case 'K': case 'k': return (int)$size_str * 1024;
-        case 'G': case 'g': return (int)$size_str * 1073741824;
-        default: return $size_str;
-    }
-}
-// hom many file may we can upload :
-if ( ! defined('UPLOAD_FILE_LIMIT_COUNT') ){
-	define('UPLOAD_FILE_LIMIT_COUNT', 100);
-}
-if ( ! defined('UPLOAD_FILES_MAX_SIZE') ) {
-	define('UPLOAD_FILES_MAX_SIZE', min(
-		return_bytes(ini_get('upload_max_filesize')),
-		return_bytes(ini_get('post_max_size'))
-		));
-}
-if ( ! defined('UPLOAD_FILE_MAX_SIZE') ) {
-	define('UPLOAD_FILE_MAX_SIZE', min(
-		UPLOAD_FILES_MAX_SIZE,
-		return_bytes(ini_get('upload_max_filesize')),
-		return_bytes(ini_get('post_max_size'))
-		));
-}
-
-if ( ! defined('HEADER_USER_UID') ) {
-	define('HEADER_USER_UID', 'UID');
-}
-
-
-if ( ! defined('DEFAULT_PAGE') ) {
-    define('DEFAULT_PAGE', 'index.php');
+// Variable pour activer les vues V2
+if (!defined('V2_ENABLED')) {
+	define('V2_ENABLED', false);
 }
diff --git a/apps/maarch_entreprise/index.php b/apps/maarch_entreprise/index.php
index 305d4a1ba54555f28a0fb50ec9f3fe9fa607df5b..b42fa22363b7700e8560b65002f0449d9f786f1b 100644
--- a/apps/maarch_entreprise/index.php
+++ b/apps/maarch_entreprise/index.php
@@ -40,6 +40,7 @@
 include_once '../../core/class/class_functions.php';
 include_once '../../core/class/class_db_pdo.php';
 include_once '../../core/init.php';
+include_once 'apps/maarch_entreprise/define.php';
 
 if ($_SESSION['config']['usePHPIDS'] == 'true') {
     include 'apps/maarch_entreprise/phpids_control.php';