phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: phpgwapi/inc class.accounts_sql.inc.php,1.80.2.


From: Bettina Gille <address@hidden>
Subject: [Phpgroupware-cvs] CVS: phpgwapi/inc class.accounts_sql.inc.php,1.80.2.8.2.5,1.80.2.8.2.6
Date: Tue, 24 Jun 2003 07:46:06 -0400

Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv21152

Modified Files:
      Tag: Version-0_9_16-branch
        class.accounts_sql.inc.php 
Log Message:
update

Index: class.accounts_sql.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.accounts_sql.inc.php,v
retrieving revision 1.80.2.8.2.5
retrieving revision 1.80.2.8.2.6
diff -C2 -r1.80.2.8.2.5 -r1.80.2.8.2.6
*** class.accounts_sql.inc.php  21 May 2003 22:27:04 -0000      1.80.2.8.2.5
--- class.accounts_sql.inc.php  24 Jun 2003 11:46:04 -0000      1.80.2.8.2.6
***************
*** 82,86 ****
                function read_repository()
                {
!                       $this->db->query("SELECT * FROM phpgw_accounts WHERE 
account_id='" . $this->account_id . "'",__LINE__,__FILE__);
                        $this->db->next_record();
  
--- 82,86 ----
                function read_repository()
                {
!                       $this->db->query('SELECT * FROM phpgw_accounts WHERE 
account_id=' . intval($this->account_id),__LINE__,__FILE__);
                        $this->db->next_record();
  
***************
*** 110,114 ****
                                . $this->data['status'] . "', account_expires=" 
. $this->data['expires']
                                . ($this->data['account_lid']?", 
account_lid='".$this->data['account_lid']."'":'')
!                               . " WHERE account_id='" . $this->account_id . 
"'",__LINE__,__FILE__);
                }
  
--- 110,114 ----
                                . $this->data['status'] . "', account_expires=" 
. $this->data['expires']
                                . ($this->data['account_lid']?", 
account_lid='".$this->data['account_lid']."'":'')
!                               . ' WHERE account_id=' . 
intval($this->account_id),__LINE__,__FILE__);
                }
  
***************
*** 120,124 ****
                        $tables_array = Array('phpgw_accounts');
                        $this->db->lock($tables_array);
!                       $this->db->query('DELETE FROM phpgw_accounts WHERE 
account_id='.$account_id);
                        $this->db->unlock();
                }
--- 120,124 ----
                        $tables_array = Array('phpgw_accounts');
                        $this->db->lock($tables_array);
!                       $this->db->query('DELETE FROM phpgw_accounts WHERE 
account_id=' . $account_id);
                        $this->db->unlock();
                }
***************
*** 252,256 ****
                        }
  
!                       $this->db->query("SELECT account_lid FROM 
phpgw_accounts WHERE account_id=".$account_id,__LINE__,__FILE__);
                        if($this->db->num_rows())
                        {
--- 252,256 ----
                        }
  
!                       $this->db->query('SELECT account_lid FROM 
phpgw_accounts WHERE account_id=' . $account_id,__LINE__,__FILE__);
                        if($this->db->num_rows())
                        {
***************
*** 284,288 ****
                        }
                        $this->db->Halt_On_Error = 'no';
!                       $this->db->query("SELECT account_type FROM 
phpgw_accounts WHERE account_id=".$account_id,__LINE__,__FILE__);
                        if ($this->db->num_rows())
                        {
--- 284,288 ----
                        }
                        $this->db->Halt_On_Error = 'no';
!                       $this->db->query('SELECT account_type FROM 
phpgw_accounts WHERE account_id=' . $account_id,__LINE__,__FILE__);
                        if ($this->db->num_rows())
                        {
***************
*** 302,306 ****
                        static $by_id, $by_lid;
  
!                       $sql = "SELECT count(account_id) FROM phpgw_accounts 
WHERE ";
                        if(is_integer($account_lid))
                        {
--- 302,306 ----
                        static $by_id, $by_lid;
  
!                       $sql = 'SELECT count(account_id) FROM phpgw_accounts 
WHERE ';
                        if(is_integer($account_lid))
                        {
***************
*** 309,313 ****
                                        return $by_id[$account_lid];
                                }
!                               $sql .= "account_id = ".$account_lid;
                        }
                        else
--- 309,313 ----
                                        return $by_id[$account_lid];
                                }
!                               $sql .= 'account_id=' . $account_lid;
                        }
                        else
***************
*** 338,347 ****
                function create($account_info,$default_prefs=True)
                {
!                       $this->db->query("insert into phpgw_accounts 
(account_lid, account_type, account_pwd, "
                                . "account_firstname, account_lastname, 
account_status, account_expires) values ('"
                                . $account_info['account_lid'] . "','" . 
$account_info['account_type'] . "','"
                                . md5($account_info['account_passwd']) . "', '" 
. $account_info['account_firstname']
                                . "','" . $account_info['account_lastname'] . 
"','" . $account_info['account_status']
!                               . "'," . $account_info['account_expires'] . 
")",__LINE__,__FILE__);
  
                        $accountid = 
$this->db->get_last_insert_id('phpgw_accounts','account_id');
--- 338,347 ----
                function create($account_info,$default_prefs=True)
                {
!                       $this->db->query('insert into phpgw_accounts 
(account_lid, account_type, account_pwd, '
                                . "account_firstname, account_lastname, 
account_status, account_expires) values ('"
                                . $account_info['account_lid'] . "','" . 
$account_info['account_type'] . "','"
                                . md5($account_info['account_passwd']) . "', '" 
. $account_info['account_firstname']
                                . "','" . $account_info['account_lastname'] . 
"','" . $account_info['account_status']
!                               . "'," . $account_info['account_expires'] . 
')',__LINE__,__FILE__);
  
                        $accountid = 
$this->db->get_last_insert_id('phpgw_accounts','account_id');
***************
*** 403,408 ****
                                {
                                        $this->db->query("insert into phpgw_acl 
(acl_appname, acl_location, acl_account, acl_rights) values('phpgw_group', "
!                                               . $defaultgroupid . ", " . 
$accountid . ", 1)",__LINE__,__FILE__);
!                                       $this->db->query("insert into phpgw_acl 
(acl_appname, acl_location, acl_account, acl_rights) values('preferences', 
'changepassword', ".$accountid.", 1)",__LINE__,__FILE__);
                                }
                                else
--- 403,408 ----
                                {
                                        $this->db->query("insert into phpgw_acl 
(acl_appname, acl_location, acl_account, acl_rights) values('phpgw_group', "
!                                               . $defaultgroupid . ', ' . 
$accountid . ', 1)',__LINE__,__FILE__);
!                                       $this->db->query("insert into phpgw_acl 
(acl_appname, acl_location, acl_account, acl_rights) values('preferences', 
'changepassword', " . $accountid . ', 1)',__LINE__,__FILE__);
                                }
                                else
***************
*** 410,414 ****
                                        // If they don't have a default group, 
they need some sort of permissions.
                                        // This generally doesn't / shouldn't 
happen, but will (jengo)
!                                       $this->db->query("insert into phpgw_acl 
(acl_appname, acl_location, acl_account, acl_rights) values('preferences', 
'changepassword', ".$accountid.", 1)",__LINE__,__FILE__);
  
                                        $apps = Array(
--- 410,414 ----
                                        // If they don't have a default group, 
they need some sort of permissions.
                                        // This generally doesn't / shouldn't 
happen, but will (jengo)
!                                       $this->db->query("insert into phpgw_acl 
(acl_appname, acl_location, acl_account, acl_rights) values('preferences', 
'changepassword', " . $accountid . ', 1)',__LINE__,__FILE__);
  
                                        $apps = Array(
***************
*** 425,429 ****
                                        while(list($key,$app) = each($apps))
                                        {
!                                               $this->db->query("INSERT INTO 
phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) VALUES 
('".$app."', 'run', ".$accountid.", 1)",__LINE__,__FILE__);
                                        }
                                }
--- 425,429 ----
                                        while(list($key,$app) = each($apps))
                                        {
!                                               $this->db->query("INSERT INTO 
phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) VALUES ('" . 
$app . "', 'run', " . $accountid . ', 1)',__LINE__,__FILE__);
                                        }
                                }
***************
*** 446,450 ****
                        }
                        $db = $GLOBALS['phpgw']->db;
!                       $db->query('select 
account_lid,account_firstname,account_lastname from phpgw_accounts where 
account_id='.$account_id,__LINE__,__FILE__);
                        $db->next_record();
                        $account_name[$account_id]['lid']   = 
$db->f('account_lid');
--- 446,450 ----
                        }
                        $db = $GLOBALS['phpgw']->db;
!                       $db->query('select 
account_lid,account_firstname,account_lastname from phpgw_accounts where 
account_id=' . $account_id,__LINE__,__FILE__);
                        $db->next_record();
                        $account_name[$account_id]['lid']   = 
$db->f('account_lid');





reply via email to

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