phpcompta-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpcompta-dev] r5109 - phpcompta/tags/rel650/include


From: phpcompta-dev
Subject: [Phpcompta-dev] r5109 - phpcompta/tags/rel650/include
Date: Mon, 17 Sep 2012 20:29:24 +0200 (CEST)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]