@@ -50,6 +50,13 @@ function print_oblyon_menu($db, $atarget, $type_user = 0, &$tabMenu, &$menu, $no
50
50
$ mainmenu = (empty ($ _SESSION ["mainmenu " ]) ? '' : $ _SESSION ["mainmenu " ]);
51
51
$ leftmenu = (empty ($ _SESSION ["leftmenu " ]) ? '' : $ _SESSION ["leftmenu " ]);
52
52
53
+ $ landingpage = (!getDolUserString ('MAIN_LANDING_PAGE ' ) ? (!getDolGlobalString ('MAIN_LANDING_PAGE ' ) ? '' : getDolGlobalString ('MAIN_LANDING_PAGE ' )) : getDolUserString ('MAIN_LANDING_PAGE ' ));
54
+ if (! empty ($ landingpage )) {
55
+ $ landingpage = dol_buildpath ($ landingpage , 1 );
56
+ } else {
57
+ $ landingpage = DOL_URL_ROOT . '/index.php?mainmenu=home&leftmenu=home ' ;
58
+ }
59
+
53
60
$ id = 'mainmenu ' ;
54
61
$ listofmodulesforexternal = explode (', ' , $ conf ->global ->MAIN_MODULES_FOR_EXTERNAL );
55
62
@@ -84,7 +91,7 @@ function print_oblyon_menu($db, $atarget, $type_user = 0, &$tabMenu, &$menu, $no
84
91
85
92
86
93
print '<div class="center backgroundforcompanylogo menulogocontainer"> ' ;
87
- print '<a href=" ' . DOL_URL_ROOT . '" alt=" ' .dol_escape_htmltag ($ title ).'" title=" ' .dol_escape_htmltag ($ title ).'"> ' ;
94
+ print '<a href=" ' . DOL_URL_ROOT . $ landingpage . '" alt=" ' .dol_escape_htmltag ($ title ).'" title=" ' .dol_escape_htmltag ($ title ).'"> ' ;
88
95
print '<img class="mycompany" title=" ' .dol_escape_htmltag ($ title ).'" alt="" src=" ' .$ urllogo .'" style="max-width: 100px; height: 32px;"> ' ;
89
96
print '</a> ' ."\n" ;
90
97
print '</div> ' ."\n" ;
@@ -146,9 +153,9 @@ function print_oblyon_menu($db, $atarget, $type_user = 0, &$tabMenu, &$menu, $no
146
153
$ chaine =$ langs ->trans ("Home " );
147
154
148
155
if (empty ($ noout )) print_start_menu_entry ($ idsel ,$ itemsel ,$ showmode );
149
- if (empty ($ noout )) print_text_menu_entry ($ chaine , 1 , DOL_URL_ROOT . ' /index.php?mainmenu=home&leftmenu= ' , $ id , $ idsel , $ atarget );
156
+ if (empty ($ noout )) print_text_menu_entry ($ chaine , 1 , $ landingpage , $ id , $ idsel , $ atarget );
150
157
if (empty ($ noout )) print_end_menu_entry ($ showmode );
151
- $ menu ->add (' /index.php?mainmenu=home&leftmenu= ' , $ chaine , 0 , $ showmode , $ atarget , "home " , '' );
158
+ $ menu ->add ($ landingpage , $ chaine , 0 , $ showmode , $ atarget , "home " , '' );
152
159
153
160
// Members
154
161
$ tmpentry = array (
@@ -714,6 +721,14 @@ function print_left_oblyon_menu($db, $menu_array_before, $menu_array_after, &$ta
714
721
print '<div class="pushy-btn" title=" ' .$ langs ->trans ("ShowLeftMenu " ).'">≡</div> ' ;
715
722
}
716
723
724
+ // get landing page
725
+ $ landingpage = (empty ($ user ->conf ->MAIN_LANDING_PAGE ) ? (!getDolGlobalString ('MAIN_LANDING_PAGE ' ) ? '' : $ conf ->global ->MAIN_LANDING_PAGE ) : $ user ->conf ->MAIN_LANDING_PAGE );
726
+ if (! empty ($ landingpage )) {
727
+ $ landingpage = str_replace (DOL_URL_ROOT , '' , dol_buildpath ($ landingpage , 1 ));
728
+ } else {
729
+ $ landingpage = '/index.php?mainmenu=home&leftmenu=home ' ;
730
+ }
731
+
717
732
// Show logo company
718
733
if (! empty ($ menu_invert ) && empty ($ noout ) && ! empty ($ conf ->global ->MAIN_SHOW_LOGO )) {
719
734
//$mysoc->logo_mini=(empty($conf->global->MAIN_INFO_SOCIETE_LOGO_MINI)?'':$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI);
@@ -737,7 +752,7 @@ function print_left_oblyon_menu($db, $menu_array_before, $menu_array_after, &$ta
737
752
print "\n" .'<!-- Show logo on menu --> ' ."\n" ;
738
753
739
754
print '<div class="menu_contenu db-menu__society center backgroundforcompanylogo menulogocontainer"> ' ;
740
- print '<a href=" ' . DOL_URL_ROOT . '" alt=" ' .dol_escape_htmltag ($ title ).'" title=" ' .dol_escape_htmltag ($ title ).'"> ' ;
755
+ print '<a href=" ' . DOL_URL_ROOT . $ landingpage . '" alt=" ' .dol_escape_htmltag ($ title ).'" title=" ' .dol_escape_htmltag ($ title ).'"> ' ;
741
756
print '<img class="mycompany" title=" ' .dol_escape_htmltag ($ title ).'" alt="" src=" ' .$ urllogo .'" style="max-width: 100px; height: 32px;"> ' ;
742
757
print '</a> ' ."\n" ;
743
758
print '</div> ' ."\n" ;
@@ -785,7 +800,7 @@ function print_left_oblyon_menu($db, $menu_array_before, $menu_array_after, &$ta
785
800
$ langs ->load ("users " );
786
801
787
802
// Home - dashboard
788
- $ newmenu ->add (" /index.php?mainmenu=home&leftmenu=home " , $ langs ->trans ("MyDashboard " ), 0 , 1 , '' , $ mainmenu , 'home ' );
803
+ $ newmenu ->add ($ landingpage , $ langs ->trans ("MyDashboard " ), 0 , 1 , '' , $ mainmenu , 'home ' );
789
804
790
805
// Setup
791
806
$ newmenu ->add ("/admin/index.php?mainmenu=home&leftmenu=setup " , $ langs ->trans ("Setup " ), 0 , $ user ->admin , '' , $ mainmenu , 'setup ' );
@@ -1184,7 +1199,7 @@ function print_left_oblyon_menu($db, $menu_array_before, $menu_array_after, &$ta
1184
1199
if (!empty ($ conf ->commande ->enabled )) {
1185
1200
$ langs ->load ("orders " );
1186
1201
if (!empty ($ conf ->facture ->enabled )) {
1187
- $ newmenu ->add ("/commande/list.php?leftmenu=orders&search_status=-3&billed =0&contextpage=billableorders " , $ langs ->trans ("MenuOrdersToBill2 " ), 0 , $ user ->rights ->commande ->lire , '' , $ mainmenu , 'orders ' , 0 );
1202
+ $ newmenu ->add ("/commande/list.php?leftmenu=orders&search_status=-3&search_billed =0&contextpage=billableorders " , $ langs ->trans ("MenuOrdersToBill2 " ), 0 , $ user ->rights ->commande ->lire , '' , $ mainmenu , 'orders ' , 0 );
1188
1203
}
1189
1204
//if ($usemenuhider || empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/", $langs->trans("StatusOrderToBill"), 1, $user->rights->commande->lire);
1190
1205
}
@@ -1193,7 +1208,7 @@ function print_left_oblyon_menu($db, $menu_array_before, $menu_array_after, &$ta
1193
1208
if (!empty ($ conf ->supplier_invoice ->enabled )) {
1194
1209
if (!empty ($ conf ->global ->SUPPLIER_MENU_ORDER_RECEIVED_INTO_INVOICE )) {
1195
1210
$ langs ->load ("supplier " );
1196
- $ newmenu ->add ("/fourn/commande/list.php?leftmenu=orders&search_status=5&billed =0 " , $ langs ->trans ("MenuOrdersSupplierToBill " ), 0 , $ user ->rights ->commande ->lire , '' , $ mainmenu , 'orders ' , 0 );
1211
+ $ newmenu ->add ("/fourn/commande/list.php?leftmenu=orders&search_status=5&search_billed =0 " , $ langs ->trans ("MenuOrdersSupplierToBill " ), 0 , $ user ->rights ->commande ->lire , '' , $ mainmenu , 'orders ' , 0 );
1197
1212
//if ($usemenuhider || empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/", $langs->trans("StatusOrderToBill"), 1, $user->rights->commande->lire);
1198
1213
}
1199
1214
}
0 commit comments