diff --git a/addressbook/inc/class.uiXport.inc.php b/addressbook/inc/class.uiXport.inc.php index 5335c4dbcc..08c6991e7c 100644 --- a/addressbook/inc/class.uiXport.inc.php +++ b/addressbook/inc/class.uiXport.inc.php @@ -32,9 +32,7 @@ function uiXport() { - global $phpgw; - - $this->template = $phpgw->template; + $this->template = $GLOBALS['phpgw']->template; $this->cat = CreateObject('phpgwapi.categories'); $this->bo = CreateObject('addressbook.boXport',True); $this->browser = CreateObject('phpgwapi.browser'); @@ -60,11 +58,11 @@ if (!$notall) { $cats_link .= ''."\n"; } /* Get global and app-specific category listings */ @@ -75,7 +73,7 @@ function import() { - global $phpgw,$convert,$download,$tsvfile,$private,$conv_type,$fcat_id; + global $convert,$download,$tsvfile,$private,$conv_type,$fcat_id; if ($convert) { @@ -86,31 +84,31 @@ if($conv_type == 'Debug LDAP' || $conv_type == 'Debug SQL' ) { // filename, default application/octet-stream, length of file, default nocache True - $phpgw->browser->content_header($tsvfilename,'',strlen($buffer)); + $GLOBALS['phpgw']->browser->content_header($tsvfilename,'',strlen($buffer)); echo $buffer; } else { - $phpgw->common->phpgw_header(); + $GLOBALS['phpgw']->common->phpgw_header(); echo parse_navbar(); echo "
$buffer
"; - echo ''.lang("OK").''; - $phpgw->common->phpgw_footer(); + echo ''.lang('OK').''; + $GLOBALS['phpgw']->common->phpgw_footer(); } } else { - $phpgw->common->phpgw_header(); + $GLOBALS['phpgw']->common->phpgw_header(); echo parse_navbar(); echo "
$buffer
"; - echo ''.lang("OK").''; - $phpgw->common->phpgw_footer(); + echo ''.lang('OK').''; + $GLOBALS['phpgw']->common->phpgw_footer(); } } else { - $phpgw->common->phpgw_header(); + $GLOBALS['phpgw']->common->phpgw_header(); echo parse_navbar(); $this->template->set_file(array('import' => 'import.tpl')); @@ -119,7 +117,6 @@ $i=0; $myfilearray = ''; while ($file = readdir($dir_handle)) { - //echo ""; if ((substr($file, 0, 1) != '.') && is_file(PHPGW_APP_INC . SEP . 'import' . SEP . $file) ) { $myfilearray[$i] = $file; @@ -136,11 +133,11 @@ $this->template->set_var('lang_cancel',lang('Cancel')); $this->template->set_var('lang_cat',lang('Select Category')); - $this->template->set_var('cancel_url',$phpgw->link('/index.php','menuaction=addressbook.uiaddressbook.get_list')); - $this->template->set_var('navbar_bg',$phpgw_info['theme']['navbar_bg']); - $this->template->set_var('navbar_text',$phpgw_info['theme']['navbar_text']); + $this->template->set_var('cancel_url',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.index')); + $this->template->set_var('navbar_bg',$GLOBALS['phpgw_info']['theme']['navbar_bg']); + $this->template->set_var('navbar_text',$GLOBALS['phpgw_info']['theme']['navbar_text']); $this->template->set_var('import_text',lang('Import from LDIF, CSV, or VCard')); - $this->template->set_var('action_url',$phpgw->link('/index.php','menuaction=addressbook.uiXport.import')); + $this->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiXport.import')); $this->template->set_var('cat_link',$this->cat_option($this->cat_id,True,False)); $this->template->set_var('tsvfilename',''); $this->template->set_var('conv',$conv); @@ -155,12 +152,12 @@ $this->template->set_var('cat_id',$this->cat_id); $this->template->pparse('out','import'); } - $phpgw->common->phpgw_footer(); + $GLOBALS['phpgw']->common->phpgw_footer(); } function export() { - global $phpgw,$phpgw_info,$convert,$tsvfilename,$cat_id,$download,$conv_type; + global $convert,$tsvfilename,$cat_id,$download,$conv_type; if ($convert) { @@ -168,14 +165,14 @@ if ($conv_type == 'none') { - $phpgw_info['flags']['noheader'] = False; - $phpgw_info['flags']['noheader'] = True; - $phpgw->common->phpgw_header(); + $GLOBALS['phpgw_info']['flags']['noheader'] = False; + $GLOBALS['phpgw_info']['flags']['noheader'] = True; + $GLOBALS['phpgw']->common->phpgw_header(); echo parse_navbar(); echo lang('No conversion type <none> could be located. Please choose a conversion type from the list'); - echo ' ' . lang('OK') . ''; - $phpgw->common->phpgw_footer(); - $phpgw->common->phpgw_exit(); + echo ' ' . lang('OK') . ''; + $GLOBALS['phpgw']->common->phpgw_footer(); + $GLOBALS['phpgw']->common->phpgw_exit(); } if ( ($download == 'on') || ($o->type == 'pdb') ) @@ -186,18 +183,18 @@ } else { - $phpgw->common->phpgw_header(); + $GLOBALS['phpgw']->common->phpgw_header(); echo parse_navbar(); echo "
\n";
 					echo $buffer;
 					echo "\n
\n"; - echo '' . lang('OK') . ''; - $phpgw->common->phpgw_footer(); + echo '' . lang('OK') . ''; + $GLOBALS['phpgw']->common->phpgw_footer(); } } else { - $phpgw->common->phpgw_header(); + $GLOBALS['phpgw']->common->phpgw_header(); echo parse_navbar(); $this->template->set_file(array('export' => 'export.tpl')); @@ -206,7 +203,6 @@ $i=0; $myfilearray = ''; while ($file = readdir($dir_handle)) { - #echo ""; if ((substr($file, 0, 1) != '.') && is_file(PHPGW_APP_INC . SEP . 'export' . SEP . $file) ) { $myfilearray[$i] = $file; @@ -224,11 +220,11 @@ $this->template->set_var('lang_cancel',lang('Cancel')); $this->template->set_var('lang_cat',lang('Select Category')); $this->template->set_var('cat_link',$this->cat_option($this->cat_id,False,False)); - $this->template->set_var('cancel_url',$phpgw->link('/addressbook/index.php')); - $this->template->set_var('navbar_bg',$phpgw_info['theme']['navbar_bg']); - $this->template->set_var('navbar_text',$phpgw_info['theme']['navbar_text']); + $this->template->set_var('cancel_url',$GLOBALS['phpgw']->link('/addressbook/index.php')); + $this->template->set_var('navbar_bg',$GLOBALS['phpgw_info']['theme']['navbar_bg']); + $this->template->set_var('navbar_text',$GLOBALS['phpgw_info']['theme']['navbar_text']); $this->template->set_var('export_text',lang('Export from Addressbook')); - $this->template->set_var('action_url',$phpgw->link('/index.php','menuaction=addressbook.uiXport.export')); + $this->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiXport.export')); $this->template->set_var('filename',lang('Export file name')); $this->template->set_var('conv',$conv); $this->template->set_var('debug',lang('')); @@ -241,7 +237,7 @@ $this->template->set_var('cat_id',$this->cat_id); $this->template->pparse('out','export'); - $phpgw->common->phpgw_footer(); + $GLOBALS['phpgw']->common->phpgw_footer(); } } }