fix bug found by sven kloeckner: addressbook does not work, when template is not set correctly in customfields section

This commit is contained in:
Cornelius Weiß 2007-06-17 13:15:13 +00:00
parent cc3116c847
commit 3de717157c
3 changed files with 15 additions and 7 deletions

View File

@ -1331,8 +1331,13 @@ class uicontacts extends bocontacts
if ($content['private']) $content['owner'] .= 'p';
$GLOBALS['egw_info']['flags']['include_xajax'] = true;
$this->tmpl->read($this->content_types[$content['tid']]['options']['template']);
if (!$this->tmpl->read($this->content_types[$content['tid']]['options']['template']))
{
$content['msg'] = lang('WARNING: Template "%1" not found, using default template instead.', $this->content_types[$content['tid']]['options']['template'])."\n";
$content['msg'] .= lang('Please update the templatename in your customfields section!');
$this->tmpl->read('addressbook.edit');
}
return $this->tmpl->exec('addressbook.uicontacts.edit',$content,$sel_options,$readonlys,$content, 2);
}
@ -1510,13 +1515,12 @@ $readonlys['button[vcard]'] = true;
{
$content['no_tid'] = true;
}
/* Conny: what's that?
foreach(explode(',',$content['published_groups']) as $id)
if (!$this->tmpl->read($this->content_types[$content['tid']]['options']['template']))
{
$sel_options['published_groups'][$id] = $GLOBALS['egw']->accounts->id2name($id);
$content['msg'] = lang('WARNING: Template "%1" not found, using default template instead.', $this->content_types[$content['tid']]['options']['template'])."\n";
$content['msg'] .= lang('Please update the templatename in your customfields section!');
$this->tmpl->read('addressbook.edit');
}
*/
$this->tmpl->read($this->content_types[$content['tid']]['options']['template']);
foreach(array('email','email_home','url','url_home') as $name)
{
if ($content[$name] )

View File

@ -246,6 +246,7 @@ phone numbers common de Telefonnummern
photo addressbook de Foto
please enter a name for that field ! addressbook de Bitte geben sie einen Namen für das Feld an!
please select only one category addressbook de Bitte nur eine Kategorie auswählen
please update the templatename in your customfields section! addressbook de Passen Sie bitte in der Sektion "Benutzerdefinierte Felder" Ihren Templatenamen an!
postal common de Postanschrift
pref addressbook de präf
preferred phone addressbook de präferierte Telefonnummer
@ -320,6 +321,7 @@ verification addressbook de Verifikation
view linked infolog entries addressbook de Verknüpfte InfoLog Einträge anzeigen
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!
warning: template "%1" not found, using default template instead. addressbook de WARNUNG: Template "%1" nicht gefunden, das Standard-Template wird stattdessen benutzt.
what should links to the addressbook display in other applications. empty values will be left out. you need to log in anew, if you change this setting! addressbook de Was sollen Verknüpfungen zum Adressbuch in anderen Anwendungen anzeigen. Leere Werte werden ausgelassen. Sie müssen sich neu anmelden, wenn Sie hier eine Änderung vornehmen!
which address format should the addressbook use for countries it does not know the address format. if the address format of a country is known, it uses it independent of this setting. addressbook de Welches Format soll das Adressbuch für Adressen verwenden deren landesübliches Adressformat unbekannt ist. Wenn das Adressformat eines Landes dem Adressbuch bekannt ist, wird das unabhänig von dieser Einstellung benutzt.
which addressbook should be selected when adding a contact and you have no add rights to the current addressbook. addressbook de Welches Adressbuch soll ausgewählt sein beim Hinzufügen von Kontakten, wenn Sie keine Hinzufügen Rechte zum aktuellen Adressbuch haben.

View File

@ -246,6 +246,7 @@ phone numbers common en Phone Numbers
photo addressbook en Photo
please enter a name for that field ! addressbook en Please enter a name for that field !
please select only one category addressbook en Please select only one category
please update the templatename in your customfields section! addressbook en Please update the templatename in your customfields section!
postal common en Postal
pref addressbook en pref
preferred phone addressbook en preferred phone
@ -320,6 +321,7 @@ verification addressbook en Verification
view linked infolog entries addressbook en View linked InfoLog entries
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!
warning: template "%1" not found, using default template instead. addressbook en WARNING: Template "%1" not found, using default template instead.
what should links to the addressbook display in other applications. empty values will be left out. you need to log in anew, if you change this setting! addressbook en What should links to the addressbook display in other applications. Empty values will be left out. You need to log in anew, if you change this setting!
which address format should the addressbook use for countries it does not know the address format. if the address format of a country is known, it uses it independent of this setting. addressbook en Which address format should the addressbook use for countries it does not know the address format. If the address format of a country is known, it uses it independent of this setting.
which addressbook should be selected when adding a contact and you have no add rights to the current addressbook. addressbook en Which addressbook should be selected when adding a contact AND you have no add rights to the current addressbook.