Added another check for no import conversion type selected

This commit is contained in:
Miles Lott 2003-11-19 14:05:01 +00:00
parent 63dde626aa
commit 6c9d475688
2 changed files with 20 additions and 9 deletions

View File

@ -1,9 +1,9 @@
<?php <?php
/**************************************************************************\ /**************************************************************************\
* phpGroupWare - addressbook * * phpGroupWare - Addressbook *
* http://www.phpgroupware.org * * http://www.phpgroupware.org *
* Written by Joseph Engo <jengo@phpgroupware.org> * * Written by Miles Lott <milos@groupwhere.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 *
* under the terms of the GNU General Public License as published by the * * under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your * * Free Software Foundation; either version 2 of the License, or (at your *
@ -35,7 +35,7 @@
function boXport($session=False) function boXport($session=False)
{ {
$this->contacts = $GLOBALS['phpgw']->contacts; $this->contacts = &$GLOBALS['phpgw']->contacts;
$this->so = CreateObject('addressbook.soaddressbook'); $this->so = CreateObject('addressbook.soaddressbook');
if($session) if($session)
{ {
@ -73,13 +73,13 @@
$this->cat_id = -1; $this->cat_id = -1;
} }
if(isset($_sort) && !empty($_sort)) if(isset($_sort) && !empty($_sort))
{ {
if($this->debug) { echo '<br>overriding $sort: "' . $this->sort . '" now "' . $_sort . '"'; } if($this->debug) { echo '<br>overriding $sort: "' . $this->sort . '" now "' . $_sort . '"'; }
$this->sort = $_sort; $this->sort = $_sort;
} }
if(isset($_order) && !empty($_order)) if(isset($_order) && !empty($_order))
{ {
if($this->debug) { echo '<br>overriding $order: "' . $this->order . '" now "' . $_order . '"'; } if($this->debug) { echo '<br>overriding $order: "' . $this->order . '" now "' . $_order . '"'; }
$this->order = $_order; $this->order = $_order;

View File

@ -1,9 +1,9 @@
<?php <?php
/**************************************************************************\ /**************************************************************************\
* phpGroupWare - addressbook * * phpGroupWare - Addressbook *
* http://www.phpgroupware.org * * http://www.phpgroupware.org *
* Written by Joseph Engo <jengo@phpgroupware.org> * * Written by Miles Lott <milos@groupwhere.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 *
* under the terms of the GNU General Public License as published by the * * under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your * * Free Software Foundation; either version 2 of the License, or (at your *
@ -104,6 +104,17 @@
if($convert) if($convert)
{ {
if($conv_type == 'none')
{
$GLOBALS['phpgw_info']['flags']['noheader'] = False;
$GLOBALS['phpgw_info']['flags']['noheader'] = True;
$GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
echo lang('<b>No conversion type &lt;none&gt; could be located.</b> Please choose a conversion type from the list');
echo '&nbsp<a href="'.$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiXport.import') . '">' . lang('OK') . '</a>';
$GLOBALS['phpgw']->common->phpgw_footer();
$GLOBALS['phpgw']->common->phpgw_exit();
}
$buffer = $this->bo->import($tsvfile['tmp_name'],$conv_type,$private,$fcat_id); $buffer = $this->bo->import($tsvfile['tmp_name'],$conv_type,$private,$fcat_id);
if($download == '') if($download == '')