diff --git a/dev/skeletons/modMyModule.class.php b/dev/skeletons/modMyModule.class.php index 149228d5ce4d2d8145555935c63234c60025e4e0..db7a4b817110499bc130c807aaed5f5ea2995494 100644 --- a/dev/skeletons/modMyModule.class.php +++ b/dev/skeletons/modMyModule.class.php @@ -178,7 +178,7 @@ class modMyModule extends DolibarrModules // Main menu entries - $this->menus = array(); // List of menus to add + $this->menu = array(); // List of menus to add $r=0; // Add here entries to declare new menus diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index 02e0af3a768b4152edb61598dcc42c792a3d16ce..57aa72e70ca8c6825cfba7beb3cef3b99b21d43a 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -958,10 +958,11 @@ else $adht = new AdherentType($db); $adht->fetch($object->typeid); + $country=GETPOST('pays','int'); // We set country_id, and country_code, country of the chosen country - if (isset($_POST["pays"]) || $object->country_id) + if (!empty($country) || $object->country_id) { - $sql = "SELECT rowid, code, libelle as label from ".MAIN_DB_PREFIX."c_pays where rowid = ".(isset($_POST["pays"])?$_POST["pays"]:$object->country_id); + $sql = "SELECT rowid, code, libelle as label from ".MAIN_DB_PREFIX."c_pays where rowid = ".(!empty($country)?$country:$object->country_id); $resql=$db->query($sql); if ($resql) {