Author: danydb
Date: 2012-09-17 20:57:00 +0200 (Mon, 17 Sep 2012)
New Revision: 5112
Modified:
phpcompta/tags/rel650/include/ac_common.php
Log:
bug : show default module, otherwise menu
Modified: phpcompta/tags/rel650/include/ac_common.php
===================================================================
--- phpcompta/tags/rel650/include/ac_common.php 2012-09-17 18:55:13 UTC (rev
5111)
+++ phpcompta/tags/rel650/include/ac_common.php 2012-09-17 18:57:00 UTC (rev
5112)
@@ -865,8 +865,16 @@
*/
if ( empty ($default_module))
{
- echo_warning(_("Utilisateur n'a pas de profile"));
- exit();
+ $default_module = $cn->get_array("select me_code
+ from profile_menu join profile_user using (p_id)
+ where
+ user_name=$1 and p_order=(select min(p_order) from
profile_menu join profile_user using (p_id)
+ where user_name=$2) limit 1", array($g_user->login,
$g_user->login));
+ if (empty ($default_module))
+ {
+ echo_warning(_("Utilisateur n'a pas de
profile"));
+ exit();
+ }
}
return $default_module[0]['me_code'];
}
---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu
_______________________________________________
Phpcompta est un logiciel libre de comptabilité en ligne
(http://www.phpcompta.eu)
Phpcompta-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/phpcompta-dev