phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] [19028] Fix the phpgwapi_sql_:: -> phpgwapi_sql:: typ


From: Caeies
Subject: [Phpgroupware-cvs] [19028] Fix the phpgwapi_sql_:: -> phpgwapi_sql:: typo, if it doesn' t work for your db, update your db class, not the core api :).
Date: Wed, 21 Jan 2009 14:22:34 +0000

Revision: 19028
          
http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=19028
Author:   Caeies
Date:     2009-01-21 14:22:33 +0000 (Wed, 21 Jan 2009)

Log Message:
-----------
Fix the phpgwapi_sql_:: -> phpgwapi_sql:: typo, if it doesn't work for your db, 
update your db class, not the core api :). Add trigger_error (waiting for 
exceptions) to help debug the failing applications in some crucial methods of 
sql_entity. revert the maat commit about per_full_name ... the REAL fix is in

Modified Paths:
--------------
    core/trunk/phpgwapi/inc/class.contact_addr.inc.php
    core/trunk/phpgwapi/inc/class.contact_central.inc.php
    core/trunk/phpgwapi/inc/class.contact_comm_descr.inc.php
    core/trunk/phpgwapi/inc/class.contact_org_person.inc.php
    core/trunk/phpgwapi/inc/class.contact_person.inc.php
    core/trunk/phpgwapi/inc/class.contacts_sql.inc.php
    core/trunk/phpgwapi/inc/class.sql.inc.php
    core/trunk/phpgwapi/inc/class.sql_builder.inc.php
    core/trunk/phpgwapi/inc/class.sql_criteria.inc.php
    core/trunk/phpgwapi/inc/class.sql_entity.inc.php

Modified: core/trunk/phpgwapi/inc/class.contact_addr.inc.php
===================================================================
--- core/trunk/phpgwapi/inc/class.contact_addr.inc.php  2009-01-21 14:16:23 UTC 
(rev 19027)
+++ core/trunk/phpgwapi/inc/class.contact_addr.inc.php  2009-01-21 14:22:33 UTC 
(rev 19028)
@@ -280,7 +280,7 @@
                */
                function select_addr_address($element)
                {
-                       $this->field_list['addr_address'] = 
phpgwapi_sql_::concat_null(array($this->put_alias('add1'), 
$this->put_alias('add2'), $this->put_alias('add3')));
+                       $this->field_list['addr_address'] = 
phpgwapi_sql::concat_null(array($this->put_alias('add1'), 
$this->put_alias('add2'), $this->put_alias('add3')));
                }
 
                /**
@@ -292,7 +292,7 @@
                function select_adr_one_street($element)
                {
                        $this->set_primary_address($element);
-                       
$this->field_list['adr_one_street']=phpgwapi_sql_::concat_null(array($this->put_alias('add1'),
 $this->put_alias('add2'), $this->put_alias('add3')));
+                       
$this->field_list['adr_one_street']=phpgwapi_sql::concat_null(array($this->put_alias('add1'),
 $this->put_alias('add2'), $this->put_alias('add3')));
 
                }
 
@@ -329,7 +329,7 @@
                function select_secondary($element)
                {
                                $this->set_secondary_address($element);
-                               $this->field_list[$element['field']] = 
$this->put_alias(phpgwapi_sql_::string($element['real_field']));
+                               $this->field_list[$element['field']] = 
$this->put_alias(phpgwapi_sql::string($element['real_field']));
                }
 
                /**
@@ -356,7 +356,7 @@
                function criteria_primary($element)
                {
                        $this->set_primary_address($element);
-                       
$criteria=phpgwapi_sql_criteria::has($this->put_alias($element['real_field']),phpgwapi_sql_::string($element['value']));
+                       
$criteria=phpgwapi_sql_criteria::has($this->put_alias($element['real_field']),phpgwapi_sql::string($element['value']));
                        $this->add_criteria($criteria);
                }
 
@@ -369,8 +369,8 @@
                function criteria_adr_two_street($element)
                {
                        $this->set_secondary_address($element);
-                       
$criteria=phpgwapi_sql_criteria::or_(phpgwapi_sql_criteria::has($this->put_alias('add1'),phpgwapi_sql_::string($element['value'])),
-                                                       
phpgwapi_sql_criteria::has($this->put_alias('add2'),phpgwapi_sql_::string($element['value'])));
+                       
$criteria=phpgwapi_sql_criteria::or_(phpgwapi_sql_criteria::has($this->put_alias('add1'),phpgwapi_sql::string($element['value'])),
+                                                       
phpgwapi_sql_criteria::has($this->put_alias('add2'),phpgwapi_sql::string($element['value'])));
                        $this->_add_criteria($criteria);
 
                }
@@ -378,7 +378,7 @@
                function criteria_secondary($element)
                {
                        $this->set_secondary_address($element);
-                       
$criteria=phpgwapi_sql_criteria::has($this->put_alias($element['real_field']),phpgwapi_sql_::string($element['value']));
+                       
$criteria=phpgwapi_sql_criteria::has($this->put_alias($element['real_field']),phpgwapi_sql::string($element['value']));
                        $this->_add_criteria($criteria);
                }
 
@@ -407,7 +407,7 @@
                function criteria_addr_pref_val($element)
                {
                        $field = $this->put_alias($element['real_field']);
-                       $criteria = 
phpgwapi_sql_criteria::or_(phpgwapi_sql_criteria::equal($field, 
phpgwapi_sql_::string($element['value'])),
+                       $criteria = 
phpgwapi_sql_criteria::or_(phpgwapi_sql_criteria::equal($field, 
phpgwapi_sql::string($element['value'])),
                                                          
phpgwapi_sql_criteria::is_null($field));
                        $this->_add_criteria($criteria);
                        return $criteria;

Modified: core/trunk/phpgwapi/inc/class.contact_central.inc.php
===================================================================
--- core/trunk/phpgwapi/inc/class.contact_central.inc.php       2009-01-21 
14:16:23 UTC (rev 19027)
+++ core/trunk/phpgwapi/inc/class.contact_central.inc.php       2009-01-21 
14:22:33 UTC (rev 19028)
@@ -180,7 +180,7 @@
                        {
                                foreach($element['value'] as $value)
                                {
-                                       $data[] = 
phpgwapi_sql_criteria::or_(phpgwapi_sql_criteria::equal($field, 
phpgwapi_sql_::string($value)),
+                                       $data[] = 
phpgwapi_sql_criteria::or_(phpgwapi_sql_criteria::equal($field, 
phpgwapi_sql::string($value)),
                                                                        
phpgwapi_sql_criteria::has($field, ',' . $value . ','));
                                }
                                
@@ -189,7 +189,7 @@
                        }
                        else
                        {
-                               
$this->_add_criteria(phpgwapi_sql_criteria::equal($field, 
phpgwapi_sql_::string($element['value'])));
+                               
$this->_add_criteria(phpgwapi_sql_criteria::equal($field, 
phpgwapi_sql::string($element['value'])));
                        }
                }
        }

Modified: core/trunk/phpgwapi/inc/class.contact_comm_descr.inc.php
===================================================================
--- core/trunk/phpgwapi/inc/class.contact_comm_descr.inc.php    2009-01-21 
14:16:23 UTC (rev 19027)
+++ core/trunk/phpgwapi/inc/class.contact_comm_descr.inc.php    2009-01-21 
14:22:33 UTC (rev 19028)
@@ -99,7 +99,7 @@
                        
                        foreach($element['value'] as $value)
                        {
-                               $data[] = phpgwapi_sql_criteria::equal($field, 
phpgwapi_sql_::string($value));
+                               $data[] = phpgwapi_sql_criteria::equal($field, 
phpgwapi_sql::string($value));
                        }
 
                        $criteria = phpgwapi_sql_criteria::append_or($data);

Modified: core/trunk/phpgwapi/inc/class.contact_org_person.inc.php
===================================================================
--- core/trunk/phpgwapi/inc/class.contact_org_person.inc.php    2009-01-21 
14:16:23 UTC (rev 19027)
+++ core/trunk/phpgwapi/inc/class.contact_org_person.inc.php    2009-01-21 
14:22:33 UTC (rev 19028)
@@ -148,7 +148,7 @@
                function criteria_my_preferred($element)
                {
                        $field = $this->put_alias($element['real_field']);
-                       $criteria = 
phpgwapi_sql_criteria::or_(phpgwapi_sql_criteria::equal($field, 
phpgwapi_sql_::string($element['value'])),
+                       $criteria = 
phpgwapi_sql_criteria::or_(phpgwapi_sql_criteria::equal($field, 
phpgwapi_sql::string($element['value'])),
                                                          
phpgwapi_sql_criteria::is_null($field));
                        $this->_add_criteria($criteria);
                        return $criteria;

Modified: core/trunk/phpgwapi/inc/class.contact_person.inc.php
===================================================================
--- core/trunk/phpgwapi/inc/class.contact_person.inc.php        2009-01-21 
14:16:23 UTC (rev 19027)
+++ core/trunk/phpgwapi/inc/class.contact_person.inc.php        2009-01-21 
14:22:33 UTC (rev 19028)
@@ -49,13 +49,13 @@
                                                                 'sort'         
=> '',
                                                                 'field'        
=> '',
                                                                 'type'         
=> 'integer'),
-//                              'per_full_name'        => array('select'       
=> 'full_name',
-//                                                              'criteria'     
=> '',
-//                                                              'insert'       
=> '',
-//                                                              'update'       
=> '',
-//                                                              'delete'       
=> '',
-//                                                              'sort'         
=> '',
-//                                                              'field'        
=> ''),
+                                'per_full_name'        => array('select'       
=> 'full_name',
+                                                                'criteria'     
=> '',
+                                                                'insert'       
=> '',
+                                                                'update'       
=> '',
+                                                                'delete'       
=> '',
+                                                                'sort'         
=> '',
+                                                                'field'        
=> ''),
                                 'per_first_name'       => array('select'       
=> '',
                                                                 'criteria'     
=> '',
                                                                 'insert'       
=> '',
@@ -296,7 +296,7 @@
                                 'people'               => array('select'       
=> 'relink_org_person'),
                                 'people_local'         => array('select'       
=> 'relink_org_person'));
 
-               function contact_person ($ali = '', $field = '', $criteria =    
'')
+               public  function contact_person ($ali = '', $field = '', 
$criteria =    '')
                {
                        $this->_constructor('phpgw_contact_person', 
'contact_person');
                        if($field)
@@ -335,9 +335,8 @@
 
                function full_name()
                {
-
-                       $this->add_field('per_full_name', 
phpgwapi_sql_::concat_null(array($this->real_field('per_first_name'), 
phpgwapi_sql_::string(' '),
-                                                                               
 $this->real_field('per_middle_name'), phpgwapi_sql_::string(' '),
+                       $this->add_field('per_full_name', 
phpgwapi_sql::concat_null(array($this->real_field('per_first_name'), 
phpgwapi_sql::string(' '),
+                                                                               
 $this->real_field('per_middle_name'), phpgwapi_sql::string(' '),
                                                                                
 $this->real_field('per_last_name'))));
                }
 

Modified: core/trunk/phpgwapi/inc/class.contacts_sql.inc.php
===================================================================
--- core/trunk/phpgwapi/inc/class.contacts_sql.inc.php  2009-01-21 14:16:23 UTC 
(rev 19027)
+++ core/trunk/phpgwapi/inc/class.contacts_sql.inc.php  2009-01-21 14:22:33 UTC 
(rev 19028)
@@ -1670,7 +1670,7 @@
                        }
 
                        $this->request('person_id');
-                       // phpgwapi_sql_::in() is better than make a select by 
each account
+                       // phpgwapi_sql::in() is better than make a select by 
each account
                        $this->criteria(array('person_id' => $people));
                        return $this->get_query($action, __LINE__, __FILE__);
                }
@@ -1732,7 +1732,7 @@
                {
                        $sql = 'SELECT cat2.cat_id FROM phpgw_categories as cat 
'
                                .'INNER JOIN phpgw_categories as cat2 ON 
cat.cat_id=cat2.cat_parent '
-                               .'WHERE '.phpgwapi_sql_::in('cat.cat_id', 
$cat_id);
+                               .'WHERE '.phpgwapi_sql::in('cat.cat_id', 
$cat_id);
 
                        $this->db->query($sql, __LINE__, __FILE__);
                        while ($this->db->next_record())
@@ -2123,7 +2123,7 @@
                        {
                                $principal['owner'] = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        }
-                       return $contact->update($principal, 
phpgwapi_sql_criteria::_equal('contact_id',phpgwapi_sql_::integer($cid)), 
$action);
+                       return $contact->update($principal, 
phpgwapi_sql_criteria::_equal('contact_id',phpgwapi_sql::integer($cid)), 
$action);
                }
 
                /**
@@ -2145,7 +2145,7 @@
                        {
                                $data['per_modby'] = $this->get_user_id();
                        }
-                       return $person->update($data, 
phpgwapi_sql_criteria::_equal('person_id',phpgwapi_sql_::integer($id)), 
$action);
+                       return $person->update($data, 
phpgwapi_sql_criteria::_equal('person_id',phpgwapi_sql::integer($id)), $action);
                }
 
                /**
@@ -2167,7 +2167,7 @@
                        {
                                $data['org_modby'] = $this->get_user_id();
                        }
-                       return $org->update($data, 
phpgwapi_sql_criteria::_equal('org_id',phpgwapi_sql_::integer($id)), $action);
+                       return $org->update($data, 
phpgwapi_sql_criteria::_equal('org_id',phpgwapi_sql::integer($id)), $action);
                }
 
 
@@ -2190,7 +2190,7 @@
                        {
                                $data['addr_modby'] = $this->get_user_id();
                        }
-                       return $loc->update($data, 
phpgwapi_sql_criteria::_equal('contact_addr_id',phpgwapi_sql_::integer($id)), 
$action);
+                       return $loc->update($data, 
phpgwapi_sql_criteria::_equal('contact_addr_id',phpgwapi_sql::integer($id)), 
$action);
                }
 
                /**
@@ -2212,7 +2212,7 @@
                        {
                                $data['addr_modby'] = $this->get_user_id();
                        }
-                       return $loc->update($data, 
phpgwapi_sql_criteria::_equal('contact_id',phpgwapi_sql_::integer($contact_id)),
 $action);
+                       return $loc->update($data, 
phpgwapi_sql_criteria::_equal('contact_id',phpgwapi_sql::integer($contact_id)), 
$action);
                }
 
                /**
@@ -2234,7 +2234,7 @@
                        {
                                $data['comm_modby'] = $this->get_user_id();
                        }
-                       return $comm->update($data, 
phpgwapi_sql_criteria::_equal('comm_id',phpgwapi_sql_::integer($id)), $action);
+                       return $comm->update($data, 
phpgwapi_sql_criteria::_equal('comm_id',phpgwapi_sql::integer($id)), $action);
                }
 
                /**
@@ -2248,7 +2248,7 @@
                function edit_other($id, $data, $action=PHPGW_SQL_RETURN_SQL)
                {
                        $comm = createObject('phpgwapi.contact_others');
-                       return $comm->update($data, 
phpgwapi_sql_criteria::_equal('other_id',phpgwapi_sql_::integer($id)), $action);
+                       return $comm->update($data, 
phpgwapi_sql_criteria::_equal('other_id',phpgwapi_sql::integer($id)), $action);
                }
 
                /**
@@ -2262,7 +2262,7 @@
                function edit_comms_by_contact($id, $data, 
$action=PHPGW_SQL_RETURN_SQL)
                {
                        $comm = createObject('phpgwapi.contact_comm');
-                       return $comm->update($data, 
phpgwapi_sql_criteria::_equal('contact_id',phpgwapi_sql_::integer($id)), 
$action);
+                       return $comm->update($data, 
phpgwapi_sql_criteria::_equal('contact_id',phpgwapi_sql::integer($id)), 
$action);
                }
 
                /**
@@ -2280,16 +2280,16 @@
                        $relation = createObject('phpgwapi.contact_org_person');
                        if($org_id && $person_id)
                        {
-                               $criteria = 
phpgwapi_sql_criteria::and_(phpgwapi_sql_criteria::equal('org_id',phpgwapi_sql_::integer($org_id)),
-                                                                
phpgwapi_sql_criteria::equal('person_id',phpgwapi_sql_::integer($person_id)));
+                               $criteria = 
phpgwapi_sql_criteria::and_(phpgwapi_sql_criteria::equal('org_id',phpgwapi_sql::integer($org_id)),
+                                                                
phpgwapi_sql_criteria::equal('person_id',phpgwapi_sql::integer($person_id)));
                        }
                        elseif($org_id)
                        {
-                               $criteria = 
phpgwapi_sql_criteria::equal('org_id',phpgwapi_sql_::integer($org_id));
+                               $criteria = 
phpgwapi_sql_criteria::equal('org_id',phpgwapi_sql::integer($org_id));
                        }
                        elseif($person_id)
                        {
-                               $criteria = 
phpgwapi_sql_criteria::equal('person_id',phpgwapi_sql_::integer($person_id));
+                               $criteria = 
phpgwapi_sql_criteria::equal('person_id',phpgwapi_sql::integer($person_id));
                        }
 
                        return $relation->update($data, $criteria, $action);
@@ -2310,7 +2310,7 @@
                        }
                        $contact = createObject('phpgwapi.contact_central');
                        return $contact->update(array('owner' => $new_owner),
-                                               
phpgwapi_sql_criteria::_equal('owner',phpgwapi_sql_::integer($old_owner)),
+                                               
phpgwapi_sql_criteria::_equal('owner',phpgwapi_sql::integer($old_owner)),
                                                PHPGW_SQL_RUN_SQL);
                }
 
@@ -2329,7 +2329,7 @@
                        }
                        $contact = createObject('phpgwapi.contact_others');
                        return $contact->update(array('contact_owner' => 
$new_owner),
-                                               
phpgwapi_sql_criteria::_equal('contact_owner',phpgwapi_sql_::integer($old_owner)),
+                                               
phpgwapi_sql_criteria::_equal('contact_owner',phpgwapi_sql::integer($old_owner)),
                                                PHPGW_SQL_RUN_SQL);
                }
 
@@ -2346,8 +2346,8 @@
                function edit_other_by_owner($id, $new_data, $old_data, 
$field_data, $action=PHPGW_SQL_RUN_SQL)
                {
                        $other = createObject('phpgwapi.contact_others');
-                       $criteria = 
phpgwapi_sql_criteria::append_and(array(phpgwapi_sql_criteria::equal('contact_owner',
 phpgwapi_sql_::integer($id)),
-                                                                
phpgwapi_sql_criteria::equal($field_data, phpgwapi_sql_::string($old_data))));
+                       $criteria = 
phpgwapi_sql_criteria::append_and(array(phpgwapi_sql_criteria::equal('contact_owner',
 phpgwapi_sql::integer($id)),
+                                                                
phpgwapi_sql_criteria::equal($field_data, phpgwapi_sql::string($old_data))));
                        return $other->update(array($field_data => $new_data), 
$criteria, $action);
                }
 
@@ -2363,7 +2363,7 @@
                {
                        $contact = createObject('phpgwapi.contact_central');
                        $principal['cat_id'] = 
$this->get_categories($categories);
-                       return $contact->update($principal, 
phpgwapi_sql_criteria::_equal('contact_id',phpgwapi_sql_::integer($cid)), 
$action);
+                       return $contact->update($principal, 
phpgwapi_sql_criteria::_equal('contact_id',phpgwapi_sql::integer($cid)), 
$action);
                }
 
 

Modified: core/trunk/phpgwapi/inc/class.sql.inc.php
===================================================================
--- core/trunk/phpgwapi/inc/class.sql.inc.php   2009-01-21 14:16:23 UTC (rev 
19027)
+++ core/trunk/phpgwapi/inc/class.sql.inc.php   2009-01-21 14:22:33 UTC (rev 
19028)
@@ -332,11 +332,11 @@
                                if (is_array($values))
                                {
                                        //this never gets executed!
-                                       return phpgwapi_sql_::equal($field, 
phpgwapi_sql_::$type(current($values)));
+                                       return phpgwapi_sql::equal($field, 
phpgwapi_sql::$type(current($values)));
                                }
                                else
                                {
-                                       return phpgwapi_sql_::equal($field, 
phpgwapi_sql_::$type($values));
+                                       return phpgwapi_sql::equal($field, 
phpgwapi_sql::$type($values));
                                }       
                        }
                }
@@ -399,7 +399,7 @@
 
                public static function character($str)
                {
-                       return phpgwapi_sql_::string($str);
+                       return phpgwapi_sql::string($str);
                }
 
                /**
@@ -419,10 +419,10 @@
                        switch(gettype($date))
                        {
                                case 'integer':
-                                       return 
phpgwapi_sql_::int_date2str($date, $format);
+                                       return 
phpgwapi_sql::int_date2str($date, $format);
 
                                default:
-                                       return 
phpgwapi_sql_::str_date2int($date, $format);
+                                       return 
phpgwapi_sql::str_date2int($date, $format);
                        }
                }
 
@@ -434,9 +434,9 @@
                        switch(gettype($time))
                        {
                        case 'integer':
-                               return phpgwapi_sql_::int_time2str($time, 
$format);
+                               return phpgwapi_sql::int_time2str($time, 
$format);
                        default:
-                               return phpgwapi_sql_::str_time2int($time, 
$format);
+                               return phpgwapi_sql::str_time2int($time, 
$format);
                        }
                }
 
@@ -464,7 +464,7 @@
 
                public static function str_time2int($time)
                {
-                       return (int) phpgwapi_sql_::str_date2int($time);
+                       return (int) phpgwapi_sql::str_date2int($time);
                }
 
                /*************************************************************\

Modified: core/trunk/phpgwapi/inc/class.sql_builder.inc.php
===================================================================
--- core/trunk/phpgwapi/inc/class.sql_builder.inc.php   2009-01-21 14:16:23 UTC 
(rev 19027)
+++ core/trunk/phpgwapi/inc/class.sql_builder.inc.php   2009-01-21 14:22:33 UTC 
(rev 19028)
@@ -701,7 +701,7 @@
                * Recieve $data that is an array (operand_left, operand_right, 
operator)
                * If operant_left is array I call... myself :), else try to get 
the field name.
                * If right operand is array can myself to, else, nothing.
-               * Third operator IS_ a operator name that send to 
phpgwapi_sql_::operate();
+               * Third operator IS_ a operator name that send to 
phpgwapi_sql::operate();
                * @param array $data Genertaded by calls of sql class.
                * @param string $operation Is one of: insert, select, delete, 
update, if is diferent to select, then the result will not include the alias 
for table.
                * @return Criteria for any sql query.

Modified: core/trunk/phpgwapi/inc/class.sql_criteria.inc.php
===================================================================
--- core/trunk/phpgwapi/inc/class.sql_criteria.inc.php  2009-01-21 14:16:23 UTC 
(rev 19027)
+++ core/trunk/phpgwapi/inc/class.sql_criteria.inc.php  2009-01-21 14:22:33 UTC 
(rev 19028)
@@ -289,11 +289,11 @@
                {
                        if (is_array($operand) || $optional_operand == '' || 
$optional_operand == FALSE)
                        {
-                               return phpgwapi_sql_::$operator($operand);
+                               return phpgwapi_sql::$operator($operand);
                        }
                        else
                        {
-                               return phpgwapi_sql_::$operator($operand, 
$optional_operand);
+                               return phpgwapi_sql::$operator($operand, 
$optional_operand);
                        }
                }
 
@@ -321,7 +321,7 @@
                        }
                        else
                        {
-                               $operand_right = phpgwapi_sql_::null();
+                               $operand_right = phpgwapi_sql::null();
                        }
                        return self::$operator($operand_left, $operand_right);
                }

Modified: core/trunk/phpgwapi/inc/class.sql_entity.inc.php
===================================================================
--- core/trunk/phpgwapi/inc/class.sql_entity.inc.php    2009-01-21 14:16:23 UTC 
(rev 19027)
+++ core/trunk/phpgwapi/inc/class.sql_entity.inc.php    2009-01-21 14:22:33 UTC 
(rev 19028)
@@ -93,7 +93,7 @@
                * Entity, class and general section                           *
                \*************************************************************/
 
-               function _constructor($table='', $alias='')
+               public function _constructor($table='', $alias='')
                {
                        $this->table = $table;
                        // Temp alias name, just if not empty
@@ -574,7 +574,7 @@
                        
                        }
                        $type = $this->get_datatype($false_field);
-                       return $data === phpgwapi_sql_::null() ? 
phpgwapi_sql_::null() : phpgwapi_sql_::$type($data);
+                       return $data === phpgwapi_sql::null() ? 
phpgwapi_sql::null() : phpgwapi_sql::$type($data);
                }
 
                /**
@@ -697,7 +697,7 @@
                */
                function set_update_data($element)
                {
-                       $value = ($element['value'] || $element['value'] == 0) 
? $this->cast($element['value'], $element['field']) : phpgwapi_sql_::null();
+                       $value = ($element['value'] || $element['value'] == 0) 
? $this->cast($element['value'], $element['field']) : phpgwapi_sql::null();
                        $this->values .= (($this->values)?', 
':'').$element['real_field'].' = '.$value;
                }
 
@@ -900,13 +900,12 @@
 
                        $this->ldebug('add_element', array('Element' => 
$element), 'dump');
 
-                       $default = '';//add this to stop E_NOTICE output, no 
idea wtf it is meant to be
                        if($method == PHPGW_SQL_DEFAULT_METHOD)
                        {
                                $this->ldebug('add_element', array
                                                                                
        (
                                                                                
                'Method_Default DEF' => $method_default,
-                                                                               
                'Method DEF' => $default
+                                                                               
                'Method DEF' => $method
                                                                                
        ));
                                $this->$method_default($element);
                        }
@@ -915,7 +914,7 @@
                                $this->ldebug('add_element', array
                                                                                
        (
                                                                                
                'Method_Default' => $method_default,
-                                                                               
                'Method' => $default
+                                                                               
                'Method' => $method
                                                                                
        ));
                                $this->$method($element);
                        }
@@ -946,6 +945,7 @@
                                }
                        }
                        // this is an error :/ not $field in map
+                       trigger_error("Unknown method for ${field}", 
E_USER_NOTICE);
                        return;
                }
 
@@ -964,6 +964,7 @@
                                }
                        }
                        // this is an error :/ not $field in map
+                       trigger_error("Unknown real field for ${field}", 
E_USER_NOTICE);
                        return;
                }
 
@@ -994,6 +995,7 @@
                                }
                        }
                        // this is an error :/ not $field in map
+                       trigger_error("Unknown field ${field}", E_USER_NOTICE);
                        return;
                }
                
@@ -1046,6 +1048,7 @@
                */
                function dont_exist($data)
                {
+                       trigger_error("Sorry, this data doesn't exist ${data}", 
E_USER_NOTICE);
                }
 
                /**






reply via email to

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