Switch remaining variables to egroupware convention

This commit is contained in:
Miles Lott 2005-07-03 14:15:23 +00:00
parent 8e4a4edb51
commit 4924cfc9e2
11 changed files with 31 additions and 31 deletions

View File

@ -132,9 +132,9 @@
// Tack on some extra values // Tack on some extra values
function export_end_record($buffer) function export_end_record($buffer)
{ {
if ($GLOBALS['phpgw_info']['server']['ldap_contact_context']) if ($GLOBALS['egw_info']['server']['ldap_contact_context'])
{ {
$context = $GLOBALS['phpgw_info']['server']['ldap_contact_context']; $context = $GLOBALS['egw_info']['server']['ldap_contact_context'];
} }
$time = gettimeofday(); $time = gettimeofday();
$cn = str_replace(',','',$buffer[$this->id]['cn']); $cn = str_replace(',','',$buffer[$this->id]['cn']);
@ -168,7 +168,7 @@
$entries .= 'objectClass: organizationalPerson' . "\n"; $entries .= 'objectClass: organizationalPerson' . "\n";
# not needed for openldap > 2.1 anymore # not needed for openldap > 2.1 anymore
#$entries .= 'objectClass: inetOrgPerson' . "\n"; #$entries .= 'objectClass: inetOrgPerson' . "\n";
$entries .= 'objectClass: phpgwContact' . "\n"; $entries .= 'objectClass: egwContact' . "\n";
$entries .= "\n"; $entries .= "\n";
} }
$buffer = $entries; $buffer = $entries;

View File

@ -1,6 +1,6 @@
<?php <?php
/**************************************************************************\ /**************************************************************************\
* eGroupWare - E-Mail * * eGroupWare - Addressbook *
* http://www.egroupware.org * * http://www.egroupware.org *
* -------------------------------------------- * * -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it * * This program is free software; you can redistribute it and/or modify it *
@ -11,16 +11,16 @@
/* $Id$ */ /* $Id$ */
$d1 = strtolower(substr(PHPGW_APP_INC,0,3)); $d1 = strtolower(substr(EGW_APP_INC,0,3));
if($d1 == 'htt' || $d1 == 'ftp' ) if($d1 == 'htt' || $d1 == 'ftp' )
{ {
echo "Failed attempt to break in via an old Security Hole!<br>\n"; echo "Failed attempt to break in via an old Security Hole!<br>\n";
$GLOBALS['phpgw']->common->phpgw_exit(); $GLOBALS['egw']->common->phpgw_exit();
} }
unset($d1); unset($d1);
if($GLOBALS['phpgw_info']['user']['apps']['addressbook'] if($GLOBALS['egw_info']['user']['apps']['addressbook']
&& $GLOBALS['phpgw_info']['user']['preferences']['addressbook']['mainscreen_showbirthdays']) && $GLOBALS['egw_info']['user']['preferences']['addressbook']['mainscreen_showbirthdays'])
{ {
echo "\n<!-- Birthday info -->\n"; echo "\n<!-- Birthday info -->\n";
@ -30,25 +30,25 @@
'n_family' => 'n_family', 'n_family' => 'n_family',
'bday' => 'bday' 'bday' => 'bday'
); );
$now = time() - ((60 * 60) * (int)$GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset']); $now = time() - ((60 * 60) * (int)$GLOBALS['egw_info']['user']['preferences']['common']['tz_offset']);
$today = $GLOBALS['phpgw']->common->show_date($now,'n/d/'); $today = $GLOBALS['egw']->common->show_date($now,'n/d/');
$bdays = $c->read(0,15,$qfields,$today,'tid=n','','',$GLOBALS['phpgw_info']['user']['account_id']); $bdays = $c->read(0,15,$qfields,$today,'tid=n','','',$GLOBALS['egw_info']['user']['account_id']);
$title = '<center><font color="#FFFFFF">'.lang('Birthdays').'</font></center>'; $title = '<center><font color="#FFFFFF">'.lang('Birthdays').'</font></center>';
$portalbox = CreateObject('phpgwapi.listbox', $portalbox = CreateObject('phpgwapi.listbox',
Array( Array(
'title' => $title, 'title' => $title,
'primary' => $GLOBALS['phpgw_info']['theme']['navbar_bg'], 'primary' => $GLOBALS['egw_info']['theme']['navbar_bg'],
'secondary' => $GLOBALS['phpgw_info']['theme']['navbar_bg'], 'secondary' => $GLOBALS['egw_info']['theme']['navbar_bg'],
'tertiary' => $GLOBALS['phpgw_info']['theme']['navbar_bg'], 'tertiary' => $GLOBALS['egw_info']['theme']['navbar_bg'],
'width' => '100%', 'width' => '100%',
'outerborderwidth' => '0', 'outerborderwidth' => '0',
'header_background_image' => $GLOBALS['phpgw']->common->image($GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi'),'bg_filler') 'header_background_image' => $GLOBALS['egw']->common->image($GLOBALS['egw']->common->get_tpl_dir('phpgwapi'),'bg_filler')
) )
); );
$app_id = $GLOBALS['phpgw']->applications->name2id('addressbook'); $app_id = $GLOBALS['egw']->applications->name2id('addressbook');
$GLOBALS['portal_order'][] = $app_id; $GLOBALS['portal_order'][] = $app_id;
$var = Array( $var = Array(
'up' => Array('url' => '/set_box.php', 'app' => $app_id), 'up' => Array('url' => '/set_box.php', 'app' => $app_id),
@ -71,18 +71,18 @@
{ {
$portalbox->data[] = array( $portalbox->data[] = array(
'text' => lang("Today is %1's birthday!", $val['n_given'] . ' ' . $val['n_family']), 'text' => lang("Today is %1's birthday!", $val['n_given'] . ' ' . $val['n_family']),
'link' => $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.view&ab_id=' . $val['id']) 'link' => $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.view&ab_id=' . $val['id'])
); );
} }
// $tmp = '<a href="' // $tmp = '<a href="'
// . $GLOBALS['phpgw']->link('/addressbook/view.php','ab_id=' . $val['id']) . '">' // . $GLOBALS['egw']->link('/addressbook/view.php','ab_id=' . $val['id']) . '">'
// . $val['n_given'] . ' ' . $val['n_family'] . '</a>'; // . $val['n_given'] . ' ' . $val['n_family'] . '</a>';
// echo '<tr><td align="left">' . lang("Today is %1's birthday!", $tmp) . '</td></tr>' . "\n"; // echo '<tr><td align="left">' . lang("Today is %1's birthday!", $tmp) . '</td></tr>' . "\n";
} }
$tomorrow = $GLOBALS['phpgw']->common->show_date($now + 86400,'n/d/'); $tomorrow = $GLOBALS['egw']->common->show_date($now + 86400,'n/d/');
$bdays = $c->read(0,15,$qfields,$tomorrow,'tid=n','','',$GLOBALS['phpgw_info']['user']['account_id']); $bdays = $c->read(0,15,$qfields,$tomorrow,'tid=n','','',$GLOBALS['egw_info']['user']['account_id']);
while(list($key,$val) = @each($bdays)) while(list($key,$val) = @each($bdays))
{ {
@ -90,11 +90,11 @@
{ {
$portalbox->data[] = array( $portalbox->data[] = array(
'text' => lang("Tomorrow is %1's birthday.",$val['n_given'] . ' ' . $val['n_family']), 'text' => lang("Tomorrow is %1's birthday.",$val['n_given'] . ' ' . $val['n_family']),
'link' => $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.view&ab_id='.$val['id']) 'link' => $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiaddressbook.view&ab_id='.$val['id'])
); );
} }
// $tmp = '<a href="' // $tmp = '<a href="'
// . $GLOBALS['phpgw']->link('/addressbook/view.php','ab_id=' . $val['id']) . '">' // . $GLOBALS['egw']->link('/addressbook/view.php','ab_id=' . $val['id']) . '">'
// . $val['n_given'] . ' ' . $val["n_family"] . '</a>'; // . $val['n_given'] . ' ' . $val["n_family"] . '</a>';
// echo '<tr><td align="left">' . lang("Tomorrow is %1's birthday.", $tmp) . '</td></tr>' . "\n"; // echo '<tr><td align="left">' . lang("Tomorrow is %1's birthday.", $tmp) . '</td></tr>' . "\n";
} }

View File

@ -81,7 +81,7 @@
*/ */
$entry = $this->vcard->in($buffer[$i]); $entry = $this->vcard->in($buffer[$i]);
/* Now actually add the new entry */ /* Now actually add the new entry */
$this->contacts->add($GLOBALS['phpgw_info']['user']['account_id'],$entry,$access,$cat_id); $this->contacts->add($GLOBALS['egw_info']['user']['account_id'],$entry,$access,$cat_id);
} }
$num = $i - 1; $num = $i - 1;
return lang('Successfully imported %1 records into your addressbook.',$num); return lang('Successfully imported %1 records into your addressbook.',$num);

View File

@ -109,7 +109,7 @@
$entry[$i]['adr_one_type'] = 'intl'; $entry[$i]['adr_one_type'] = 'intl';
$entry[$i]['adr_two_type'] = 'intl'; $entry[$i]['adr_two_type'] = 'intl';
/* echo '<br>'; */ /* echo '<br>'; */
$contacts->add($GLOBALS['phpgw_info']['user']['account_id'],$entry[$i],$access,$cat_id); $contacts->add($GLOBALS['egw_info']['user']['account_id'],$entry[$i],$access,$cat_id);
} }
$num = $i - 1; $num = $i - 1;
return lang('Successfully imported %1 records into your addressbook.',$num); return lang('Successfully imported %1 records into your addressbook.',$num);

View File

@ -104,7 +104,7 @@
$entry[$i]['adr_one_type'] = 'intl'; $entry[$i]['adr_one_type'] = 'intl';
$entry[$i]['adr_two_type'] = 'intl'; $entry[$i]['adr_two_type'] = 'intl';
/* echo '<br>'; */ /* echo '<br>'; */
$contacts->add($GLOBALS['phpgw_info']['user']['account_id'],$entry[$i],$access,$cat_id); $contacts->add($GLOBALS['egw_info']['user']['account_id'],$entry[$i],$access,$cat_id);
} }
$num = $i - 1; $num = $i - 1;
return lang('Successfully imported %1 records into your addressbook.',$num); return lang('Successfully imported %1 records into your addressbook.',$num);

View File

@ -173,7 +173,7 @@
$entry[$i]['adr_two_type'] = 'intl'; $entry[$i]['adr_two_type'] = 'intl';
$entry[$i]['fn'] = $entry[$i]['n_given'] . ' ' . $entry[$i]['n_family']; $entry[$i]['fn'] = $entry[$i]['n_given'] . ' ' . $entry[$i]['n_family'];
//echo '<br>'; //echo '<br>';
$contacts->add($GLOBALS['phpgw_info']['user']['account_id'],$entry[$i],$access,$cat_id); $contacts->add($GLOBALS['egw_info']['user']['account_id'],$entry[$i],$access,$cat_id);
} }
$num = $i - 1; $num = $i - 1;
return lang('Successfully imported %1 records into your addressbook.',$num); return lang('Successfully imported %1 records into your addressbook.',$num);

View File

@ -169,7 +169,7 @@
$entry[$i]['adr_two_type'] = 'intl'; $entry[$i]['adr_two_type'] = 'intl';
$entry[$i]['fn'] = $entry[$i]['n_given'] . ' ' . $entry[$i]['n_family']; $entry[$i]['fn'] = $entry[$i]['n_given'] . ' ' . $entry[$i]['n_family'];
//echo '<br>'; //echo '<br>';
$contacts->add($GLOBALS['phpgw_info']['user']['account_id'],$entry[$i],$access,$cat_id); $contacts->add($GLOBALS['egw_info']['user']['account_id'],$entry[$i],$access,$cat_id);
} }
$num = $i - 1; $num = $i - 1;
return lang('Successfully imported %1 records into your addressbook.',$num); return lang('Successfully imported %1 records into your addressbook.',$num);

View File

@ -171,7 +171,7 @@
$entry[$i]['adr_two_type'] = 'intl'; $entry[$i]['adr_two_type'] = 'intl';
$entry[$i]['fn'] = $entry[$i]['n_given'] . ' ' . $entry[$i]['n_family']; $entry[$i]['fn'] = $entry[$i]['n_given'] . ' ' . $entry[$i]['n_family'];
//echo '<br>'; //echo '<br>';
$contacts->add($GLOBALS['phpgw_info']['user']['account_id'],$entry[$i],$access,$cat_id); $contacts->add($GLOBALS['egw_info']['user']['account_id'],$entry[$i],$access,$cat_id);
} }
$num = $i - 1; $num = $i - 1;
return lang('Successfully imported %1 records into your addressbook.',$num); return lang('Successfully imported %1 records into your addressbook.',$num);

View File

@ -167,7 +167,7 @@
$entry[$i]['adr_two_type'] = 'intl'; $entry[$i]['adr_two_type'] = 'intl';
$entry[$i]['fn'] = $entry[$i]['n_given'] . ' ' . $entry[$i]['n_family']; $entry[$i]['fn'] = $entry[$i]['n_given'] . ' ' . $entry[$i]['n_family'];
//echo '<br>'; //echo '<br>';
$contacts->add($GLOBALS['phpgw_info']['user']['account_id'],$entry[$i],$access,$cat_id); $contacts->add($GLOBALS['egw_info']['user']['account_id'],$entry[$i],$access,$cat_id);
} }
$num = $i - 1; $num = $i - 1;
return lang('Successfully imported %1 records into your addressbook.',$num); return lang('Successfully imported %1 records into your addressbook.',$num);

View File

@ -169,7 +169,7 @@
$entry[$i]['adr_two_type'] = 'intl'; $entry[$i]['adr_two_type'] = 'intl';
$entry[$i]['fn'] = $entry[$i]['n_family'] . ' ' . $entry[$i]['n_given']; $entry[$i]['fn'] = $entry[$i]['n_family'] . ' ' . $entry[$i]['n_given'];
//echo '<br>'; //echo '<br>';
$contacts->add($GLOBALS['phpgw_info']['user']['account_id'],$entry[$i],$access,$cat_id); $contacts->add($GLOBALS['egw_info']['user']['account_id'],$entry[$i],$access,$cat_id);
} }
$num = $i - 1; $num = $i - 1;
return lang('Successfully imported %1 records into your addressbook.',$num); return lang('Successfully imported %1 records into your addressbook.',$num);

View File

@ -178,7 +178,7 @@
$entry[$i]['adr_two_type'] = 'intl'; $entry[$i]['adr_two_type'] = 'intl';
$entry[$i]['fn'] = $entry[$i]['n_given'] . ' ' . $entry[$i]['n_family']; $entry[$i]['fn'] = $entry[$i]['n_given'] . ' ' . $entry[$i]['n_family'];
//echo '<br>'; //echo '<br>';
$contacts->add($GLOBALS['phpgw_info']['user']['account_id'],$entry[$i],$access,$cat_id); $contacts->add($GLOBALS['egw_info']['user']['account_id'],$entry[$i],$access,$cat_id);
} }
$num = $i - 1; $num = $i - 1;
return lang('Successfully imported %1 records into your addressbook.',$num); return lang('Successfully imported %1 records into your addressbook.',$num);