[PLUGINS] ~maj globale
[lhc/web/www.git] / www / plugins / menus_1 / inc / menus.php
index ac7e6ad..16793b7 100644 (file)
@@ -88,8 +88,7 @@ function menus_charger_infos($type, $info=""){
                        if (count($xml['entree'])){
                                $xml = reset($xml['entree']);
                                $entree['nom'] = _T_ou_typo(spip_xml_aplatit($xml['nom']));
-                               $entree['rang'] = intval(trim(spip_xml_aplatit($xml['rang'])));
-                               $entree['rang'] = ($entree['rang'] ? $entree['rang'] : 1000);
+                               $entree['rang'] = intval(trim(spip_xml_aplatit(!empty($xml['rang']) ? $xml['rang'] : 1000)));
                                $entree['description'] = isset($xml['description']) ? _T_ou_typo(spip_xml_aplatit($xml['description'])) : '';
                                $entree['icone'] = isset($xml['icone']) ? find_in_path(reset($xml['icone'])) : '';
                                $entree['refuser_sous_menu'] = isset($xml['refuser_sous_menu']);