Author: danydb
Date: 2012-09-17 20:29:23 +0200 (Mon, 17 Sep 2012)
New Revision: 5109
Modified:
phpcompta/tags/rel650/include/profile.inc.php
Log:
When adding a menu it cannot depend on itself (update)
Modified: phpcompta/tags/rel650/include/profile.inc.php
===================================================================
--- phpcompta/tags/rel650/include/profile.inc.php 2012-09-17 18:28:04 UTC
(rev 5108)
+++ phpcompta/tags/rel650/include/profile.inc.php 2012-09-17 18:29:23 UTC
(rev 5109)
@@ -218,7 +218,11 @@
$p_type = 'P';
$me_code_dep = -1;
}
-
+ /**
+ * Check if we don't add a menu depending on itself
+ */
+ if ( $me_code == $me_code_dep )
+ throw new Exception("Un menu ne peut pas
dépendre de lui-même");
$cn->start();
$me_code_dep = ($me_code_dep == -1) ? null :
$me_code_dep;
$pm_default = (isset($pm_default)) ? 1 : 0;
---
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