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_contacts.inc.php,1.1


From: Miles Lott <address@hidden>
Subject: [Phpgroupware-cvs] CVS: phpgwapi/inc class.accounts_contacts.inc.php,1.10,1.11
Date: Mon, 28 Jan 2002 19:40:19 -0500

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

Modified Files:
        class.accounts_contacts.inc.php 
Log Message:
GLOBALS and auto_add fix

Index: class.accounts_contacts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.accounts_contacts.inc.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** class.accounts_contacts.inc.php     27 Jun 2001 00:44:20 -0000      1.10
--- class.accounts_contacts.inc.php     29 Jan 2002 00:40:16 -0000      1.11
***************
*** 24,66 ****
    /* $Id$ */
  
- 
        /*
        THIS NEEDS WORK!!!!!!!!! - Milosch
-       But it is a lot closer now...
        */
!       $phpgw_info['server']['global_denied_users'] = array(
!               'root'     => True, 'bin'      => True, 'daemon'   => True,
!               'adm'      => True, 'lp'       => True, 'sync'     => True,
!               'shutdown' => True, 'halt'     => True, 'ldap'     => True,
!               'mail'     => True, 'news'     => True, 'uucp'     => True,
!               'operator' => True, 'games'    => True, 'gopher'   => True,
!               'nobody'   => True, 'xfs'      => True, 'pgsql'    => True,
!               'mysql'    => True, 'postgres' => True, 'oracle'   => True,
!               'ftp'      => True, 'gdm'      => True, 'named'    => True,
!               'alias'    => True, 'web'      => True, 'sweep'    => True,
!               'cvs'      => True, 'qmaild'   => True, 'qmaill'   => True,
!               'qmaillog' => True, 'qmailp'   => True, 'qmailq'   => True,
!               'qmailr'   => True, 'qmails'   => True, 'rpc'      => True,
!               'rpcuser'  => True, 'amanda'   => True, 'apache'   => True,
!               'pvm'      => True, 'squid'    => True, 'ident'    => True,
!               'nscd'     => True, 'mailnull' => True, 'cyrus'    => True,
                'backup'   => True
        );
  
!       $phpgw_info['server']['global_denied_groups'] = array(
!               'root'      => True, 'bin'       => True, 'daemon'    => True,
!               'sys'       => True, 'adm'       => True, 'tty'       => True,
!               'disk'      => True, 'lp'        => True, 'mem'       => True,
!               'kmem'      => True, 'wheel'     => True, 'mail'      => True,
!               'uucp'      => True, 'man'       => True, 'games'     => True,
!               'dip'       => True, 'ftp'       => True, 'nobody'    => True,
!               'floppy'    => True, 'xfs'       => True, 'console'   => True,
!               'utmp'      => True, 'pppusers'  => True, 'popusers'  => True,
!               'slipusers' => True, 'slocate'   => True, 'mysql'     => True,
!               'dnstools'  => True, 'web'       => True, 'named'     => True,
!               'dba'       => True, 'oinstall'  => True, 'oracle'    => True,
!               'gdm'       => True, 'sweep'     => True, 'cvs'       => True,
!               'postgres'  => True, 'qmail'     => True, 'nofiles'   => True,
!               'ldap'      => True, 'backup'    => True
        );
  
--- 24,64 ----
    /* $Id$ */
  
        /*
        THIS NEEDS WORK!!!!!!!!! - Milosch
        */
!       $GLOBALS['phpgw_info']['server']['global_denied_users'] = array(
!               'root'     => True, 'bin'      => True, 'daemon' => True,
!               'adm'      => True, 'lp'       => True, 'sync'   => True,
!               'shutdown' => True, 'halt'     => True, 'ldap'   => True,
!               'mail'     => True, 'news'     => True, 'uucp'   => True,
!               'operator' => True, 'games'    => True, 'gopher' => True,
!               'nobody'   => True, 'xfs'      => True, 'pgsql'  => True,
!               'mysql'    => True, 'postgres' => True, 'oracle' => True,
!               'ftp'      => True, 'gdm'      => True, 'named'  => True,
!               'alias'    => True, 'web'      => True, 'sweep'  => True,
!               'cvs'      => True, 'qmaild'   => True, 'qmaill' => True,
!               'qmaillog' => True, 'qmailp'   => True, 'qmailq' => True,
!               'qmailr'   => True, 'qmails'   => True, 'rpc'    => True,
!               'rpcuser'  => True, 'amanda'   => True, 'apache' => True,
!               'pvm'      => True, 'squid'    => True, 'ident'  => True,
!               'nscd'     => True, 'mailnull' => True, 'cyrus'  => True,
                'backup'   => True
        );
  
!       $GLOBALS['phpgw_info']['server']['global_denied_groups'] = array(
!               'root'      => True, 'bin'      => True, 'daemon'   => True,
!               'sys'       => True, 'adm'      => True, 'tty'      => True,
!               'disk'      => True, 'lp'       => True, 'mem'      => True,
!               'kmem'      => True, 'wheel'    => True, 'mail'     => True,
!               'uucp'      => True, 'man'      => True, 'games'    => True,
!               'dip'       => True, 'ftp'      => True, 'nobody'   => True,
!               'floppy'    => True, 'xfs'      => True, 'console'  => True,
!               'utmp'      => True, 'pppusers' => True, 'popusers' => True,
!               'slipusers' => True, 'slocate'  => True, 'mysql'    => True,
!               'dnstools'  => True, 'web'      => True, 'named'    => True,
!               'dba'       => True, 'oinstall' => True, 'oracle'   => True,
!               'gdm'       => True, 'sweep'    => True, 'cvs'      => True,
!               'postgres'  => True, 'qmail'    => True, 'nofiles'  => True,
!               'ldap'      => True, 'backup'   => True
        );
  
***************
*** 85,90 ****
                function accounts_()
                {
!                       global $phpgw;
!                       $this->db       = $phpgw->db;
                        $this->contacts = CreateObject('phpgwapi.contacts',0);
                }
--- 83,87 ----
                function accounts_()
                {
!                       $this->db       = $GLOBALS['phpgw']->db;
                        $this->contacts = CreateObject('phpgwapi.contacts',0);
                }
***************
*** 106,115 ****
                        /* Now dump it into the array */
                        $this->data['userid']            = $allValues[0]['lid'];
!                       $this->data['account_id']            = 
$allValues[0]['id'];
!                       $this->data['account_lid']           = 
$allValues[0]['lid'];
                        $this->data['account_type']      = $allValues[0]['tid'];
!                       $this->data['firstname']             = 
$allValues[0]['n_given'];
!                       $this->data['lastname']              = 
$allValues[0]['n_family'];
!                       $this->data['fullname']              = 
$allValues[0]['fn'];
                        $this->data['lastlogin']         = 
$allValues[0]['account_lastlogin'];
                        $this->data['lastloginfrom']     = 
$allValues[0]['account_lastloginfrom'];
--- 103,112 ----
                        /* Now dump it into the array */
                        $this->data['userid']            = $allValues[0]['lid'];
!                       $this->data['account_id']        = $allValues[0]['id'];
!                       $this->data['account_lid']       = $allValues[0]['lid'];
                        $this->data['account_type']      = $allValues[0]['tid'];
!                       $this->data['firstname']         = 
$allValues[0]['n_given'];
!                       $this->data['lastname']          = 
$allValues[0]['n_family'];
!                       $this->data['fullname']          = $allValues[0]['fn'];
                        $this->data['lastlogin']         = 
$allValues[0]['account_lastlogin'];
                        $this->data['lastloginfrom']     = 
$allValues[0]['account_lastloginfrom'];
***************
*** 148,152 ****
                function delete($accountid = '')
                {
-                       global $phpgw, $phpgw_info;
                        $this->makeobj();
  
--- 145,148 ----
***************
*** 158,162 ****
                function get_list($_type='both')
                {
-                       global $phpgw;
                        $this->makeobj();
  
--- 154,157 ----
***************
*** 210,214 ****
                function id2name($account_id)
                {
-                       global $phpgw, $phpgw_info;
                        $this->makeobj();
  
--- 205,208 ----
***************
*** 228,232 ****
                function get_type($accountid = '')
                {
-                       global $phpgw, $phpgw_info;
                        $this->makeobj();
                        $account_id = get_account_id($accountid);
--- 222,225 ----
***************
*** 268,272 ****
                function create($account_info)
                {
-                       global $phpgw_info, $phpgw;
                        $this->makeobj();
  
--- 261,264 ----
***************
*** 275,279 ****
                                $account_info['account_id'] = 
$this->get_nextid();
                        }
!                       $owner = $phpgw_info['user']['account_id'];
                        $entry['id']       = $account_info['account_id'];
                        $entry['lid']      = $account_info['account_lid'];
--- 267,271 ----
                                $account_info['account_id'] = 
$this->get_nextid();
                        }
!                       $owner = $GLOBALS['phpgw_info']['user']['account_id'];
                        $entry['id']       = $account_info['account_id'];
                        $entry['lid']      = $account_info['account_lid'];
***************
*** 292,301 ****
                function auto_add($accountname, $passwd, $default_prefs = 
False, $default_acls = False, $expiredate = 0, $account_status = 'A')
                {
!                       global $phpgw, $phpgw_info;
! 
!                       if (! $expiredate)
                        {
!                               // expire in 30 days by default
!                               $expiredate = time() + ( ( 60 * 60 ) * (30 * 
24) );
                        }
  
--- 284,311 ----
                function auto_add($accountname, $passwd, $default_prefs = 
False, $default_acls = False, $expiredate = 0, $account_status = 'A')
                {
!                       if ($expiredate)
!                       {
!                               $expires = mktime(2,0,0,date('n',$expiredate), 
intval(date('d',$expiredate)), date('Y',$expiredate));
!                       }
!                       else
                        {
!                               
if($GLOBALS['phpgw_info']['server']['auto_create_expire'])
!                               {
!                                       
if($GLOBALS['phpgw_info']['server']['auto_create_expire'] == 'never')
!                                       {
!                                               $expires = -1;
!                                       }
!                                       else
!                                       {
!                                               $expiredate = time() + 
$GLOBALS['phpgw_info']['server']['auto_create_expire'];
!                                               $expires   = 
mktime(2,0,0,date('n',$expiredate), intval(date('d',$expiredate)), 
date('Y',$expiredate));
!                                       }
!                               }
!                               else
!                               {
!                                       /* expire in 30 days by default */
!                                       $expiredate = time() + ( ( 60 * 60 ) * 
(30 * 24) );
!                                       $expires   = 
mktime(2,0,0,date('n',$expiredate), intval(date('d',$expiredate)), 
date('Y',$expiredate));
!                               }
                        }
  
***************
*** 307,311 ****
                                'account_lastname'  => '',
                                'account_status'    => $account_status,
!                               'account_expires'   => 
mktime(2,0,0,date('n',$expiredate), intval(date('d',$expiredate)), 
date('Y',$expiredate))
                        );
                        $this->create($acct_info);
--- 317,321 ----
                                'account_lastname'  => '',
                                'account_status'    => $account_status,
!                               'account_expires'   => $expires
                        );
                        $this->create($acct_info);




reply via email to

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