mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 15:18:58 +01:00
Remove ANCIENT use of global
This commit is contained in:
parent
20b851da6f
commit
ce5a6009fd
@ -28,7 +28,7 @@
|
|||||||
THIS NEEDS WORK!!!!!!!!! - Milosch
|
THIS NEEDS WORK!!!!!!!!! - Milosch
|
||||||
But it is a lot closer now...
|
But it is a lot closer now...
|
||||||
*/
|
*/
|
||||||
$phpgw_info['server']['global_denied_users'] = array(
|
$GLOBALS['phpgw_info']['server']['global_denied_users'] = array(
|
||||||
'root' => True, 'bin' => True, 'daemon' => True,
|
'root' => True, 'bin' => True, 'daemon' => True,
|
||||||
'adm' => True, 'lp' => True, 'sync' => True,
|
'adm' => True, 'lp' => True, 'sync' => True,
|
||||||
'shutdown' => True, 'halt' => True, 'ldap' => True,
|
'shutdown' => True, 'halt' => True, 'ldap' => True,
|
||||||
@ -47,7 +47,7 @@
|
|||||||
'backup' => True
|
'backup' => True
|
||||||
);
|
);
|
||||||
|
|
||||||
$phpgw_info['server']['global_denied_groups'] = array(
|
$GLOBALS['phpgw_info']['server']['global_denied_groups'] = array(
|
||||||
'root' => True, 'bin' => True, 'daemon' => True,
|
'root' => True, 'bin' => True, 'daemon' => True,
|
||||||
'sys' => True, 'adm' => True, 'tty' => True,
|
'sys' => True, 'adm' => True, 'tty' => True,
|
||||||
'disk' => True, 'lp' => True, 'mem' => True,
|
'disk' => True, 'lp' => True, 'mem' => True,
|
||||||
@ -84,8 +84,7 @@
|
|||||||
|
|
||||||
function accounts_()
|
function accounts_()
|
||||||
{
|
{
|
||||||
global $phpgw;
|
$this->db = $GLOBALS['phpgw']->db;
|
||||||
$this->db = $phpgw->db;
|
|
||||||
$this->contacts = CreateObject('phpgwapi.contacts',0);
|
$this->contacts = CreateObject('phpgwapi.contacts',0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -147,7 +146,6 @@
|
|||||||
|
|
||||||
function delete($accountid = '')
|
function delete($accountid = '')
|
||||||
{
|
{
|
||||||
global $phpgw, $phpgw_info;
|
|
||||||
$this->makeobj();
|
$this->makeobj();
|
||||||
|
|
||||||
if($this->debug) { echo '<br>Deleting entry:<br>' . $account_id; }
|
if($this->debug) { echo '<br>Deleting entry:<br>' . $account_id; }
|
||||||
@ -157,7 +155,6 @@
|
|||||||
|
|
||||||
function get_list($_type='both')
|
function get_list($_type='both')
|
||||||
{
|
{
|
||||||
global $phpgw;
|
|
||||||
$this->makeobj();
|
$this->makeobj();
|
||||||
|
|
||||||
switch($_type)
|
switch($_type)
|
||||||
@ -199,7 +196,7 @@
|
|||||||
|
|
||||||
if($allValues[0]['id'])
|
if($allValues[0]['id'])
|
||||||
{
|
{
|
||||||
return intval($allValues[0]['id']);
|
return (int)$allValues[0]['id'];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -209,7 +206,6 @@
|
|||||||
|
|
||||||
function id2name($account_id)
|
function id2name($account_id)
|
||||||
{
|
{
|
||||||
global $phpgw, $phpgw_info;
|
|
||||||
$this->makeobj();
|
$this->makeobj();
|
||||||
|
|
||||||
$allValues = $this->contacts->read_single_entry($account_id);
|
$allValues = $this->contacts->read_single_entry($account_id);
|
||||||
@ -227,7 +223,6 @@
|
|||||||
|
|
||||||
function get_type($accountid = '')
|
function get_type($accountid = '')
|
||||||
{
|
{
|
||||||
global $phpgw, $phpgw_info;
|
|
||||||
$this->makeobj();
|
$this->makeobj();
|
||||||
$account_id = get_account_id($accountid);
|
$account_id = get_account_id($accountid);
|
||||||
|
|
||||||
@ -246,7 +241,7 @@
|
|||||||
function exists($account_lid)
|
function exists($account_lid)
|
||||||
{
|
{
|
||||||
$this->makeobj();
|
$this->makeobj();
|
||||||
if(gettype($account_lid) == 'integer')
|
if(is_int($account_lid))
|
||||||
{
|
{
|
||||||
$account_id = $account_lid;
|
$account_id = $account_lid;
|
||||||
settype($account_lid,'string');
|
settype($account_lid,'string');
|
||||||
@ -267,14 +262,13 @@
|
|||||||
|
|
||||||
function create($account_info)
|
function create($account_info)
|
||||||
{
|
{
|
||||||
global $phpgw_info, $phpgw;
|
|
||||||
$this->makeobj();
|
$this->makeobj();
|
||||||
|
|
||||||
if (!$$account_info['account_id'])
|
if (!$$account_info['account_id'])
|
||||||
{
|
{
|
||||||
$account_info['account_id'] = $this->get_nextid();
|
$account_info['account_id'] = $this->get_nextid();
|
||||||
}
|
}
|
||||||
$owner = $phpgw_info['user']['account_id'];
|
$owner = $GLOBALS['phpgw_info']['user']['account_id'];
|
||||||
$entry['id'] = $account_info['account_id'];
|
$entry['id'] = $account_info['account_id'];
|
||||||
$entry['lid'] = $account_info['account_lid'];
|
$entry['lid'] = $account_info['account_lid'];
|
||||||
$entry['n_given'] = $account_info['account_firstname'];
|
$entry['n_given'] = $account_info['account_firstname'];
|
||||||
@ -291,8 +285,6 @@
|
|||||||
|
|
||||||
function auto_add($accountname, $passwd, $default_prefs = False, $default_acls = False, $expiredate = 0, $account_status = 'A')
|
function auto_add($accountname, $passwd, $default_prefs = False, $default_acls = False, $expiredate = 0, $account_status = 'A')
|
||||||
{
|
{
|
||||||
global $phpgw, $phpgw_info;
|
|
||||||
|
|
||||||
if (! $expiredate)
|
if (! $expiredate)
|
||||||
{
|
{
|
||||||
// expire in 30 days by default
|
// expire in 30 days by default
|
||||||
@ -306,7 +298,7 @@
|
|||||||
'account_firstname' => '',
|
'account_firstname' => '',
|
||||||
'account_lastname' => '',
|
'account_lastname' => '',
|
||||||
'account_status' => $account_status,
|
'account_status' => $account_status,
|
||||||
'account_expires' => mktime(2,0,0,date('n',$expiredate), intval(date('d',$expiredate)), date('Y',$expiredate))
|
'account_expires' => mktime(2,0,0,date('n',$expiredate), (int)date('d',$expiredate), date('Y',$expiredate))
|
||||||
);
|
);
|
||||||
$this->create($acct_info);
|
$this->create($acct_info);
|
||||||
$accountid = $this->name2id($accountname);
|
$accountid = $this->name2id($accountname);
|
||||||
|
Loading…
Reference in New Issue
Block a user