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.92,1.9


From: Bettina Gille <address@hidden>
Subject: [Phpgroupware-cvs] CVS: phpgwapi/inc class.accounts_sql.inc.php,1.92,1.93
Date: Tue, 24 Jun 2003 07:54:25 -0400

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

Modified Files:
        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.92
retrieving revision 1.93
diff -C2 -r1.92 -r1.93
*** class.accounts_sql.inc.php  21 May 2003 23:00:02 -0000      1.92
--- class.accounts_sql.inc.php  24 Jun 2003 11:54:22 -0000      1.93
***************
*** 50,54 ****
                function read_repository()
                {
!                       $this->db->query("SELECT * FROM phpgw_accounts WHERE 
account_id='" . $this->account_id . "'",__LINE__,__FILE__);
                        $this->db->next_record();
  
--- 50,54 ----
                function read_repository()
                {
!                       $this->db->query('SELECT * FROM phpgw_accounts WHERE 
account_id=' . intval($this->account_id),__LINE__,__FILE__);
                        $this->db->next_record();
  
***************
*** 79,83 ****
                                . $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__);
                }
  
--- 79,83 ----
                                . $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__);
                }
  
***************
*** 89,93 ****
                        $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();
                }
--- 89,93 ----
                        $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();
                }
***************
*** 183,187 ****
                        }
  
!                       $this->db->query("SELECT account_id FROM phpgw_accounts 
WHERE account_lid='".$account_lid."'",__LINE__,__FILE__);
                        if($this->db->num_rows())
                        {
--- 183,187 ----
                        }
  
!                       $this->db->query("SELECT account_id FROM phpgw_accounts 
WHERE account_lid='" . $account_lid . "'",__LINE__,__FILE__);
                        if($this->db->num_rows())
                        {
***************
*** 210,214 ****
                        }
  
!                       $this->db->query("SELECT account_lid FROM 
phpgw_accounts WHERE account_id=".$account_id,__LINE__,__FILE__);
                        if($this->db->num_rows())
                        {
--- 210,214 ----
                        }
  
!                       $this->db->query('SELECT account_lid FROM 
phpgw_accounts WHERE account_id=' . $account_id,__LINE__,__FILE__);
                        if($this->db->num_rows())
                        {
***************
*** 241,245 ****
                                return $account_type[$account_id];
                        }
!                       $this->db->query("SELECT account_type FROM 
phpgw_accounts WHERE account_id=".$account_id,__LINE__,__FILE__);
                        if($this->db->num_rows())
                        {
--- 241,245 ----
                                return $account_type[$account_id];
                        }
!                       $this->db->query('SELECT account_type FROM 
phpgw_accounts WHERE account_id=' . $account_id,__LINE__,__FILE__);
                        if($this->db->num_rows())
                        {
***************
*** 258,262 ****
                        static $by_id, $by_lid;
  
!                       $sql = "SELECT count(account_id) FROM phpgw_accounts 
WHERE ";
                        if(is_integer($account_lid))
                        {
--- 258,262 ----
                        static $by_id, $by_lid;
  
!                       $sql = 'SELECT count(account_id) FROM phpgw_accounts 
WHERE ';
                        if(is_integer($account_lid))
                        {
***************
*** 265,269 ****
                                        return $by_id[$account_lid];
                                }
!                               $sql .= "account_id = ".$account_lid;
                        }
                        else
--- 265,269 ----
                                        return $by_id[$account_lid];
                                }
!                               $sql .= 'account_id=' . $account_lid;
                        }
                        else
***************
*** 273,277 ****
                                        return $by_lid[$account_lid];
                                }
!                               $sql .= "account_lid = '".$account_lid."'";
                        }
  
--- 273,277 ----
                                        return $by_lid[$account_lid];
                                }
!                               $sql .= "account_lid ='" . $account_lid . "'";
                        }
  
***************
*** 294,303 ****
                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');
--- 294,303 ----
                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');
***************
*** 359,364 ****
                                {
                                        $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
--- 359,365 ----
                                {
                                        $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
***************
*** 366,370 ****
                                        // If they dont 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(
--- 367,372 ----
                                        // If they dont 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(
***************
*** 381,385 ****
                                        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__);
                                        }
                                }
--- 383,387 ----
                                        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__);
                                        }
                                }
***************
*** 402,406 ****
                        }
                        $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');
--- 404,408 ----
                        }
                        $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]