diff --git a/addressbook/inc/class.addressbook_ui.inc.php b/addressbook/inc/class.addressbook_ui.inc.php index 41d88d339f..6d5588c2b1 100644 --- a/addressbook/inc/class.addressbook_ui.inc.php +++ b/addressbook/inc/class.addressbook_ui.inc.php @@ -1710,7 +1710,11 @@ window.egw_LAB.wait(function() { { case 'save': case 'apply': - if ($content['delete_photo']) $content['jpegphoto'] = null; + if ($content['delete_photo']) + { + $content['jpegphoto'] = null; + unset($content['delete_photo']); + } if (is_array($content['upload_photo']) && !empty($content['upload_photo']['tmp_name']) && $content['upload_photo']['tmp_name'] != 'none' && ($f = fopen($content['upload_photo']['tmp_name'],'r'))) @@ -1868,7 +1872,6 @@ window.egw_LAB.wait(function() { { $view = true; } - $content['jpegphoto'] = !empty($content['jpegphoto']); // unused and messes up json encoding (not utf-8) } else // not found { @@ -2093,6 +2096,7 @@ window.egw_LAB.wait(function() { // allow other apps to add tabs to addressbook edit $preserve = $content; + $content['jpegphoto'] = !empty($content['jpegphoto']); // unused and messes up json encoding (not utf-8) $this->tmpl->setElementAttribute('tabs', 'add_tabs', true); $tabs =& $this->tmpl->getElementAttribute('tabs', 'tabs'); if (true) $tabs = array();