phpcompta-dev
[Top][All Lists]
Advanced

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

[Phpcompta-dev] r520 - tag/rel660/rapport_avance/include


From: phpcompta-dev
Subject: [Phpcompta-dev] r520 - tag/rel660/rapport_avance/include
Date: Sat, 29 Jun 2013 19:32:38 +0200 (CEST)

Author: danydb
Date: 2013-06-29 19:32:38 +0200 (Sat, 29 Jun 2013)
New Revision: 520

Modified:
   tag/rel660/rapport_avance/include/class_rapav_formulaire.php
Log:
Correct input : doublon p_code

Modified: tag/rel660/rapport_avance/include/class_rapav_formulaire.php
===================================================================
--- tag/rel660/rapport_avance/include/class_rapav_formulaire.php        
2013-06-29 17:20:59 UTC (rev 519)
+++ tag/rel660/rapport_avance/include/class_rapav_formulaire.php        
2013-06-29 17:32:38 UTC (rev 520)
@@ -114,13 +114,20 @@
                self::update_definition($p_array);
                return;
        }
+       /**
+        * @brief Check data and change them if needed
+        * @global database connection $cn
+        * @param array $p_array normally $_POST
+        */
        static function verify_definition(&$p_array)
        {
                global $cn;
+               var_dump($p_array);
                for ($i=0;$i<count($p_array['p_code']);$i++)
                {
-                       $c=$cn->get_value('select count(*) from 
rapport_advanced.formulaire_param where p_code=$1 and p_id <> $2',
-                                       
array($p_array['p_code'][$i],$p_array['p_id'][$i]));
+                       $c=$cn->get_value('select count(*) from 
rapport_advanced.formulaire_param
+                               where p_code=$1 and p_id <> $2 and f_id=$3',
+                                       
array($p_array['p_code'][$i],$p_array['p_id'][$i],$p_array['f_id']));
 
                        if ( $c > 0 ) {
                                $p_array['p_code'][$i]='C'.$i.microtime();



---
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]