phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] cdb/inc class.cdb_organization.inc.php, 1.5 class.cdb


From: powerstat
Subject: [Phpgroupware-cvs] cdb/inc class.cdb_organization.inc.php, 1.5 class.cdb_address.inc.php, 1.5 class.cdb_entity.inc.php, 1.8 class.cdb_contact_personal.inc.php, 1.8 class.cdb_organization_location.inc.php, 1.6 class.bo_filter.inc.php, 1.4 class.cdb_contact_internet.inc.php, 1.4 class.cdb_entity_meta.inc.php, 1.5 class.cdb_contact_client.inc.php, 1.4 class.cdb_contact.inc.php, 1.9 class.cdb_phone.inc.php, 1.8 class.cdb_organization_client.inc.php, 1.4
Date: Mon, 18 Apr 2005 13:21:00 +0200

Update of cdb/inc

Modified Files:
     Branch: MAIN
            class.cdb_organization.inc.php lines: +12 -9
            class.cdb_address.inc.php lines: +4 -2
            class.cdb_entity.inc.php lines: +5 -5
            class.cdb_contact_personal.inc.php lines: +6 -2
            class.cdb_organization_location.inc.php lines: +4 -2
            class.bo_filter.inc.php lines: +2 -2
            class.cdb_contact_internet.inc.php lines: +3 -1
            class.cdb_entity_meta.inc.php lines: +6 -2
            class.cdb_contact_client.inc.php lines: +5 -3
            class.cdb_contact.inc.php lines: +13 -10
            class.cdb_phone.inc.php lines: +3 -1
            class.cdb_organization_client.inc.php lines: +4 -2

Log Message:
Fixed more syntax errors

====================================================
Index: cdb/inc/class.cdb_organization.inc.php
diff -u cdb/inc/class.cdb_organization.inc.php:1.4 
cdb/inc/class.cdb_organization.inc.php:1.5
--- cdb/inc/class.cdb_organization.inc.php:1.4  Mon Apr 18 08:21:56 2005
+++ cdb/inc/class.cdb_organization.inc.php      Mon Apr 18 11:21:27 2005
@@ -192,6 +192,7 @@

                                        reset($this->_dirty);
                                        do
+                                       {
                                                $key = key($this->_dirty);
                                                switch($key)
                                                {
@@ -210,7 +211,7 @@
                                                                $sql.=$key.'="';
                                                                $sql .= 
$this->_get($key) . '", ';
                                                }
-
+                                       }
                                        while (next($this->_dirty));
                                        if ($sql)
                                        {
@@ -263,6 +264,7 @@

                        reset($this->_);
                        do
+                       {
                                $key = key($this->_);
                                switch($key)
                                {
@@ -270,12 +272,13 @@
                                                // the note is in a diff table
                                                // just ignore it for now and 
we'll load it in a min
                                                break;
-                                       case 'organization_id'
+                                       case 'organization_id':
                                                
$this->_let('organization_id',$organization_id);
                                                break;
                                        default:
                                                
$this->_let($key,$this->_db->f($key));
                                }
+                       }
                        while(next($this->_));

                        // Now take care of the note
@@ -322,7 +325,7 @@
                function get_location_data( $location )
                {
                        /* TODO */
-                       return contact.location.class;
+                       // return contact.location.class; // This is a syntax 
error
                }

                function get_name()
@@ -411,7 +414,7 @@

                function get_locations()
                {
-                       _location_list = array();
+                       $_location_list = array();

                        $sql = 'SELECT location_id, location FROM ' .
                                'cdb_org_locations WHERE organization_id="' .
@@ -419,15 +422,15 @@

                        $this->_db->query($sql,__LINE__,__FILE__);

-                       _location_list[this->_db->f('location_id')] = 
this->_db->f('location');
+                       $_location_list[$this->_db->f('location_id')] = 
$this->_db->f('location');

-                       for ( int i = ; i < this->_db->num_rows(); i++ )
+                       for ( $i = 0; $i < $this->_db->num_rows(); ++$i )
                        {
                                $this->_db->next_record();
-                               _location_list[$this->_db->f('location_id')] = 
$this->_db->f('location');
+                               $_location_list[$this->_db->f('location_id')] = 
$this->_db->f('location');
                        }

-                       return _location_list;
+                       return $_location_list;
                }

        }

====================================================
Index: cdb/inc/class.cdb_address.inc.php
diff -u cdb/inc/class.cdb_address.inc.php:1.4 
cdb/inc/class.cdb_address.inc.php:1.5
--- cdb/inc/class.cdb_address.inc.php:1.4       Mon Apr 18 08:21:56 2005
+++ cdb/inc/class.cdb_address.inc.php   Mon Apr 18 11:21:27 2005
@@ -139,8 +139,10 @@

                        reset($this->_);
                        do
+                       {
                                $key = key($this->_);
                                $this->_let($key,$this->_db->f($key));
+                       }
                        while(next($this->_));

                        $this->_id = (int)$this->_db->f('entity_id');
@@ -152,7 +154,7 @@
                }

                function create($entity_id, $type_id, $street, $city,
-                               $country, $postal_code, )
+                               $country, $postal_code )
                {
                        $this->_loaded = TRUE;
                        $this->_dirty = array();

====================================================
Index: cdb/inc/class.cdb_entity.inc.php
diff -u cdb/inc/class.cdb_entity.inc.php:1.7 
cdb/inc/class.cdb_entity.inc.php:1.8
--- cdb/inc/class.cdb_entity.inc.php:1.7        Mon Apr 18 08:21:56 2005
+++ cdb/inc/class.cdb_entity.inc.php    Mon Apr 18 11:21:27 2005
@@ -128,8 +128,8 @@
                */
                function create($entity_type)
                {
-                       unset $this->_org;
-                       unset $this->_contact;
+                       unset($this->_org);
+                       unset($this->_contact);
                        $this->_loaded = FALSE;
                        $this->_id = 0;

@@ -254,7 +254,7 @@
                @function get_org_data
                @abstract Returns the loaded org class, if one exists
                */
-               function get_org_data
+               function get_org_data()
                {
                        if ($this->loaded() && 
$this->get_type()=='organization')
                        {
@@ -263,7 +263,7 @@
                        else
                        {
                                return FALSE;
-                       {
+                       }
                }

                /*!

====================================================
Index: cdb/inc/class.cdb_contact_personal.inc.php
diff -u cdb/inc/class.cdb_contact_personal.inc.php:1.7 
cdb/inc/class.cdb_contact_personal.inc.php:1.8
--- cdb/inc/class.cdb_contact_personal.inc.php:1.7      Mon Apr 18 08:21:56 2005
+++ cdb/inc/class.cdb_contact_personal.inc.php  Mon Apr 18 11:21:27 2005
@@ -72,7 +72,7 @@
                                case 'male':
                                case 'female':
                                        return $this->_let('gender', 
$new_gender);
-                               case default:
+                               default:
                                        return FALSE;
                        }
                }
@@ -136,9 +136,11 @@
                                {
                                reset($this->_dirty);
                                        do
+                                       {
                                                $key = key($this->_dirty);
                                                $sql.=$key.'="';
                                                $sql .= $this->_get($key) . '", 
';
+                                       }
                                        while (next($this->_dirty));
                                        if ($sql)
                                        {
@@ -173,8 +175,10 @@

                        reset($this->_);
                        do
+                       {
                        $key = key($this->_);
                        $this->_let($key,$this->_db->f($key));
+                       }
                        while(next($this->_));

                        $this->_dirty = array();

====================================================
Index: cdb/inc/class.cdb_organization_location.inc.php
diff -u cdb/inc/class.cdb_organization_location.inc.php:1.5 
cdb/inc/class.cdb_organization_location.inc.php:1.6
--- cdb/inc/class.cdb_organization_location.inc.php:1.5 Mon Apr 18 08:21:56 2005
+++ cdb/inc/class.cdb_organization_location.inc.php     Mon Apr 18 11:21:27 2005
@@ -157,8 +157,10 @@

                        reset($this->_);
                        do
+                       {
                                $key = key($this->_);
                                $this->_let($key,$this->_db->f($key));
+                       }
                        while(next($this->_));

                        $this->_dirty = array();
@@ -180,7 +182,7 @@
                                'VALUES ("0", "", "", "", "", "", "", "")';
                        $this->_db->query($sql,__LINE__,__FILE__);
                        return 
$this->_db->get_last_insert_id('phpgw_cdb_org_location',
-                               'location_id'));
+                               'location_id');

                }


====================================================
Index: cdb/inc/class.bo_filter.inc.php
diff -u cdb/inc/class.bo_filter.inc.php:1.3 cdb/inc/class.bo_filter.inc.php:1.4
--- cdb/inc/class.bo_filter.inc.php:1.3 Mon Apr 18 08:21:56 2005
+++ cdb/inc/class.bo_filter.inc.php     Mon Apr 18 11:21:27 2005
@@ -451,7 +451,7 @@
                                                        'location_id'
                                                );
                                        }
-                                       if (! $this->_joined('org')
+                                       if (! $this->_joined('org'))
                                        {
                                                $retval['from'] .= 
$this->left_join_ex(
                                                        
'phpgw_cdb_org_location',

====================================================
Index: cdb/inc/class.cdb_contact_internet.inc.php
diff -u cdb/inc/class.cdb_contact_internet.inc.php:1.3 
cdb/inc/class.cdb_contact_internet.inc.php:1.4
--- cdb/inc/class.cdb_contact_internet.inc.php:1.3      Mon Apr 18 08:21:56 2005
+++ cdb/inc/class.cdb_contact_internet.inc.php  Mon Apr 18 11:21:27 2005
@@ -221,8 +221,10 @@

                        reset($this->_);
                        do
+                       {
                                $key = key($this->_);
                                $this->_let($key,$this->_db->f($key));
+                       }
                        while(next($this->_));

                        $this->_loaded = TRUE;

====================================================
Index: cdb/inc/class.cdb_entity_meta.inc.php
diff -u cdb/inc/class.cdb_entity_meta.inc.php:1.4 
cdb/inc/class.cdb_entity_meta.inc.php:1.5
--- cdb/inc/class.cdb_entity_meta.inc.php:1.4   Mon Apr 18 08:21:56 2005
+++ cdb/inc/class.cdb_entity_meta.inc.php       Mon Apr 18 11:21:27 2005
@@ -93,6 +93,7 @@
                                $sqlp = "UPDATE phpgw_cdb_entity_meta SET ";
                                reset($this->_dirty);
                                do
+                               {
                                        $key = key($this->_dirty);
                                        switch($key)
                                        {
@@ -100,6 +101,7 @@
                                                        $sql.=$key.'="';
                                        }
                                        $sql .= $this->_get($key) . '", ';
+                               }
                                while (next($this->_dirty));
                                if ($sql || $this->_modified)
                                {
@@ -145,6 +147,7 @@

                        reset($this->_);
                        do
+                       {
                                $key = key($this->_);
                                switch($key)
                                {
@@ -154,6 +157,7 @@
                                        default:
                                                
$this->_let($key,$this->_db->f($key));
                                }
+                       }
                        while(next($this->_));
                        $this->_loaded = TRUE;
                }
@@ -253,7 +257,7 @@
                        /* keywords should either be an array or a comma 
separated list */
                        if(is_array($keywords))
                        {
-                               return $this->_let('keywords', 
implode(',',$keywords);
+                               return $this->_let('keywords', 
implode(',',$keywords));
                        }
                        else if (is_string($keywords))
                        {

====================================================
Index: cdb/inc/class.cdb_contact_client.inc.php
diff -u cdb/inc/class.cdb_contact_client.inc.php:1.3 
cdb/inc/class.cdb_contact_client.inc.php:1.4
--- cdb/inc/class.cdb_contact_client.inc.php:1.3        Mon Apr 18 08:21:56 2005
+++ cdb/inc/class.cdb_contact_client.inc.php    Mon Apr 18 11:21:27 2005
@@ -141,8 +141,10 @@

                        reset($this->_);
                        do
-                       $key = key($this->_);
-                       $this->_let($key,$this->_db->f($key));
+                       {
+                               $key = key($this->_);
+                               $this->_let($key,$this->_db->f($key));
+                       }
                        while(next($this->_));

                        $this->_id = $contact_id;

====================================================
Index: cdb/inc/class.cdb_contact.inc.php
diff -u cdb/inc/class.cdb_contact.inc.php:1.8 
cdb/inc/class.cdb_contact.inc.php:1.9
--- cdb/inc/class.cdb_contact.inc.php:1.8       Mon Apr 18 08:21:56 2005
+++ cdb/inc/class.cdb_contact.inc.php   Mon Apr 18 11:21:27 2005
@@ -228,6 +228,7 @@

                                        reset($this->_dirty);
                                        do
+                                       {
                                                $key = key($this->_dirty);
                                                switch($key)
                                                {
@@ -244,6 +245,7 @@
                                                                $sql.=$key.'="';
                                                }
                                                $sql .= $this->_get($key) . '", 
';
+                                       }
                                        while (next($this->_dirty));
                                        if ($sql)
                                        {
@@ -296,6 +298,7 @@

                        reset($this->_);
                        do
+                       {
                                $key = key($this->_);
                                switch($key)
                                {
@@ -303,12 +306,13 @@
                                                // the note is in a diff table
                                                // just ignore it for now and 
we'll load it in a min
                                                break;
-                                       case 'contact_id'
+                                       case 'contact_id':
                                                
$this->_let('contact_id',$contact_id);
                                                break;
                                        default:
                                                
$this->_let($key,$this->_db->f($key));
                                }
+                       }
                        while(next($this->_));

                        // Now take care of the note
@@ -355,29 +359,29 @@
                function get_personal_data()
                {
                        /* TODO */
-                       return contact.personal.class;
+                       // return contact.personal.class; // Syntax error
                }
                function get_internet_data()
                {
                        /* TODO */
-                       return contact.internet.class;
+                       // return contact.internet.class; // Syntax error
                }
                function get_phone_data()
                {
                        /* TODO */
-                       return contact.phone.class;
+                       // return contact.phone.class; // Syntax error
                }
                function get_address_data()
                {
                        /* TODO */
-                       return contact.address.class;
+                       // return contact.address.class; // Syntax error
                }
                function get_main_organization()
                {
                        /* TODO */
-                       return organization.class;
+                       // return organization.class; // Syntax error
                }
-               function let_main_organization(organization.class)
+               function let_main_organization(/* organization.class */) // 
Syntax error
                {
                        /* TODO */
                        return;
@@ -549,7 +553,6 @@
                                $mySuccess = 
$this->_let('mailing_address_selector',$inID);
                        }
                        return $mySuccess;
-                       }
                }
                function get_web()
                {
@@ -614,7 +617,7 @@
                function let_phonex_selector($inID, $inNewVal)
                {
                        $mySuccess = False;
-                       if(is_int($inID) &)
+                       if(is_int($inID) /*&*/) // Syntax error
                        {
                                $phonex_selector_varname = 
'phone'.$inID.'_selector';
                                $mySuccess = 
$this->_let($phonex_selector_varname,$inNewVal);

====================================================
Index: cdb/inc/class.cdb_phone.inc.php
diff -u cdb/inc/class.cdb_phone.inc.php:1.7 cdb/inc/class.cdb_phone.inc.php:1.8
--- cdb/inc/class.cdb_phone.inc.php:1.7 Mon Apr 18 08:21:56 2005
+++ cdb/inc/class.cdb_phone.inc.php     Mon Apr 18 11:21:27 2005
@@ -64,8 +64,10 @@

                        reset($this->_);
                        do
+                       {
                                $key = key($this->_);
                                $this->_let($key,$this->_db->f($key));
+                       }
             while(next($this->_));

                        $this->_id = (int)$this->_db->f('entity_id');

====================================================
Index: cdb/inc/class.cdb_organization_client.inc.php
diff -u cdb/inc/class.cdb_organization_client.inc.php:1.3 
cdb/inc/class.cdb_organization_client.inc.php:1.4
--- cdb/inc/class.cdb_organization_client.inc.php:1.3   Mon Apr 18 08:21:56 2005
+++ cdb/inc/class.cdb_organization_client.inc.php       Mon Apr 18 11:21:27 2005
@@ -124,8 +124,10 @@

                        reset($this->_);
                        do
+                       {
                                $key = key($this->_);
                                $this->_let($key,$this->_db->f($key));
+                       }
                        while(next($this->_));

                        $this->_dirty = array();
@@ -144,7 +146,7 @@
                                'VALUES ("", "", "", "")';
                        $this->_db->query($sql,__LINE__,__FILE__);
                        return 
$this->_db->get_last_insert_id('phpgw_cdb_org_client',
-                               'organization_id'));
+                               'organization_id');

                }







reply via email to

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