diff --git a/addressbook/inc/class.bocontacts.inc.php b/addressbook/inc/class.bocontacts.inc.php index 7f71b74546..461c4d80e0 100755 --- a/addressbook/inc/class.bocontacts.inc.php +++ b/addressbook/inc/class.bocontacts.inc.php @@ -909,4 +909,92 @@ class bocontacts extends socontacts } return $success; } + + /** + * Check if user has required rights for a list or list-owner + * + * @param int $list + * @param int $required + * @param int $owner=null + * @return boolean + */ + function check_list($list,$required,$owner=null) + { + if ($list && ($list_data = $this->read_list($list))) + { + $owner = $list_data['list_owner']; + } + return !!($this->grants[$owner] & $required); + } + + /** + * Adds a distribution list + * + * @param string $name list-name + * @param int $owner user- or group-id + * @param array $contacts=array() contacts to add + * @return list_id or false on error + */ + function add_list($name,$owner,$contacts=array()) + { + if (!$this->check_list(null,EGW_ACL_ADD,$owner)) return false; + + return parent::add_list($name,$owner,$contacts); + } + + /** + * Adds one contact to a distribution list + * + * @param int $contact contact_id + * @param int $list list-id + * @return false on error + */ + function add2list($contact,$list) + { + if (!$this->check_list($list,EGW_ACL_EDIT)) return false; + + return parent::add2list($contact,$list); + } + + /** + * Removes one contact from distribution list(s) + * + * @param int $contact contact_id + * @param int $list list-id + * @return false on error + */ + function remove_from_list($contact,$list) + { + if (!$this->check_list($list,EGW_ACL_EDIT)) return false; + + return parent::remove_from_list($contact,$list); + } + + /** + * Deletes a distribution list (incl. it's members) + * + * @param int/array $list list_id(s) + * @return number of members deleted or false if list does not exist + */ + function delete_list($list) + { + if (!$this->ceck_list($list,EGW_ACL_DELETE)) return false; + + return parent::delete_list($list); + } + + /** + * Read data of a distribution list + * + * @param int $list list_id + * @return array of data or false if list does not exist + */ + function read_list($list) + { + static $cache; + + if (isset($cache[$list])) return $cache[$list]; + + return $cache[$list] = parent::read_list($list); + } } diff --git a/addressbook/inc/class.socontacts.inc.php b/addressbook/inc/class.socontacts.inc.php index 688940b079..0e44f9fccb 100755 --- a/addressbook/inc/class.socontacts.inc.php +++ b/addressbook/inc/class.socontacts.inc.php @@ -349,6 +349,9 @@ class socontacts // delete customfields, can return 0 if there are no customfields $this->soextra->delete(array($this->extra_id => $contact)); + // delete from distribution list(s) + $this->remove_from_list($contact); + if ($this->contact_repository == 'sql-ldap') { if ($contact['account_id']) @@ -782,4 +785,106 @@ class socontacts } } } + + /** + * Get the availible distribution lists for a user + * + * @param int $required=EGW_ACL_READ required rights on the list + * @param string $extra_labels=null first labels if given (already translated) + * @return array with id => label pairs or false if backend does not support lists + */ + function get_lists($required=EGW_ACL_READ,$extra_labels=null) + { + if (!method_exists($this->somain,'get_lists')) return false; + + $uids = array(); + foreach($this->grants as $uid => $rights) + { + if ($rights & $required) + { + $uids[] = $uid; + } + } + $lists = is_array($extra_labels) ? $extra_labels : array(); + + foreach($this->somain->get_lists($uids) as $list_id => $data) + { + $lists[$list_id] = $data['list_name']; + if ($data['list_owner'] != $this->user) + { + $lists[$list_id] .= ' ('.$GLOBALS['egw']->common->grab_owner_name($data['list_owner']).')'; + } + } + //echo "
socontacts_sql::get_lists($required,'$extra_label')
\n"; _debug_array($lists); + return $lists; + } + + /** + * Adds a distribution list + * + * @param string $name list-name + * @param int $owner user- or group-id + * @param array $contacts=array() contacts to add + * @return list_id or false on error + */ + function add_list($name,$owner,$contacts=array()) + { + if (!method_exists($this->somain,'add_list')) return false; + + return $this->somain->add_list($name,$owner,$contacts); + } + + /** + * Adds one contact to a distribution list + * + * @param int $contact contact_id + * @param int $list list-id + * @return false on error + */ + function add2list($contact,$list) + { + if (!method_exists($this->somain,'add2list')) return false; + + return $this->somain->add2list($contact,$list); + } + + /** + * Removes one contact from distribution list(s) + * + * @param int $contact contact_id + * @param int $list=null list-id or null to remove from all lists + * @return false on error + */ + function remove_from_list($contact,$list=null) + { + if (!method_exists($this->somain,'remove_from_list')) return false; + + return $this->somain->remove_from_list($contact,$list); + } + + /** + * Deletes a distribution list (incl. it's members) + * + * @param int/array $list list_id(s) + * @return number of members deleted or false if list does not exist + */ + function delete_list($list) + { + if (!method_exists($this->somain,'delete_list')) return false; + + return $this->somain->delete_list($list); + } + + /** + * Read data of a distribution list + * + * @param int $list list_id + * @return array of data or false if list does not exist + */ + function read_list($list) + { + if (!method_exists($this->somain,'read_list')) return false; + + return $this->somain->read_list($list); + } } diff --git a/addressbook/inc/class.socontacts_sql.inc.php b/addressbook/inc/class.socontacts_sql.inc.php index 67de726755..b869548f54 100644 --- a/addressbook/inc/class.socontacts_sql.inc.php +++ b/addressbook/inc/class.socontacts_sql.inc.php @@ -40,6 +40,19 @@ class socontacts_sql extends so_sql */ var $contacts_id='id'; + /** + * Name of the table for distribution lists + * + * @var string + */ + var $lists_table = 'egw_addressbook_lists'; + /** + * Name of the table with the members (contacts) of the distribution lists + * + * @var string + */ + var $ab2list_table = 'egw_addressbook2list'; + function socontacts_sql() { $this->so_sql('phpgwapi','egw_addressbook',null,'contact_'); // calling the constructor of the extended class @@ -300,6 +313,11 @@ class socontacts_sql extends so_sql unset($filter['owner']); } } + if (isset($filter['list'])) + { + $join .= " JOIN $this->ab2list_table ON $this->table_name.contact_id=$this->ab2list_table.contact_id AND list_id=".(int)$filter['list']; + unset($filter['list']); + } return parent::search($criteria,$only_keys,$order_by,$extra_cols,$wildcard,$empty,$op,$start,$filter,$join,$need_full_no_count); } @@ -341,4 +359,123 @@ class socontacts_sql extends so_sql 'contact_owner' => $account_id, ),__LINE__,__FILE__); } + + /** + * Get the availible distribution lists for givens users and groups + * + * @param array $uids user or group id's + * @return array with list_id => array(list_id,list_name,list_owner,...) pairs + */ + function get_lists($uids) + { + $user = $GLOBALS['egw_info']['user']['account_id']; + $this->db->select($this->lists_table,'*',array('list_owner'=>$uids),__LINE__,__FILE__, + false,'ORDER BY list_owner!='.(int)$GLOBALS['egw_info']['user']['account_id'].',list_name'); + + $lists = array(); + while(($row = $this->db->row(true))) + { + $lists[$row['list_id']] = $row; + } + //echo "socontacts_sql::get_lists(".print_r($uids,true).")
\n"; _debug_array($lists); + return $lists; + } + + /** + * Adds a distribution list + * + * @param string $name list-name + * @param int $owner user- or group-id + * @param array $contacts=array() contacts to add + * @return list_id or false on error + */ + function add_list($name,$owner,$contacts=array()) + { + if (!$name || !(int)$owner) return false; + + if (!$this->db->insert($this->lists_table,array( + 'list_name' => $name, + 'list_owner' => $owner, + 'list_created' => time(), + 'list_creator' => $GLOBALS['egw_info']['user']['account_id'], + ),array(),__LINE__,__FILE__)) return false; + + if ((int)($list_id = $this->db->get_last_insert_id($this->lists_table,'list_id')) && $contacts) + { + foreach($contacts as $contact) + { + $this->add2list($list_id,$contact); + } + } + return $list_id; + } + + /** + * Adds one contact to a distribution list + * + * @param int $contact contact_id + * @param int $list list-id + * @return false on error + */ + function add2list($contact,$list) + { + if (!(int)$list || !(int)$contact) return false; + + return $this->db->insert($this->ab2list_table,array( + 'contact_id' => $contact, + 'list_id' => $list, + 'list_added' => time(), + 'list_added_by' => $GLOBALS['egw_info']['user']['account_id'], + ),array(),__LINE__,__FILE__); + } + + /** + * Removes one contact from distribution list(s) + * + * @param int $contact contact_id + * @param int $list=null list-id or null to remove from all lists + * @return false on error + */ + function remove_from_list($contact,$list=null) + { + if (!(int)$list && !is_null($list) || !(int)$contact) return false; + + $where = array( + 'contact_id' => $contact, + ); + if (!is_null($list)) $where['list_id'] = $list; + + return $this->db->delete($this->ab2list_table,$where,__LINE__,__FILE__); + } + + /** + * Deletes a distribution list (incl. it's members) + * + * @param int/array $list list_id(s) + * @return number of members deleted or false if list does not exist + */ + function delete_list($list) + { + if (!$this->db->delete($this->lists_table,array('list_id' => $list),__LINE__,__FILE__)) return false; + + $this->db->delete($this->ab2list_table,array('list_id' => $list),__LINE__,__FILE__); + + return $this->db->affected_rows(); + } + + + /** + * Read data of a distribution list + * + * @param int $list list_id + * @return array of data or false if list does not exist + */ + function read_list($list) + { + if (!$list) return false; + + $this->db->select($this->lists_table,'*',array('list_id'=>$list),__LINE__,__FILE__); + + return $this->db->row(true); + } } \ No newline at end of file diff --git a/addressbook/inc/class.uicontacts.inc.php b/addressbook/inc/class.uicontacts.inc.php index a8f7d8a06c..987e03d4c8 100644 --- a/addressbook/inc/class.uicontacts.inc.php +++ b/addressbook/inc/class.uicontacts.inc.php @@ -102,18 +102,18 @@ class uicontacts extends bocontacts } if ($content['action'] !== '') { - if (!count($content['nm']['rows']['checked']) && !$content['use_all']) + if (!count($content['nm']['rows']['checked']) && !$content['use_all'] && $content['action'] != 'delete_list') { $msg = lang('You need to select some contacts first'); } else { if ($this->action($content['action'],$content['nm']['rows']['checked'],$content['use_all'], - $success,$failed,$action_msg,$content['do_email'] ? 'email' : 'index')) + $success,$failed,$action_msg,$content['do_email'] ? 'email' : 'index',$msg)) { $msg .= lang('%1 contact(s) %2',$success,$action_msg); } - else + elseif(is_null($msg)) { $msg .= lang('%1 contact(s) %2, %3 failed because of insufficent rights !!!',$success,$action_msg,$failed); } @@ -133,6 +133,17 @@ class uicontacts extends bocontacts $org_view = $content['nm']['org_view']; } } + elseif($_GET['add_list']) + { + if (($list = $this->add_list($_GET['add_list'],$_GET['owner']?$_GET['owner']:$this->user))) + { + $msg = lang('List created'); + } + else + { + $msg = lang('List creation failed, no rights!'); + } + } $preserv = array( 'do_email' => $do_email, ); @@ -162,13 +173,29 @@ class uicontacts extends bocontacts 'lettersearch' => true, 'do_email' => $do_email, 'default_cols' => '!cat_id,contact_created_contact_modified', + 'filter2_onchange' => "if(this.value=='add') { add_new_list(document.getElementById(form::name('filter')).value); this.value='';} else this.form.submit();", ); + // if the backend supports distribution lists + if (($sel_options['filter2'] = $this->get_lists(EGW_ACL_READ,array( + '' => lang('Distribution lists').'...', + 'add' => lang('Add a new list').'...', + ))) !== false) + { + $content['nm']['no_filter2'] = false; + } // use the state of the last session stored in the user prefs if (($state = @unserialize($this->prefs[$do_email ? 'email_state' : 'index_state']))) { $content['nm'] = array_merge($content['nm'],$state); } } + if (!$content['nm']['no_filter2'] && !isset($sel_options['filter2'])) + { + $sel_options['filter2'] = $this->get_lists(EGW_ACL_READ,array( + '' => lang('Distribution lists').'...', + 'add' => lang('Add a new list').'...', + )); + } if ($do_email) { if (!$re_submit) @@ -183,13 +210,11 @@ class uicontacts extends bocontacts { $content['nm']['header_left'] = 'addressbook.index.left'; } - $sel_options = array( - 'filter' => $this->get_addressbooks(EGW_ACL_READ,lang('All')), - 'to' => array( - 'to' => 'To', - 'cc' => 'Cc', - 'bcc' => 'Bcc', - ), + $sel_options['filter'] = $this->get_addressbooks(EGW_ACL_READ,lang('All')); + $sel_options['to'] = array( + 'to' => 'To', + 'cc' => 'Cc', + 'bcc' => 'Bcc', ); $sel_options['action'] = array(); if ($do_email) @@ -209,7 +234,20 @@ class uicontacts extends bocontacts { $sel_options['action']['infolog'] = lang('View linked InfoLog entries'); } - $sel_options['action'] += $this->get_addressbooks(EGW_ACL_ADD); + //$sel_options['action'] += $this->get_addressbooks(EGW_ACL_ADD); + foreach($this->get_addressbooks(EGW_ACL_ADD) as $uid => $label) + { + $sel_options['action'][$uid] = lang('Move to addressbook:').' '.$label; + } + if (($add_lists = $this->get_lists(EGW_ACL_EDIT))) // do we have distribution lists? + { + foreach ($add_lists as $list_id => $label) + { + $sel_options['action']['to_list_'.$list_id] = lang('Add to distribution list:').' '.$label; + } + $sel_options['action']['remove_from_list'] = lang('Remove selected contacts from distribution list'); + $sel_options['action']['delete_list'] = lang('Delete selected distribution list!'); + } if (!array_key_exists('importexport',$GLOBALS['egw_info']['user']['apps'])) unset($sel_options['action']['export']); @@ -352,25 +390,29 @@ class uicontacts extends bocontacts * @param string $session_name 'index' or 'email' depending if we are in the main list or the popup * @return boolean true if all actions succeded, false otherwise */ - function action($action,$checked,$use_all,&$success,&$failed,&$action_msg,$session_name) + function action($action,$checked,$use_all,&$success,&$failed,&$action_msg,$session_name,&$msg) { - //echo "uicontacts::action('$action',".print_r($checked,true).','.(int)$use_all.",...)
\n"; + echo "uicontacts::action('$action',".print_r($checked,true).','.(int)$use_all.",...)
\n"; $success = $failed = 0; - if ($use_all) + if ($use_all || in_array($action,array('remove_from_list','delete_list'))) { // get the whole selection $query = $GLOBALS['egw']->session->appsession($session_name,'addressbook'); - $query['num_rows'] = -1; // all - $this->get_rows($query,$checked,$readonlys,true); // true = only return the id's + + if ($use_all) + { + $query['num_rows'] = -1; // all + $this->get_rows($query,$checked,$readonlys,true); // true = only return the id's + } } // replace org_name:* id's with all id's of that org $org_contacts = array(); - foreach($checked as $n => $id) + foreach((array)$checked as $n => $id) { if (substr($id,0,9) == 'org_name:') { - if (count($checked) == 1 && !count($org_contacts)) + if (count($checked) == 1 && !count($org_contacts) && $action == 'infolog') { return $this->infolog_org_view($id); // uses the org-name, instead of 'selected contacts' } @@ -378,13 +420,19 @@ class uicontacts extends bocontacts $query = $GLOBALS['egw']->session->appsession($session_name,'addressbook'); $query['num_rows'] = -1; // all $query['org_view'] = $id; + unset($query['filter2']); $this->get_rows($query,$extra,$readonlys,true); // true = only return the id's if ($extra[0]) $org_contacts = array_merge($org_contacts,$extra); } } if ($org_contacts) $checked = array_unique($checked ? array_merge($checked,$org_contacts) : $org_contacts); //_debug_array($checked); exit; - + + if (substr($action,0,7) == 'to_list') + { + $to_list = (int)substr($action,8); + $action = 'to_list'; + } switch($action) { case 'csv': @@ -433,6 +481,23 @@ class uicontacts extends bocontacts $action_msg = lang('merged'); $checked = array(); // to not start the single actions break; + + case 'delete_list': + if (!$query['filter2']) + { + $msg = lang('You need to select a distribution list'); + } + elseif($this->delete_list($query['filter2']) === false) + { + $msg = lang('Insufficent rights to delete this list!'); + } + else + { + $msg = lang('Distribution list deleted'); + unset($query['filter2']); + $GLOBALS['egw']->session->appsession($session_name,'addressbook',$query); + } + return false; } foreach($checked as $id) { @@ -473,6 +538,32 @@ class uicontacts extends bocontacts $contact['n_fn'] ? $contact['n_fn'].' <'.$contact[$action].'>' : $contact[$action])."');"); } break; + + case 'remove_from_list': + $action_msg = lang('removed from distribution list'); + if (!$query['filter2']) + { + $msg = lang('You need to select a distribution list'); + return false; + } + else + { + $Ok = $this->remove_from_list($id,$query['filter2']) !== false; + } + break; + + case 'to_list': + $action_msg = lang('added to distribution list'); + if (!$to_list) + { + $msg = lang('You need to select a distribution list'); + return false; + } + else + { + $Ok = $this->add2list($id,$to_list) !== false; + } + break; default: // move to an other addressbook if (!is_numeric($action) || !($this->grants[(string) (int) $action] & EGW_ACL_EDIT)) // might be ADD in the future @@ -601,8 +692,19 @@ class uicontacts extends bocontacts $query['col_filter']['private'] = substr($query['filter'],-1) == 'p' ? 1 : 0; } } + if ((int)$query['filter2']) // not no distribution list + { + $query['col_filter']['list'] = (string) (int) $query['filter2']; + } + else + { + unset($query['col_filter']['list']); + } if (isset($this->org_views[(string) $query['org_view']])) // we have an org view { + unset($query['col_filter']['list']); // does not work together + $query['no_filter2'] = true; // switch the distribution list selection off + $query['template'] = 'addressbook.index.org_rows'; if ($query['order'] != 'org_name') @@ -1559,6 +1661,18 @@ $readonlys['button[vcard]'] = true; use_all.checked = false; return false; } + + function add_new_list(owner) + { + var name = window.prompt("'.lang('Name for the distribution list').'"); + if (name) + { + document.location.href = "'.$GLOBALS['egw']->link('/index.php',array( + 'menuaction'=>'addressbook.uicontacts.index', + 'add_list'=>'', + )).'"+encodeURIComponent(name)+"&owner="+owner; + } + } '; } diff --git a/addressbook/setup/phpgw_de.lang b/addressbook/setup/phpgw_de.lang index 723af9e460..43cb3d2459 100644 --- a/addressbook/setup/phpgw_de.lang +++ b/addressbook/setup/phpgw_de.lang @@ -14,8 +14,11 @@ actions addressbook de Befehle add %1 addressbook de %1 hinzufügen add a contact to this organisation addressbook de Einen Kontakt zu dieser Organisation hinzufügen add a new contact addressbook de Neuen Kontakt anlegen +add a new list addressbook de Neuen Verteiler hinzfügen add a single entry by passing the fields. addressbook de Hinzufügen eines einzelnen Eintrags durch Übergeben der Felder. add custom field addressbook de Benutzerdefiniertes Feld hinzufügen +add to distribution list: addressbook de Hinzufügen zu Verteiler: +added to distribution list addressbook de hinzugefügt zum Verteiler additional information about using ldap as contact repository admin de Zusätzliche Information über die Nutzung von LDAP zum Speichern der Kontakte address book common de Adressbuch address book - vcard in addressbook de Adressbuch - VCard in @@ -93,6 +96,7 @@ debug output in browser addressbook de Debugausgaben in Browser default addressbook for adding contacts addressbook de Vorgabe Adressbuch beim Hinzufügen von Kontakten default filter addressbook de Standardfilter delete a single entry by passing the id. addressbook de Löscht einen einzelnen Eintrag durch Übergabe seiner ID. +delete selected distribution list! addressbook de Löscht die ausgewählten Verteilerliste! delete this contact addressbook de Diesen Kontakt löschen delete this organisation including all its contacts addressbook de Diese Organisation einschließlich ALLER Kontakte löschen deleted addressbook de gelöscht @@ -100,6 +104,8 @@ deletes the photo addressbook de L department common de Abteilung departments addressbook de Abteilungen displays a remider for birthdays on the startpage (page you get when you enter egroupware or click on the homepage icon). addressbook de Zeigt auf der Startseite eine Geburtstags Erinnerung an. Die Startseite ist die Seite die Sie sehen, wenn Sie eGroupWare betreten oder auf das Startseiten Icon (Haus) klicken. +distribution list deleted addressbook de Verteiler gelöscht +distribution lists addressbook de Verteilerlisten do you want a private addressbook, which can not be viewed by users, you grant access to your personal addressbook? addressbook de Wollen Sie ein privates Adressbuch, dass nicht von Benutzern einsehbar ist, denen Sie Zugriff auf Ihr persönliches Adressbuch gegeben haben? do your really want to delete this contact? addressbook de Wollen sie diesen Kontakt wirklich löschen? doesn't matter addressbook de egal @@ -169,6 +175,7 @@ import next set addressbook de N import_instructions addressbook de In Netscape, öffnen Sie das Adressbuch und wählen Sie Exportieren aus dem Datei Menü aus. Die Dateien werden im LDIF Formaz exportiert.In Outlook wählen Sie den Ordner Kontakte aus, wählen Sie Importieren und Exportieren...
aus dem Datei Menü aus und Exportieren Sie die Kontakte als eine CSV Datei.In Palm Desktop 4.0 oder größer, öffnen Sie Ihr Adressbuch und wählen Sie Export aus dem Datei-Menü aus. Die Datei wird im VCard-Format exportiert. in %1 days (%2) is %3's birthday. addressbook de In %1 Tagen (%2) ist der Geburtstag von %3. income addressbook de Einkommen +insufficent rights to delete this list! addressbook de Keine Rechte diese Liste zu löschen! international addressbook de International label addressbook de Adressetikett last modified addressbook de Letzte Änderung @@ -182,6 +189,8 @@ link title for contacts show addressbook de Titel der Verkn links addressbook de Verknüpfungen list all categories addressbook de Liste alle Kategorien list all customfields addressbook de Liste alle benutzerdefinierten Felder +list created addressbook de Verteiler erzeugt +list creation failed, no rights! addressbook de Verteiler erzeugen fehlgeschlagen, keine Rechte! load vcard addressbook de VCard laden locations addressbook de Standorte mark records as private addressbook de Eintrag als Privat kennzeichnen @@ -195,8 +204,10 @@ mobile addressbook de Mobil mobile phone addressbook de Mobiltelefon modem phone addressbook de Modem more ... addressbook de Mehr ... +move to addressbook: addressbook de Verschiebe ins Adressbuch: moved addressbook de verschoben multiple vcard addressbook de Mehrere VCards +name for the distribution list addressbook de Name für die Verteilerliste name, address addressbook de Name, Adresse no vcard addressbook de Keine VCard number addressbook de Nummer @@ -229,6 +240,8 @@ read a single entry by passing the id and fieldlist. addressbook de Liest einen read only addressbook de nur lesend record access addressbook de Zugriffsrechte record owner addressbook de Datensatzeigentümer +remove selected contacts from distribution list addressbook de Ausgewählte Kontakte vom Verteiler löschen +removed from distribution list addressbook de vom Verteiler gelöscht role addressbook de Funktion room addressbook de Raum search for '%1' addressbook de Suche nach '%1' @@ -299,6 +312,7 @@ you are not permittet to view this contact addressbook de Sie haben nicht die Be you can only use ldap as contact repository if the accounts are stored in ldap too! admin de Sie können LDAP nur dann zum Speichern von Kontakten verwenden, wenn die Benutzerkonten auch in LDAP gespeichert sind! you must select a vcard. (*.vcf) addressbook de Sie müssen eine VCard auswählen (*.vcf) you must select at least 1 column to display addressbook de Sie müssen mindestens eine Spalte zum Anzeigen auswählen +you need to select a distribution list addressbook de Sie müssen eine Verteilerliste auswählen you need to select some contacts first addressbook de Sie müssen zuerst Kontakte auswählen zip code common de PLZ zip_note addressbook de
Notiz:Die Datei kann ein zip Archiv sein, bestehend aus .csv, .vcf oder .ldif Dateien. Sie dürfen die Dateitypen pro Import nicht mischen! diff --git a/addressbook/setup/phpgw_en.lang b/addressbook/setup/phpgw_en.lang index 90162b6f5d..e4be973931 100644 --- a/addressbook/setup/phpgw_en.lang +++ b/addressbook/setup/phpgw_en.lang @@ -14,8 +14,11 @@ actions addressbook en Actions add %1 addressbook en Add %1 add a contact to this organisation addressbook en Add a contact to this organisation add a new contact addressbook en Add a new contact +add a new list addressbook en Add a new list add a single entry by passing the fields. addressbook en Add a single entry by passing the fields. add custom field addressbook en Add Custom Field +add to distribution list: addressbook en Add to distribution list: +added to distribution list addressbook en added to distribution list additional information about using ldap as contact repository admin en Additional information about using LDAP as contact repository address book common en Address Book address book - vcard in addressbook en Address book - VCard in @@ -93,6 +96,7 @@ debug output in browser addressbook en Debug output in browser default addressbook for adding contacts addressbook en Default addressbook for adding contacts default filter addressbook en Default Filter delete a single entry by passing the id. addressbook en Delete a single entry by passing the id. +delete selected distribution list! addressbook en Delete selected distribution list! delete this contact addressbook en Delete this contact delete this organisation including all its contacts addressbook en Delete this organisation including ALL its contacts deleted addressbook en deleted @@ -100,6 +104,8 @@ deletes the photo addressbook en Deletes the photo department common en Department departments addressbook en departments displays a remider for birthdays on the startpage (page you get when you enter egroupware or click on the homepage icon). addressbook en Displays a remider for birthdays on the startpage (page you get when you enter eGroupWare or click on the homepage icon). +distribution list deleted addressbook en Distribution list deleted +distribution lists addressbook en Distribution lists do you want a private addressbook, which can not be viewed by users, you grant access to your personal addressbook? addressbook en Do you want a private addressbook, which can not be viewed by users, you grant access to your personal addressbook? do your really want to delete this contact? addressbook en Do your really want to delete this contact? doesn't matter addressbook en doesn't matter @@ -169,6 +175,7 @@ import next set addressbook en Import next set import_instructions addressbook en In Netscape, open the Addressbook and select Export from the File menu. The file exported will be in LDIF format.
Or, in Outlook, select your Contacts folder, select Import and Export... from the File menu and export your contacts into a comma separated text (CSV) file.
Or, in Palm Desktop 4.0 or greater, visit your addressbook and select Export from the File menu. The file exported will be in VCard format. in %1 days (%2) is %3's birthday. addressbook en In %1 days (%2) is %3's birthday. income addressbook en Income +insufficent rights to delete this list! addressbook en Insufficent rights to delete this list! international addressbook en International label addressbook en Label last modified addressbook en last modified @@ -182,6 +189,8 @@ link title for contacts show addressbook en Link title for contacts show links addressbook en Links list all categories addressbook en List all categories list all customfields addressbook en List all customfields +list created addressbook en List created +list creation failed, no rights! addressbook en List creation failed, no rights! load vcard addressbook en Load VCard locations addressbook en locations mark records as private addressbook en Mark records as private @@ -195,8 +204,10 @@ mobile addressbook en Mobile mobile phone addressbook en Mobile Phone modem phone addressbook en Modem Phone more ... addressbook en More ... +move to addressbook: addressbook en Move to addressbook: moved addressbook en moved multiple vcard addressbook en Multiple VCard +name for the distribution list addressbook en Name for the distribution list name, address addressbook en Name, Address no vcard addressbook en No VCard number addressbook en Number @@ -229,6 +240,8 @@ read a single entry by passing the id and fieldlist. addressbook en Read a singl read only addressbook en read only record access addressbook en Record Access record owner addressbook en Record owner +remove selected contacts from distribution list addressbook en Remove selected contacts from distribution list +removed from distribution list addressbook en removed from distribution list role addressbook en Role room addressbook en Room search for '%1' addressbook en Search for '%1' @@ -299,6 +312,7 @@ you are not permittet to view this contact addressbook en you are not permittet you can only use ldap as contact repository if the accounts are stored in ldap too! admin en You can only use LDAP as contact repository if the accounts are stored in LDAP too! you must select a vcard. (*.vcf) addressbook en You must select a vcard. (*.vcf) you must select at least 1 column to display addressbook en You must select at least 1 column to display +you need to select a distribution list addressbook en You need to select a distribution list you need to select some contacts first addressbook en You need to select some contacts first zip code common en ZIP Code zip_note addressbook en
Note: The file may be a zip file collection of .csv, .vcf, or .ldif files. However, do not mix file types per import. diff --git a/phpgwapi/setup/tables_current.inc.php b/phpgwapi/setup/tables_current.inc.php index b38f38c131..8e54a7dce3 100644 --- a/phpgwapi/setup/tables_current.inc.php +++ b/phpgwapi/setup/tables_current.inc.php @@ -523,5 +523,30 @@ 'fk' => array(), 'ix' => array(), 'uc' => array() + ), + 'egw_addressbook_lists' => array( + 'fd' => array( + 'list_id' => array('type' => 'auto','nullable' => False), + 'list_name' => array('type' => 'varchar','precision' => '80','nullable' => False), + 'list_owner' => array('type' => 'int','precision' => '4','nullable' => False), + 'list_created' => array('type' => 'int','precision' => '8'), + 'list_creator' => array('type' => 'int','precision' => '4') + ), + 'pk' => array('list_id'), + 'fk' => array(), + 'ix' => array(), + 'uc' => array(array('list_owner','list_name')) + ), + 'egw_addressbook2list' => array( + 'fd' => array( + 'contact_id' => array('type' => 'int','precision' => '4','nullable' => False), + 'list_id' => array('type' => 'int','precision' => '4','nullable' => False), + 'list_added' => array('type' => 'int','precision' => '8'), + 'list_added_by' => array('type' => 'int','precision' => '4') + ), + 'pk' => array('ab_id','list_id'), + 'fk' => array(), + 'ix' => array(), + 'uc' => array() ) ); diff --git a/phpgwapi/setup/tables_update.inc.php b/phpgwapi/setup/tables_update.inc.php index b26ca6d95a..7ea134e573 100644 --- a/phpgwapi/setup/tables_update.inc.php +++ b/phpgwapi/setup/tables_update.inc.php @@ -712,4 +712,45 @@ # 1.4 Beta 3 return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.3.017'; } + + + $test[] = '1.3.017'; + function phpgwapi_upgrade1_3_017() + { + $GLOBALS['egw_setup']->oProc->CreateTable('egw_addressbook_lists',array( + 'fd' => array( + 'list_id' => array('type' => 'auto','nullable' => False), + 'list_name' => array('type' => 'varchar','precision' => '80','nullable' => False), + 'list_owner' => array('type' => 'int','precision' => '4','nullable' => False), + 'list_created' => array('type' => 'int','precision' => '8'), + 'list_creator' => array('type' => 'int','precision' => '4') + ), + 'pk' => array('list_id'), + 'fk' => array(), + 'ix' => array(), + 'uc' => array(array('list_owner','list_name')) + )); + + return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.3.018'; + } + + + $test[] = '1.3.018'; + function phpgwapi_upgrade1_3_018() + { + $GLOBALS['egw_setup']->oProc->CreateTable('egw_addressbook2list',array( + 'fd' => array( + 'contact_id' => array('type' => 'int','precision' => '4','nullable' => False), + 'list_id' => array('type' => 'int','precision' => '4','nullable' => False), + 'list_added' => array('type' => 'int','precision' => '8'), + 'list_added_by' => array('type' => 'int','precision' => '4') + ), + 'pk' => array('contact_id','list_id'), + 'fk' => array(), + 'ix' => array(), + 'uc' => array() + )); + + return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.3.019'; + } ?>