mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
GLOBALS - an exercise in practice what you preach
This commit is contained in:
parent
dfcb5595f4
commit
eb0592bb14
@ -57,7 +57,6 @@
|
||||
|
||||
function import_end_record($buffer)
|
||||
{
|
||||
global $phpgw_info;
|
||||
$buffer[$this->id]='';
|
||||
while ( list($name, $value) = each($this->currentrecord))
|
||||
{
|
||||
@ -70,8 +69,6 @@
|
||||
|
||||
function import_end_file($buffer,$access='private',$cat_id=0)
|
||||
{
|
||||
global $phpgw,$phpgw_info;
|
||||
|
||||
for ($i=1;$i<=count($buffer);$i++)
|
||||
{
|
||||
/*
|
||||
@ -81,7 +78,7 @@
|
||||
*/
|
||||
$entry = $this->vcard->in($buffer[$i]);
|
||||
/* Now actually add the new entry */
|
||||
$this->contacts->add($phpgw_info['user']['account_id'],$entry,$access,$cat_id);
|
||||
$this->contacts->add($GLOBALS['phpgw_info']['user']['account_id'],$entry,$access,$cat_id);
|
||||
}
|
||||
$num = $i - 1;
|
||||
return lang('Successfully imported x records into your addressbook.',$num);
|
||||
|
@ -76,7 +76,6 @@
|
||||
|
||||
function import_end_record($buffer)
|
||||
{
|
||||
global $phpgw_info;
|
||||
$buffer[$this->id]='';
|
||||
while ( list($name, $value) = each($this->currentrecord))
|
||||
{
|
||||
@ -88,8 +87,6 @@
|
||||
|
||||
function import_end_file($buffer,$access='private',$cat_id=0)
|
||||
{
|
||||
global $phpgw,$phpgw_info;
|
||||
|
||||
$contacts = CreateObject('phpgwapi.contacts');
|
||||
/* echo '<br>'; */
|
||||
for ($i=1;$i<=count($buffer);$i++)
|
||||
@ -104,7 +101,7 @@
|
||||
$entry[$i]['adr_one_type'] = 'intl';
|
||||
$entry[$i]['adr_two_type'] = 'intl';
|
||||
/* echo '<br>'; */
|
||||
$contacts->add($phpgw_info['user']['account_id'],$entry[$i],$access,$cat_id);
|
||||
$contacts->add($GLOBALS['phpgw_info']['user']['account_id'],$entry[$i],$access,$cat_id);
|
||||
}
|
||||
$num = $i - 1;
|
||||
return lang('Successfully imported x records into your addressbook.',$num);
|
||||
|
@ -145,7 +145,6 @@
|
||||
|
||||
function import_end_record($buffer)
|
||||
{
|
||||
global $phpgw_info;
|
||||
$buffer[$this->id]='';
|
||||
while ( list($name, $value) = each($this->currentrecord))
|
||||
{
|
||||
@ -157,8 +156,6 @@
|
||||
|
||||
function import_end_file($buffer,$access='private',$cat_id=0)
|
||||
{
|
||||
global $phpgw,$phpgw_info;
|
||||
|
||||
$contacts = CreateObject('phpgwapi.contacts');
|
||||
//echo '<br>';
|
||||
for ($i=1;$i<=count($buffer);$i++)
|
||||
@ -173,7 +170,7 @@
|
||||
$entry[$i]['adr_one_type'] = 'intl';
|
||||
$entry[$i]['adr_two_type'] = 'intl';
|
||||
//echo '<br>';
|
||||
$contacts->add($phpgw_info['user']['account_id'],$entry[$i],$access,$cat_id);
|
||||
$contacts->add($GLOBALS['phpgw_info']['user']['account_id'],$entry[$i],$access,$cat_id);
|
||||
}
|
||||
$num = $i - 1;
|
||||
return lang('Successfully imported x records into your addressbook.',$num);
|
||||
|
@ -141,7 +141,6 @@
|
||||
|
||||
function import_end_record($buffer)
|
||||
{
|
||||
global $phpgw_info;
|
||||
$buffer[$this->id]='';
|
||||
while ( list($name, $value) = each($this->currentrecord))
|
||||
{
|
||||
@ -153,8 +152,6 @@
|
||||
|
||||
function import_end_file($buffer,$access='private',$cat_id=0)
|
||||
{
|
||||
global $phpgw,$phpgw_info;
|
||||
|
||||
$contacts = CreateObject('phpgwapi.contacts');
|
||||
//echo '<br>';
|
||||
for ($i=1;$i<=count($buffer);$i++)
|
||||
@ -169,7 +166,7 @@
|
||||
$entry[$i]['adr_one_type'] = 'intl';
|
||||
$entry[$i]['adr_two_type'] = 'intl';
|
||||
//echo '<br>';
|
||||
$contacts->add($phpgw_info['user']['account_id'],$entry[$i],$access,$cat_id);
|
||||
$contacts->add($GLOBALS['phpgw_info']['user']['account_id'],$entry[$i],$access,$cat_id);
|
||||
}
|
||||
$num = $i - 1;
|
||||
return lang('Successfully imported x records into your addressbook.',$num);
|
||||
|
Loading…
Reference in New Issue
Block a user