forked from extern/egroupware
Fixes for import
This commit is contained in:
parent
07f5bb292c
commit
9b94656ff3
@ -90,9 +90,9 @@
|
|||||||
$this->cat_id = $data['cat_id'];
|
$this->cat_id = $data['cat_id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
function import()
|
function import($tsvfile,$conv_type,$private)
|
||||||
{
|
{
|
||||||
global $tsvfile,$private;
|
global $phpgw;
|
||||||
|
|
||||||
include (PHPGW_APP_INC . '/import/' . $conv_type);
|
include (PHPGW_APP_INC . '/import/' . $conv_type);
|
||||||
|
|
||||||
@ -222,32 +222,7 @@
|
|||||||
|
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
$buffer = $contacts->import_end_file($buffer,$private,$cat_id);
|
$buffer = $contacts->import_end_file($buffer,$private,$cat_id);
|
||||||
|
return $buffer;
|
||||||
if ($download == '')
|
|
||||||
{
|
|
||||||
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));
|
|
||||||
echo $buffer;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$phpgw->common->phpgw_header();
|
|
||||||
echo parse_navbar();
|
|
||||||
echo "<pre>$buffer</pre>";
|
|
||||||
echo '<a href="'.$phpgw->link('/index.php','menuaction=addressbook.uiaddressbook.get_list') . '">'.lang("OK").'</a>';
|
|
||||||
$phpgw->common->phpgw_footer();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$phpgw->common->phpgw_header();
|
|
||||||
echo parse_navbar();
|
|
||||||
echo "<pre>$buffer</pre>";
|
|
||||||
echo '<a href="'.$phpgw->link('/index.php','menuaction=addressbook.uiaddressbook.get_list'). '">'.lang("OK").'</a>';
|
|
||||||
$phpgw->common->phpgw_footer();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function export($cat_id='')
|
function export($cat_id='')
|
||||||
|
@ -75,12 +75,11 @@
|
|||||||
|
|
||||||
function import()
|
function import()
|
||||||
{
|
{
|
||||||
global $phpgw,$convert,$download,$tsvfilename;
|
global $phpgw,$convert,$download,$tsvfile,$private,$conv_type;
|
||||||
|
|
||||||
if ($convert)
|
if ($convert)
|
||||||
{
|
{
|
||||||
$buffer = $this->bo->import();
|
$buffer = $this->bo->import($tsvfile,$conv_type,$private);
|
||||||
print_r($buffer);
|
|
||||||
|
|
||||||
if ($download == '')
|
if ($download == '')
|
||||||
{
|
{
|
||||||
@ -141,7 +140,7 @@
|
|||||||
$this->template->set_var('navbar_bg',$phpgw_info['theme']['navbar_bg']);
|
$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('navbar_text',$phpgw_info['theme']['navbar_text']);
|
||||||
$this->template->set_var('import_text',lang('Import from LDIF, CSV, or VCard'));
|
$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.boXport.import'));
|
$this->template->set_var('action_url',$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('cat_link',$this->cat_option($this->cat_id,True,False));
|
||||||
$this->template->set_var('tsvfilename','');
|
$this->template->set_var('tsvfilename','');
|
||||||
$this->template->set_var('conv',$conv);
|
$this->template->set_var('conv',$conv);
|
||||||
|
Loading…
Reference in New Issue
Block a user