[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpcompta-dev] r519 - tag/rel660/rapport_avance/include
From: |
phpcompta-dev |
Subject: |
[Phpcompta-dev] r519 - tag/rel660/rapport_avance/include |
Date: |
Sat, 29 Jun 2013 19:21:00 +0200 (CEST) |
Author: danydb
Date: 2013-06-29 19:20:59 +0200 (Sat, 29 Jun 2013)
New Revision: 519
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-13 14:25:34 UTC (rev 518)
+++ tag/rel660/rapport_avance/include/class_rapav_formulaire.php
2013-06-29 17:20:59 UTC (rev 519)
@@ -110,10 +110,24 @@
*/
static function save_definition($p_array)
{
+ self::verify_definition($p_array);
self::update_definition($p_array);
return;
}
+ static function verify_definition(&$p_array)
+ {
+ global $cn;
+ 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]));
+ if ( $c > 0 ) {
+ $p_array['p_code'][$i]='C'.$i.microtime();
+ }
+ }
+ }
+
/**
*
* @see save_definition
---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpcompta-dev] r519 - tag/rel660/rapport_avance/include,
phpcompta-dev <=