mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-14 03:54:29 +01:00
b7d62c7b09
export is quite clean at the moment, but import needs lots of work, all the stuff is not really for production yet, but i import it now, so that the guy from metaways can also work on it. most pending tasks: - implement conversions based on regular expressions - implement options of plugin - rework import part (mostly ui)
54 lines
1.3 KiB
PHP
54 lines
1.3 KiB
PHP
<?php
|
|
/**
|
|
* eGroupWare - importexport
|
|
*
|
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
|
* @package importexport
|
|
* @link http://www.egroupware.org
|
|
* @author Cornelius Weiss <nelius@cwtech.de>
|
|
* @version $Id: $
|
|
*/
|
|
|
|
$definition_table = 'egw_importexport_definitions';
|
|
|
|
// Add two rooms to give user an idea of what resources is...
|
|
$plugin_options = serialize(array(
|
|
'fieldsep' => ',',
|
|
'charset' => 'ISO-8859-1',
|
|
'addressbook' => 'n',
|
|
'owner' => 5,
|
|
'field_mapping' => array(
|
|
0 => '#kundennummer',
|
|
1 => 'n_given',
|
|
2 => 'n_family',
|
|
3 => 'adr_one_street',
|
|
4 => 'adr_one_countryname',
|
|
5 => 'adr_one_postalcode',
|
|
6 => 'adr_one_locality',
|
|
7 => 'tel_work',
|
|
8 => '',
|
|
9 => '',
|
|
10 => '',
|
|
11 => '',
|
|
),
|
|
'field_tanslation' => array(),
|
|
'has_header_line' => false,
|
|
'max' => false,
|
|
'conditions' => array(
|
|
0 => array(
|
|
'type' => 0, // exists
|
|
'string' => '#kundennummer',
|
|
'true' => array(
|
|
'action' => 1, // update
|
|
'last' => true,
|
|
),
|
|
'false' => array(
|
|
'action' => 2, // insert
|
|
'last' => true,
|
|
),
|
|
|
|
)),
|
|
));
|
|
$oProc->query("INSERT INTO {$definition_table } (name,application,plugin,type,allowed_users,plugin_options) VALUES ( 'oelheld','addressbook','addressbook_csv_import','import','5','$plugin_options')");
|
|
|