Author: danydb
Date: 2012-01-09 14:11:28 +0100 (Mon, 09 Jan 2012)
New Revision: 4692
Modified:
phpcompta/trunk/include/class_fiche_attr.php
Log:
V?\195?\169rifie que ad_extra contient un SQL valide
Modified: phpcompta/trunk/include/class_fiche_attr.php
===================================================================
--- phpcompta/trunk/include/class_fiche_attr.php 2012-01-09 12:55:17 UTC
(rev 4691)
+++ phpcompta/trunk/include/class_fiche_attr.php 2012-01-09 13:11:28 UTC
(rev 4692)
@@ -82,19 +82,21 @@
case 'zone':
$this->ad_size=22;
break;
- case 'select':
+
+ default:
$this->ad_size=22;
+ }
+ }
+ if ( $this->ad_extra == 'select')
+ {
if (trim($this->ad_extra)=="") throw new Exception ("La
requête SQL est vide ");
try{
- $a=$this->cn->exec_sql($this->ad_extra);
+ $this->cn->exec_sql($this->ad_extra);
}catch (Exception $e)
{
throw new Exception ("La requête SQL est invalide ");
}
- default:
- $this->ad_size=22;
- }
}
}
public function save()
_______________________________________________
Phpcompta-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/phpcompta-dev