diff --git a/html/do.php b/html/do.php
index 1daea26f3..ff85bca97 100644
--- a/html/do.php
+++ b/html/do.php
@@ -120,6 +120,9 @@ if (isset($_REQUEST['ac']))
else
{
$default = find_default_module();
+ $_GET['ac']=$default;
+ $_POST['ac']=$default;
+ $_REQUEST['ac']=$default;
show_module($default);
$all[0] = $default;
show_menu($all, 0);
diff --git a/include/ac_common.php b/include/ac_common.php
index 7f14784df..a60d65dc7 100644
--- a/include/ac_common.php
+++ b/include/ac_common.php
@@ -726,6 +726,7 @@ function find_default_module()
$default_module = $cn->get_array("select me_code
from profile_menu join profile_user using (p_id)
where
+ p_type_display='M' and
user_name=$1 and pm_default=1", array($g_user->login));
if (empty($default_module))
@@ -734,8 +735,8 @@ function find_default_module()
from profile_menu join profile_user using (p_id)
where
user_name=$1 and p_order=(select min(p_order) from profile_menu
- where user_name=$1) limit 1", array($g_user->login,$g_user->login));
- return $default_module;
+ where user_name=$2) limit 1", array($g_user->login,$g_user->login));
+ return $default_module[0]['me_code'];
}
if (count($default_module) > 1)
@@ -747,19 +748,7 @@ function find_default_module()
return $default_module[0]['me_code'];
}
}
-/**
- * show default module
- */
-function show_default()
-{
- $cn=Dossier::connect();
- $file=$cn->get_array('SELECT m_code FROM module where m_default=1');
- if (! empty ($file) )
- {
- $selected=$file[0]['m_code'];
- show_module($selected);
- }
-}
+
/**
*
*/