phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] [19053] This fix shouldn' t have been needed if appli


From: Caeies
Subject: [Phpgroupware-cvs] [19053] This fix shouldn' t have been needed if applications were well written ...
Date: Wed, 04 Feb 2009 18:09:23 +0000

Revision: 19053
          
http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=19053
Author:   Caeies
Date:     2009-02-04 18:09:23 +0000 (Wed, 04 Feb 2009)

Log Message:
-----------
This fix shouldn't have been needed if applications were well written ... no 
comments, save a lot's of false positive errors, but they're still there. So, 
wait for the complete rewrite of core applications before removing them :(

Modified Paths:
--------------
    core/trunk/phpgwapi/inc/class.sql_entity.inc.php

Modified: core/trunk/phpgwapi/inc/class.sql_entity.inc.php
===================================================================
--- core/trunk/phpgwapi/inc/class.sql_entity.inc.php    2009-02-04 18:07:09 UTC 
(rev 19052)
+++ core/trunk/phpgwapi/inc/class.sql_entity.inc.php    2009-02-04 18:09:23 UTC 
(rev 19053)
@@ -1011,34 +1011,48 @@
 
                function add_select($field)
                {
-                       
$this->add_element('select',$this->make_pair($field,''));
-                       $this->ldebug('add_select', array('Field' => $field));
+                       if(array_key_exists($field, $this->map))
+                       {
+                               
$this->add_element('select',$this->make_pair($field,''));
+                               $this->ldebug('add_select', array('Field' => 
$field));
+                       }
                }
 
                function add_criteria($field, $value)
                {
-                       $this->add_element('criteria',$this->make_pair($field,
+                       if(array_key_exists($field, $this->map))
+                       {
+                               
$this->add_element('criteria',$this->make_pair($field,
                                                                           
$value));
-                       $this->ldebug('add_criteria', array('Field' => $field));
-
+                               $this->ldebug('add_criteria', array('Field' => 
$field));
+                       }
                }
                function add_update($value, $field)
-               {                       
-                       $this->add_element('update',$this->make_pair($field,
-                                                                        
$value));
+               {
+                       if(array_key_exists($field, $this->map))
+                       {
+                               
$this->add_element('update',$this->make_pair($field,
+                                               $value));
+                       }
                }
 
                function add_delete($field, $value)
                {
-                       $this->add_element('delete',$this->make_pair($field, 
-                                                                        
$value));
+                       if(array_key_exists($field, $this->map))
+                       {
+                               
$this->add_element('delete',$this->make_pair($field, 
+                                               $value));
+                       }
                }
 
                function add_insert($field, $value, $idx = 0)
                {
-                       $this->insert_index = $idx;
-                       $this->add_element('insert',$this->make_pair($field, 
-                                                                         
$value));
+                       if(array_key_exists($field, $this->map))
+                       {
+                               $this->insert_index = $idx;
+                               
$this->add_element('insert',$this->make_pair($field, 
+                                               $value));
+                       }
                }
                
                /**






reply via email to

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