From 5105279fa1b2c67ec675e667493a8b417244f356 Mon Sep 17 00:00:00 2001
From: Damien Burel <damien.burel@maarch.org>
Date: Fri, 10 Mar 2017 14:46:33 +0100
Subject: [PATCH] [FIX] Modify redirect (2 load JS)

---
 apps/maarch_entreprise/index.php              | 26 ++++++++++---------
 apps/maarch_entreprise/redirect_to_action.php |  2 +-
 2 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/apps/maarch_entreprise/index.php b/apps/maarch_entreprise/index.php
index 9d410109d97..f42311e95da 100644
--- a/apps/maarch_entreprise/index.php
+++ b/apps/maarch_entreprise/index.php
@@ -222,18 +222,6 @@ if(empty($_SESSION['current_basket'])){
     $_SESSION['save_list']['order_field'] = "";
     $_SESSION['save_list']['template'] = "";
 }
-
-if (PROD_MODE) {
-    ?>
-    <script src="js/angular/main.bundle.min.js"></script>
-    <?php
-} else {
-    ?>
-    <script>
-      System.import('js/angular/main.js').catch(function(err){ console.error(err); });
-    </script>
-    <?php
-}
 ?>
 
 <body style="background: url('static.php?filename=loading_big.gif') no-repeat fixed center;" onload="$('maarch_body').style.background='f2f2f2';$('maarch_body').style.backgroundImage='';$('maarch_body').style.backgroundUrl='';$('maarch_content').style.display='block';session_expirate(<?php echo $time;?>, '<?php
@@ -396,4 +384,18 @@ if (file_exists($path)) {
     </div>
     </div>
 </body>
+<?php
+if (PROD_MODE) {
+?>
+<script src="js/angular/main.bundle.min.js"></script>
+<?php
+} else {
+    ?>
+    <script>
+        System.import('js/angular/main.js').catch(function(err){ console.error(err); });
+    </script>
+    <?php
+}
+?>
+
 </html>
\ No newline at end of file
diff --git a/apps/maarch_entreprise/redirect_to_action.php b/apps/maarch_entreprise/redirect_to_action.php
index c71e2f32d38..89dd3a4d625 100644
--- a/apps/maarch_entreprise/redirect_to_action.php
+++ b/apps/maarch_entreprise/redirect_to_action.php
@@ -5,7 +5,7 @@ $security = new security();
 $core_tools = new core_tools();
 $core_tools->load_lang();
 $core_tools->load_html();
-$core_tools->load_header();
+$core_tools->load_header('', false, false);
 require_once("modules".DIRECTORY_SEPARATOR."basket".DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."class_modules_tools.php");
 
 $bask = new basket();
-- 
GitLab