forked from extern/egroupware
- added csv export
- fixed csv import
This commit is contained in:
parent
455a96c873
commit
3780b08336
@ -63,14 +63,14 @@
|
||||
// find in Addressbook, at least n_family AND (n_given OR org_name) have to match
|
||||
function addr_id($n_family,$n_given,$org_name)
|
||||
{
|
||||
$addrs = $GLOBALS['egw']->contacts->read(0,0,array('id'),'',"n_family=$n_family,n_given=$n_given,org_name=$org_name");
|
||||
$addrs = $GLOBALS['egw']->contacts->search(array('n_family'=>$n_family,'n_given'=>$n_given,'org_name'=>$org_name));
|
||||
if(!count($addrs))
|
||||
{
|
||||
$addrs = $GLOBALS['egw']->contacts->read(0,0,array('id'),'',"n_family=$n_family,n_given=$n_given");
|
||||
$addrs = $GLOBALS['egw']->contacts->search(array('n_family'=>$n_family,'n_given'=>$n_given));
|
||||
}
|
||||
if(!count($addrs))
|
||||
{
|
||||
$addrs = $GLOBALS['egw']->contacts->read(0,0,array('id'),'',"n_family=$n_family,org_name=$org_name");
|
||||
$addrs = $GLOBALS['egw']->contacts->search(array('n_family'=>$n_family,'org_name'=>$org_name));
|
||||
}
|
||||
|
||||
if(count($addrs))
|
||||
@ -128,7 +128,7 @@
|
||||
$GLOBALS['egw']->html->select('charset','',
|
||||
$GLOBALS['egw']->translation->get_installed_charsets()+
|
||||
array('utf-8' => 'utf-8 (Unicode)'),True));
|
||||
$GLOBALS['egw']->template->set_var('fieldsep',$_POST['fieldsep'] ? $_POST['fieldsep'] : ',');
|
||||
$GLOBALS['egw']->template->set_var('fieldsep',$_POST['fieldsep'] ? $_POST['fieldsep'] : ';');
|
||||
$GLOBALS['egw']->template->set_var('submit',lang('Import'));
|
||||
$GLOBALS['egw']->template->set_var('csvfile',$csvfile);
|
||||
$GLOBALS['egw']->template->set_var('enctype','ENCTYPE="multipart/form-data"');
|
||||
@ -152,28 +152,16 @@
|
||||
$GLOBALS['egw']->template->set_var('lang_debug',lang('Test Import (show importable records <u>only</u> in browser)'));
|
||||
$GLOBALS['egw']->template->parse('fheaderhandle','fheader');
|
||||
|
||||
$addr_names = $GLOBALS['egw']->contacts->stock_contact_fields + array(
|
||||
'cat_id' => 'Categories: id\'s or names, comma separated list',
|
||||
'access' => 'Access: public, private',
|
||||
'owner' => 'Owner: user-id/-name, defaults to user',
|
||||
'address2' => 'address line 2',
|
||||
'address3' => 'address line 3',
|
||||
'ophone' => 'Other Phone'
|
||||
);
|
||||
$config = CreateObject('phpgwapi.config','addressbook');
|
||||
$config->read_repository();
|
||||
while(list($name,$descr) = @each($config->config_data['custom_fields']))
|
||||
{
|
||||
$addr_names[$name] = $descr;
|
||||
}
|
||||
unset($config);
|
||||
$addr_names = $GLOBALS['egw']->contacts->contact_fields;
|
||||
$addr_names['cat_id'] .= ': id or name, comma separated list';
|
||||
$addr_names['private'] .= ': 0 = public, 1 = private';
|
||||
$addr_names['owner'] .= ': id or account name of user or group, defaults to importing user';
|
||||
$addr_names['bday'] .= ': YYYY-mm-dd';
|
||||
unset($addr_names['jpegphoto']); // cant cvs import that
|
||||
|
||||
foreach($addr_names as $field => $name)
|
||||
foreach($GLOBALS['egw']->contacts->customfields as $name => $data)
|
||||
{
|
||||
if($dn = display_name($field))
|
||||
{
|
||||
$addr_names[$field] = $dn;
|
||||
}
|
||||
$addr_names['#'.$name] = $data['label'];
|
||||
}
|
||||
$addr_name_options = "<option value=\"\">none\n";
|
||||
foreach($addr_names as $field => $name)
|
||||
@ -315,15 +303,9 @@
|
||||
}
|
||||
$log .= "\t\t<td><b>$addr</b></td>\n";
|
||||
}
|
||||
if (!in_array('fn',$addr_fields)) // autocreate full name, if not set by user
|
||||
if (!in_array('private',$addr_fields)) // autocreate public access if not set by user
|
||||
{
|
||||
$log .= "\t\t<td><b>fn</b></td>\n";
|
||||
|
||||
$auto_fn = array('n_prefix','n_given','n_middle','n_family','n_suffix');
|
||||
}
|
||||
if (!in_array('access',$addr_fields)) // autocreate public access if not set by user
|
||||
{
|
||||
$log .= "\t\t<td><b>access</b></td>\n";
|
||||
$log .= "\t\t<td><b>private</b></td>\n";
|
||||
}
|
||||
$start = $_POST['start'] < 1 ? 1 : $_POST['start'];
|
||||
|
||||
@ -399,31 +381,42 @@
|
||||
{
|
||||
$values['cat_id'] = cat_id($values['cat_id']);
|
||||
}
|
||||
|
||||
// convert dates to timestamps
|
||||
foreach(array('created','modified') as $date)
|
||||
{
|
||||
if (isset($values[$date]) && !is_numeric($date))
|
||||
{
|
||||
// convert german DD.MM.YYYY format into ISO YYYY-MM-DD format
|
||||
$values[$date] = ereg_replace('([0-9]{1,2}).([0-9]{1,2}).([0-9]{4})','\3-\2-\1',$values[$date]);
|
||||
// remove fractures of seconds if present at the end of the string
|
||||
if (ereg('(.*)\.[0-9]+',$values[$date],$parts)) $values[$date] = $parts[1];
|
||||
$values[$date] = strtotime($values[$date]);
|
||||
}
|
||||
}
|
||||
// convert user-names to user-id's
|
||||
foreach(array('owner') as $user)
|
||||
foreach(array('owner','modifier','creator') as $user)
|
||||
{
|
||||
if (isset($values[$user]) && !is_numeric($user))
|
||||
{
|
||||
$values[$user] = $GLOBALS['egw']->accounts->name2id($values[$user]);
|
||||
}
|
||||
}
|
||||
if (is_array($auto_fn)) // autocreate full name
|
||||
if (!in_array('owner',$addr_fields) || !$values['owner'])
|
||||
{
|
||||
foreach($auto_fn as $name)
|
||||
{
|
||||
$values['fn'] .= ($values['fn'] != '' && $values[$name] != '' ? ' ' : '') . $values[$name];
|
||||
}
|
||||
$log .= "\t\t<td>".$values['fn']."</td>\n";
|
||||
$values['owner'] = $GLOBALS['egw_info']['user']['account_id'];
|
||||
}
|
||||
if (!in_array('access',$addr_fields))
|
||||
if (!in_array('private',$addr_fields))
|
||||
{
|
||||
$values['access'] = 'public'; // public access if not set by user
|
||||
$log .= "\t\t<td>".$values['access']."</td>\n";
|
||||
$values['private'] = 0; // public access if not set by user
|
||||
$log .= "\t\t<td>".$values['private']."</td>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$values['private'] = (int) in_array($values['private'],array(lang('yes'),'yes','private','1','true'));
|
||||
}
|
||||
if(!$_POST['debug'] && !$empty) // dont import empty contacts
|
||||
{
|
||||
$GLOBALS['egw']->contacts->add( $values['owner'] ? $values['owner'] : $GLOBALS['egw_info']['user']['account_id'],$values);
|
||||
$GLOBALS['egw']->contacts->save($values);
|
||||
//echo "<p>adding: ".print_r($values,true)."</p>\n";
|
||||
}
|
||||
}
|
||||
|
@ -62,6 +62,10 @@ class bocontacts extends socontacts
|
||||
'n_family, n_prefix',
|
||||
'n_fn',
|
||||
);
|
||||
|
||||
var $contact_fields = array();
|
||||
var $business_contact_fields = array();
|
||||
var $home_contact_fields = array();
|
||||
|
||||
function bocontacts($contact_app='addressbook')
|
||||
{
|
||||
@ -83,6 +87,101 @@ class bocontacts extends socontacts
|
||||
$this->$my = &$GLOBALS['egw']->$class;
|
||||
}*/
|
||||
|
||||
$this->contact_fields = array(
|
||||
'id' => lang('Contact ID'),
|
||||
'tid' => lang('Type'),
|
||||
'owner' => lang('Addressbook'),
|
||||
'private' => lang('private'),
|
||||
'cat_id' => lang('Category'),
|
||||
'n_prefix' => lang('prefix'),
|
||||
'n_given' => lang('first name'),
|
||||
'n_middle' => lang('middle name'),
|
||||
'n_family' => lang('last name'),
|
||||
'n_suffix' => lang('suffix'),
|
||||
'n_fn' => lang('full name'),
|
||||
'n_fileas' => lang('own sorting'),
|
||||
'bday' => lang('birthday'),
|
||||
'org_name' => lang('Company'),
|
||||
'org_unit' => lang('Department'),
|
||||
'title' => lang('Title'),
|
||||
'role' => lang('Role'),
|
||||
'assistent' => lang('Assistent'),
|
||||
'room' => lang('Room'),
|
||||
'adr_one_street' => lang('street').' ('.lang('business').')',
|
||||
'adr_one_street2' => lang('address line 2').' ('.lang('business').')',
|
||||
'adr_one_locality' => lang('city').' ('.lang('business').')',
|
||||
'adr_one_region' => lang('state').' ('.lang('business').')',
|
||||
'adr_one_postalcode' => lang('zip code').' ('.lang('business').')',
|
||||
'adr_one_countryname' => lang('country').' ('.lang('business').')',
|
||||
'label' => lang('label'),
|
||||
'adr_two_street' => lang('street').' ('.lang('private').')',
|
||||
'adr_two_street2' => lang('address line 2').' ('.lang('private').')',
|
||||
'adr_two_locality' => lang('city').' ('.lang('private').')',
|
||||
'adr_two_region' => lang('state').' ('.lang('private').')',
|
||||
'adr_two_postalcode' => lang('zip code').' ('.lang('private').')',
|
||||
'adr_two_countryname' => lang('country').' ('.lang('private').')',
|
||||
'tel_work' => lang('work phone'),
|
||||
'tel_cell' => lang('mobile phone'),
|
||||
'tel_fax' => lang('fax').' ('.lang('business').')',
|
||||
'tel_assistent' => lang('assistent phone'),
|
||||
'tel_car' => lang('car phone'),
|
||||
'tel_pager' => lang('pager'),
|
||||
'tel_home' => lang('home phone'),
|
||||
'tel_fax_home' => lang('fax').' ('.lang('private').')',
|
||||
'tel_cell_private' => lang('mobile phone').' ('.lang('private').')',
|
||||
'tel_other' => lang('other phone'),
|
||||
'tel_prefer' => lang('preferred phone'),
|
||||
'email' => lang('email').' ('.lang('business').')',
|
||||
'email_home' => lang('email').' ('.lang('private').')',
|
||||
'url' => lang('url').' ('.lang('business').')',
|
||||
'url_home' => lang('url').' ('.lang('private').')',
|
||||
'freebusy_uri' => lang('Freebusy URI'),
|
||||
'calendar_uri' => lang('Calendar URI'),
|
||||
'note' => lang('note'),
|
||||
'tz' => lang('time zone'),
|
||||
'geo' => lang('geo'),
|
||||
'pubkey' => lang('public key'),
|
||||
'created' => lang('created'),
|
||||
'creator' => lang('created by'),
|
||||
'modified' => lang('last modified'),
|
||||
'modifier' => lang('last modified by'),
|
||||
'jpegphoto' => lang('photo'),
|
||||
);
|
||||
$this->business_contact_fields = array(
|
||||
'org_name' => lang('Company'),
|
||||
'org_unit' => lang('Department'),
|
||||
'title' => lang('Title'),
|
||||
'role' => lang('Role'),
|
||||
'n_prefix' => lang('prefix'),
|
||||
'n_given' => lang('first name'),
|
||||
'n_middle' => lang('middle name'),
|
||||
'n_family' => lang('last name'),
|
||||
'n_suffix' => lang('suffix'),
|
||||
'adr_one_street' => lang('street').' ('.lang('business').')',
|
||||
'adr_one_street2' => lang('address line 2').' ('.lang('business').')',
|
||||
'adr_one_locality' => lang('city').' ('.lang('business').')',
|
||||
'adr_one_region' => lang('state').' ('.lang('business').')',
|
||||
'adr_one_postalcode' => lang('zip code').' ('.lang('business').')',
|
||||
'adr_one_countryname' => lang('country').' ('.lang('business').')',
|
||||
);
|
||||
$this->home_contact_fields = array(
|
||||
'org_name' => lang('Company'),
|
||||
'org_unit' => lang('Department'),
|
||||
'title' => lang('Title'),
|
||||
'role' => lang('Role'),
|
||||
'n_prefix' => lang('prefix'),
|
||||
'n_given' => lang('first name'),
|
||||
'n_middle' => lang('middle name'),
|
||||
'n_family' => lang('last name'),
|
||||
'n_suffix' => lang('suffix'),
|
||||
'adr_two_street' => lang('street').' ('.lang('business').')',
|
||||
'adr_two_street2' => lang('address line 2').' ('.lang('business').')',
|
||||
'adr_two_locality' => lang('city').' ('.lang('business').')',
|
||||
'adr_two_region' => lang('state').' ('.lang('business').')',
|
||||
'adr_two_postalcode' => lang('zip code').' ('.lang('business').')',
|
||||
'adr_two_countryname' => lang('country').' ('.lang('business').')',
|
||||
);
|
||||
//_debug_array($this->contact_fields);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -275,6 +374,8 @@ class bocontacts extends socontacts
|
||||
if (!isset($contact['owner'])) $contact['owner'] = $this->user; // write to users personal addressbook
|
||||
$contact['creator'] = $this->user;
|
||||
$contact['created'] = $this->now_su;
|
||||
|
||||
if (!$contact['tid']) $contact['tid'] = 'n';
|
||||
}
|
||||
if($contact['id'] && !$this->check_perms(EGW_ACL_EDIT,$contact))
|
||||
{
|
||||
@ -285,8 +386,6 @@ class bocontacts extends socontacts
|
||||
// last modified
|
||||
$contact['modifier'] = $this->user;
|
||||
$contact['modified'] = $this->now_su;
|
||||
// set access if not set or bogus
|
||||
if ($contact['access'] != 'private') $contact['access'] = 'public';
|
||||
// set full name and fileas from the content
|
||||
$contact['n_fn'] = $this->fullname($contact);
|
||||
$contact['n_fileas'] = $this->fileas($contact);
|
||||
@ -327,7 +426,7 @@ class bocontacts extends socontacts
|
||||
* @param mixed $contact contact as array or the contact-id
|
||||
* @return boolean true permission granted or false for permission denied
|
||||
*/
|
||||
function check_perms($needed,&$contact)
|
||||
function check_perms($needed,$contact)
|
||||
{
|
||||
if (!is_array($contact) && !($contact = parent::read($contact)))
|
||||
{
|
||||
|
@ -57,7 +57,7 @@ class contacts_admin_prefs
|
||||
// 'Advanced search'=>$GLOBALS['egw']->link('/index.php','menuaction=addressbook.uicontacts.search'),
|
||||
// 'import contacts' => $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiXport.import'),
|
||||
// 'export contacts' => $GLOBALS['egw']->link('/index.php','menuaction=addressbook.uiXport.export')
|
||||
// 'CSV-Import' => $GLOBALS['egw']->link('/addressbook/csv_import.php')
|
||||
'CSV-Import' => $GLOBALS['egw']->link('/addressbook/csv_import.php')
|
||||
);
|
||||
display_sidebox($appname,lang('Addressbook menu'),$file);
|
||||
}
|
||||
@ -145,6 +145,30 @@ class contacts_admin_prefs
|
||||
'admin' => false,
|
||||
);
|
||||
}
|
||||
// CSV Export
|
||||
$GLOBALS['settings']['csv_fields'] = array(
|
||||
'type' => 'select',
|
||||
'label' => 'Fields for the CSV export',
|
||||
'name' => 'csv_fields',
|
||||
'values' => array(
|
||||
'' => lang('All'),
|
||||
'business' => lang('Business address'),
|
||||
'home' => lang('Home address'),
|
||||
),
|
||||
'help' => 'Which fields should be exported. All means every field stored in the addressbook incl. the custom fields. The business or home address only contains name, company and the selected address.',
|
||||
'xmlrpc' => True,
|
||||
'admin' => false,
|
||||
);
|
||||
$GLOBALS['settings']['csv_charset'] = array(
|
||||
'type' => 'select',
|
||||
'label' => 'Charset for the CSV export',
|
||||
'name' => 'csv_charset',
|
||||
'values' => $GLOBALS['egw']->translation->get_installed_charsets()+array('utf-8' => 'utf-8 (Unicode)'),
|
||||
'help' => 'Which charset should be used for the CSV export. The system default is the charset of this eGroupWare installation.',
|
||||
'xmlrpc' => True,
|
||||
'admin' => false,
|
||||
);
|
||||
|
||||
if ($this->contacts_repository == 'sql')
|
||||
{
|
||||
$GLOBALS['settings']['private_addressbook'] = array(
|
||||
|
132
addressbook/inc/class.csv_export.inc.php
Normal file
132
addressbook/inc/class.csv_export.inc.php
Normal file
@ -0,0 +1,132 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* eGroupWare - exporting contacts as csv file *
|
||||
* http://www.egroupware.org *
|
||||
* Written and (c) 2006 Ralf Becker <RalfBecker-AT-outdoor-training.de> *
|
||||
* ------------------------------------------------------------------------ *
|
||||
* 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 *
|
||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||
* option) any later version. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/**
|
||||
* export to csv
|
||||
*
|
||||
* @package addressbook
|
||||
* @subpackage export
|
||||
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||
* @copyright (c) 2006 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
*/
|
||||
class csv_export
|
||||
{
|
||||
var $obj;
|
||||
var $charset;
|
||||
var $charset_out;
|
||||
var $separator;
|
||||
|
||||
function csv_export($obj,$charset=null,$separator=';')
|
||||
{
|
||||
$this->obj =& $obj;
|
||||
$this->separator = $separator;
|
||||
$this->charset_out = $charset;
|
||||
$this->charset = $GLOBALS['egw']->translation->charset();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a csv export
|
||||
*/
|
||||
function export($ids,$fields,$file=null)
|
||||
{
|
||||
unset($fields['jpegphoto']);
|
||||
|
||||
if (!$file)
|
||||
{
|
||||
$browser =& CreateObject('phpgwapi.browser');
|
||||
$browser->content_header('addressbook.csv','text/comma-separated-values');
|
||||
}
|
||||
if (!($fp = fopen($file ? $file : 'php://output','w')))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
fwrite($fp,$this->csv_encode($fields,$fields)."\n");
|
||||
|
||||
foreach($ids as $id)
|
||||
{
|
||||
if (!($data = $this->obj->read($id)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$this->csv_prepare($data,$fields);
|
||||
|
||||
fwrite($fp,$this->csv_encode($data,$fields)."\n");
|
||||
}
|
||||
fclose($fp);
|
||||
|
||||
if (!$file)
|
||||
{
|
||||
$GLOBALS['egw']->common->egw_exit();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function csv_encode($data,$fields)
|
||||
{
|
||||
$out = array();
|
||||
foreach($fields as $field => $label)
|
||||
{
|
||||
$value = $data[$field];
|
||||
if (strstr($value,$this->separator) !== false || strstr($value,"\n") !== false || strstr($value,"\r") !== false)
|
||||
{
|
||||
$value = '"'.str_replace(array('\\','"'),array('\\\\','\\"'),$value).'"';
|
||||
}
|
||||
$out[] = $value;
|
||||
}
|
||||
$out = implode($this->separator,$out);
|
||||
|
||||
if ($this->charset_out && $this->charset != $this->charset_out)
|
||||
{
|
||||
$out = $GLOBALS['egw']->translation->convert($out,$this->charset,$this->charset_out);
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
|
||||
function csv_prepare(&$data,$fields)
|
||||
{
|
||||
foreach(array('owner','creator','modifier') as $name)
|
||||
{
|
||||
if ($data[$name])
|
||||
{
|
||||
$data[$name] = $GLOBALS['egw']->common->grab_owner_name($data[$name]);
|
||||
}
|
||||
elseif ($name == 'owner')
|
||||
{
|
||||
$data[$name] = lang('Accounts');
|
||||
}
|
||||
}
|
||||
foreach(array('modified','created') as $name)
|
||||
{
|
||||
if ($data[$name]) $data[$name] = date('Y-m-d H:i:s',$data[$name]);
|
||||
}
|
||||
if ($data['tel_prefer']) $data['tel_prefer'] = $fields[$data['tel_prefer']];
|
||||
|
||||
if (!is_object($GLOBALS['egw']->categories))
|
||||
{
|
||||
$GLOBALS['egw']->categories =& CreateObject('phpgwapi.categories','addressbook');
|
||||
}
|
||||
$cats = array();
|
||||
foreach(explode(',',$data['cat_id']) as $cat_id)
|
||||
{
|
||||
if ($cat_id) $cats[] = $GLOBALS['egw']->categories->id2name($cat_id);
|
||||
}
|
||||
$data['cat_id'] = implode('; ',$cats);
|
||||
|
||||
$data['private'] = $data['private'] ? lang('yes') : lang('no');
|
||||
|
||||
$data['n_fileas'] = $this->obj->fileas($data);
|
||||
$data['n_fn'] = $this->obj->fullname($data);
|
||||
}
|
||||
}
|
@ -137,6 +137,7 @@ class uicontacts extends bocontacts
|
||||
);
|
||||
$sel_options['action'] = array(
|
||||
'delete' => lang('Delete'),
|
||||
'csv' => lang('Export as CSV'),
|
||||
'vcard' => lang('Export as VCard'),
|
||||
)+$this->get_addressbooks(EGW_ACL_ADD);
|
||||
foreach($this->content_types as $tid => $data)
|
||||
@ -170,6 +171,33 @@ class uicontacts extends bocontacts
|
||||
$query['num_rows'] = -1; // all
|
||||
$this->get_rows($query,$checked,$readonlys,true); // true = only return the id's
|
||||
}
|
||||
switch($action)
|
||||
{
|
||||
case 'csv':
|
||||
$action_msg = lang('exported');
|
||||
$csv_export =& CreateObject('addressbook.csv_export',$this,$this->prefs['csv_charset']);
|
||||
switch ($this->prefs['csv_fields'])
|
||||
{
|
||||
case 'business':
|
||||
$fields = $this->business_contact_fields;
|
||||
break;
|
||||
case 'home':
|
||||
$fields = $this-home_contact_fields;
|
||||
break;
|
||||
default:
|
||||
$fields = $this->contact_fields;
|
||||
foreach($this->customfields as $name => $data)
|
||||
{
|
||||
$fields['#'.$name] = $data['label'];
|
||||
}
|
||||
break;
|
||||
}
|
||||
$csv_export->export($checked,$fields);
|
||||
// does not return!
|
||||
$Ok = true;
|
||||
break;
|
||||
}
|
||||
|
||||
foreach($checked as $id)
|
||||
{
|
||||
switch($action)
|
||||
@ -202,11 +230,6 @@ class uicontacts extends bocontacts
|
||||
$Ok = false; // todo
|
||||
break;
|
||||
|
||||
case 'csv':
|
||||
$action_msg = lang('exported');
|
||||
$Ok = false; // todo
|
||||
break;
|
||||
|
||||
default: // move to an other addressbook
|
||||
if (!is_numeric($action) || !($this->grants[(int) $action] & EGW_ACL_EDIT)) // might be ADD in the future
|
||||
{
|
||||
@ -316,11 +339,18 @@ class uicontacts extends bocontacts
|
||||
{
|
||||
$query['col_filter'][] = $query['order']."!=''";
|
||||
}
|
||||
$rows = (array) parent::search($query['search'],$id_only,$order,'','%',false,'OR',array((int)$query['start'],(int) $query['num_rows']),$query['col_filter']);
|
||||
$rows = (array) parent::search($query['search'],$id_only ? array('id','org_name','n_family','n_given','n_fileas') : false,
|
||||
$order,'','%',false,'OR',array((int)$query['start'],(int) $query['num_rows']),$query['col_filter']);
|
||||
//echo "<p style='margin-top: 100px;'>".$this->somain->db->Query_ID->sql."</p>\n";
|
||||
|
||||
if ($id_only) return $this->total; // no need to set other fields or $readonlys
|
||||
|
||||
if ($id_only)
|
||||
{
|
||||
foreach($rows as $n => $row)
|
||||
{
|
||||
$rows[$n] = $row['id'];
|
||||
}
|
||||
return $this->total; // no need to set other fields or $readonlys
|
||||
}
|
||||
if ($this->prefs['custom_colum'] != 'never' && $rows) // do we need the custom fields
|
||||
{
|
||||
foreach($rows as $n => $val)
|
||||
|
@ -6,6 +6,7 @@
|
||||
(e.g. 1969) addressbook de (z.B. 1966)
|
||||
<b>no conversion type <none> could be located.</b> please choose a conversion type from the list addressbook de <b>Kein Übersetzungstyp <none> konnte gefunden werden.</b> Bitte wählen Sie einen Übersetzungstyp aus der Liste
|
||||
@-eval() is only availible to admins!!! addressbook de @-eval() ist nur verfügbar für Administratoren!!!
|
||||
accounts addressbook de Benutzerkonten
|
||||
actions addressbook de Befehle
|
||||
add a new contact addressbook de Neuen Kontakt anlegen
|
||||
add a single entry by passing the fields. addressbook de Hinzufügen eines einzelnen Eintrags durch Übergeben der Felder.
|
||||
@ -28,6 +29,7 @@ apply the action on the whole query, not only the shown contacts!!! addressbook
|
||||
are you shure you want to delete this contact? addressbook de Diesen Kontakt löschen?
|
||||
are you sure you want to delete this field? addressbook de Sind Sie sicher, dass Sie dieses Feld löschen wollen?
|
||||
assistent addressbook de Assistent
|
||||
assistent phone addressbook de Telefon Assistent
|
||||
birthday common de Geburtstag
|
||||
birthdays common de Geburtstage
|
||||
blank addressbook de Leer
|
||||
@ -41,17 +43,21 @@ business phone addressbook de Tel. gesch
|
||||
business state addressbook de Bundesland geschäftl.
|
||||
business street addressbook de Straße geschäftl.
|
||||
business zip code addressbook de PLZ geschäftl.
|
||||
calendar uri addressbook de Kalender URI
|
||||
car phone addressbook de Autotelefon
|
||||
cell phone addressbook de Mobiltelefon
|
||||
charset for the csv export addressbook de Zeichensatz für den CSV Export
|
||||
charset of file addressbook de Zeichensatz der Datei
|
||||
check all addressbook de Alle auswählen
|
||||
choose an icon for this contact type admin de Wählen Sie ein Icon für diesen Kontakt Typ
|
||||
chosse an etemplate for this contact type admin de Wählen Sie ein eTemplate für diesen Kontakt Typ
|
||||
city common de Stadt
|
||||
company common de Firma
|
||||
company name addressbook de Firmenname
|
||||
configuration common de Konfiguration
|
||||
contact common de Kontakt
|
||||
contact application admin de Kontakt Anwendung
|
||||
contact id addressbook de Kontakt ID
|
||||
contact saved addressbook de Kontakt gespeichert
|
||||
contact settings admin de Kontakt Einstellungen
|
||||
copied by %1, from record #%2. addressbook de Kopiert von %1, vom Datensatz Nr. %2.
|
||||
@ -88,7 +94,8 @@ enable an extra private addressbook addressbook de Privates Adressbuch einschalt
|
||||
enter the path to the exported file here addressbook de Bitte geben Sie den Pfad für die exportierte Datei an
|
||||
existing links addressbook de Bestehende Verknüpfungen
|
||||
export addressbook de Export
|
||||
export as vcard addressbook de VCard exportieren
|
||||
export as csv addressbook de Exportieren als CSV
|
||||
export as vcard addressbook de Exportieren als VCard
|
||||
export contacts addressbook de Kontakte exportieren
|
||||
export file name addressbook de Dateiname zum Exportieren
|
||||
export from addressbook addressbook de Export vom Adressbuch
|
||||
@ -99,8 +106,10 @@ fax number common de Telefaxnummer
|
||||
field %1 has been added ! addressbook de Feld %1 wurde hinzugefügt !
|
||||
field %1 has been updated ! addressbook de Feld %1 wurde aktualisiert !
|
||||
field name addressbook de Feldname
|
||||
fields for the csv export addressbook de Felder für den CSV Export
|
||||
fields to show in address list addressbook de Felder, die in der Adressliste angezeigt werden sollen
|
||||
fieldseparator addressbook de Feldtrenner
|
||||
freebusy uri addressbook de Freebusy URI
|
||||
full name addressbook de vollständiger Name
|
||||
geo addressbook de GEO
|
||||
global categories addressbook de Globale Kategorien
|
||||
@ -129,6 +138,7 @@ income addressbook de Einkommen
|
||||
international addressbook de International
|
||||
label addressbook de Adressetikett
|
||||
last modified addressbook de Letzte Änderung
|
||||
last modified by addressbook de Letzte Änderung durch
|
||||
ldap context for contacts admin de LDAP-Kontext für Kontakte
|
||||
ldap host for contacts admin de LDAP-Host für Kontakte
|
||||
ldap root dn for contacts admin de LDAP-rootdn für Kontakte
|
||||
@ -166,6 +176,7 @@ please enter a name for that field ! addressbook de Bitte geben sie einen Namen
|
||||
please select only one category addressbook de Bitte nur eine Kategorie auswählen
|
||||
postal common de Postanschrift
|
||||
pref addressbook de präf
|
||||
preferred phone addressbook de präferierte Telefonnummer
|
||||
prefix addressbook de Anrede
|
||||
public key addressbook de öffentlicher Schlüssel
|
||||
publish into groups: addressbook de In folgende Gruppen veröffentlichen:
|
||||
@ -218,6 +229,8 @@ vcards require a last name entry. addressbook de VCards ben
|
||||
warning!! ldap is valid only if you are not using contacts for accounts storage! admin de WARNUNG!! LDAP darf nur verwendet werden, wenn sie die Benutzerkonten nicht im Adressbuch speichern!
|
||||
warning: all contacts found will be deleted! addressbook de WARNUNG: Alle gefundenen Kontakte werden gelöscht!
|
||||
when should the contacts list display that colum. "only if there is content" hides the column, unless there is some content in the view. addressbook de Wann soll die Adressliste diese Spalte anzeigen. "Nur wenn etwas angezeigt wird" blendet die Spalte aus, wenn Sie in dieser Anzeige leer wäre.
|
||||
which charset should be used for the csv export. the system default is the charset of this egroupware installation. addressbook de Welcher Zeichensatz soll für den CSV Export verwendet werden. Die systemweite Vorgabe ist der Zeichensatz der eGroupWare Installation.
|
||||
which fields should be exported. all means every field stored in the addressbook incl. the custom fields. the business or home address only contains name, company and the selected address. addressbook de Welche Felder sollen exportiert werden. Alle bedeutet jedes Feld das im Adressbuch gespeichert ist einschl. der benutzerdefinierten Felder. Die Geschäfts- oder Privatadresse enthält nur Name, Firma und die ausgewählte Adresse.
|
||||
whole query addressbook de gesamte Abfrage
|
||||
work phone addressbook de Tel dienstl.
|
||||
write (update or add) a single entry by passing the fields. addressbook de Schreibt (aktualiseren oder zufügen) eines einzelnen Eintrags durch Übergabe der Felder
|
||||
|
@ -6,6 +6,7 @@
|
||||
(e.g. 1969) addressbook en (e.g. 1969)
|
||||
<b>no conversion type <none> could be located.</b> please choose a conversion type from the list addressbook en <b>No conversion type <none> could be located.</b> Please choose a conversion type from the list
|
||||
@-eval() is only availible to admins!!! addressbook en @-eval() is only availible to admins!!!
|
||||
accounts addressbook en Accounts
|
||||
actions addressbook en Actions
|
||||
add a new contact addressbook en Add a new contact
|
||||
add a single entry by passing the fields. addressbook en Add a single entry by passing the fields.
|
||||
@ -28,6 +29,7 @@ apply the action on the whole query, not only the shown contacts!!! addressbook
|
||||
are you shure you want to delete this contact? addressbook en Are you shure you want to delete this contact?
|
||||
are you sure you want to delete this field? addressbook en Are you sure you want to delete this field?
|
||||
assistent addressbook en Assistent
|
||||
assistent phone addressbook en assistent phone
|
||||
birthday common en Birthday
|
||||
birthdays common en Birthdays
|
||||
blank addressbook en Blank
|
||||
@ -41,17 +43,21 @@ business phone addressbook en Business Phone
|
||||
business state addressbook en Business State
|
||||
business street addressbook en Business Street
|
||||
business zip code addressbook en Business Postal Code
|
||||
calendar uri addressbook en Calendar URI
|
||||
car phone addressbook en Car Phone
|
||||
cell phone addressbook en Mobile phone
|
||||
charset for the csv export addressbook en Charset for the CSV export
|
||||
charset of file addressbook en Charset of file
|
||||
check all addressbook en Check all
|
||||
choose an icon for this contact type admin en Choose an icon for this contact type
|
||||
chosse an etemplate for this contact type admin en Chosse an eTemplate for this contact type
|
||||
city common en City
|
||||
company common en Company
|
||||
company name addressbook en company name
|
||||
configuration common en Configuration
|
||||
contact common en Contact
|
||||
contact application admin en Contact application
|
||||
contact id addressbook en Contact ID
|
||||
contact saved addressbook en Contact saved
|
||||
contact settings admin en Contact Settings
|
||||
copied by %1, from record #%2. addressbook en Copied by %1, from record #%2.
|
||||
@ -88,6 +94,7 @@ enable an extra private addressbook addressbook en Enable an extra private addre
|
||||
enter the path to the exported file here addressbook en Enter the path to the exported file here
|
||||
existing links addressbook en Existing links
|
||||
export addressbook en export
|
||||
export as csv addressbook en Export as CSV
|
||||
export as vcard addressbook en Export as VCard
|
||||
export contacts addressbook en Export Contacts
|
||||
export file name addressbook en Export file name
|
||||
@ -99,8 +106,10 @@ fax number common en Fax Number
|
||||
field %1 has been added ! addressbook en Field %1 has been added !
|
||||
field %1 has been updated ! addressbook en Field %1 has been updated !
|
||||
field name addressbook en Field Name
|
||||
fields for the csv export addressbook en Fields for the CSV export
|
||||
fields to show in address list addressbook en Fields to show in address list
|
||||
fieldseparator addressbook en Fieldseparator
|
||||
freebusy uri addressbook en Freebusy URI
|
||||
full name addressbook en Full Name
|
||||
geo addressbook en GEO
|
||||
global categories addressbook en Global Categories
|
||||
@ -129,6 +138,7 @@ income addressbook en Income
|
||||
international addressbook en International
|
||||
label addressbook en Label
|
||||
last modified addressbook en last modified
|
||||
last modified by addressbook en last modified by
|
||||
ldap context for contacts admin en LDAP context for contacts
|
||||
ldap host for contacts admin en LDAP host for contacts
|
||||
ldap root dn for contacts admin en LDAP root dn for contacts
|
||||
@ -166,6 +176,7 @@ please enter a name for that field ! addressbook en Please enter a name for that
|
||||
please select only one category addressbook en Please select only one category
|
||||
postal common en Postal
|
||||
pref addressbook en pref
|
||||
preferred phone addressbook en preferred phone
|
||||
prefix addressbook en Prefix
|
||||
public key addressbook en Public Key
|
||||
publish into groups: addressbook en Publish into groups:
|
||||
@ -218,6 +229,8 @@ vcards require a last name entry. addressbook en Vcards require a last name entr
|
||||
warning!! ldap is valid only if you are not using contacts for accounts storage! admin en WARNING!! LDAP is valid only if you are NOT using contacts for accounts storage!
|
||||
warning: all contacts found will be deleted! addressbook en WARNING: All contacts found will be deleted!
|
||||
when should the contacts list display that colum. "only if there is content" hides the column, unless there is some content in the view. addressbook en When should the contacts list display that colum. "Only if there is content" hides the column, unless there is some content in the view.
|
||||
which charset should be used for the csv export. the system default is the charset of this egroupware installation. addressbook en Which charset should be used for the CSV export. The system default is the charset of this eGroupWare installation.
|
||||
which fields should be exported. all means every field stored in the addressbook incl. the custom fields. the business or home address only contains name, company and the selected address. addressbook en Which fields should be exported. All means every field stored in the addressbook incl. the custom fields. The business or home address only contains name, company and the selected address.
|
||||
whole query addressbook en whole query
|
||||
work phone addressbook en Work Phone
|
||||
write (update or add) a single entry by passing the fields. addressbook en Write (update or add) a single entry by passing the fields.
|
||||
|
Loading…
Reference in New Issue
Block a user