* Addressbook: fix photo was lost when non-admin user edited own account

This commit is contained in:
Ralf Becker 2019-02-20 17:07:28 +01:00
parent a2e62e6262
commit f9dd120d32
2 changed files with 2 additions and 3 deletions

View File

@ -2511,8 +2511,7 @@ window.egw_LAB.wait(function() {
// allow other apps to add tabs to addressbook edit
$preserve = $content;
unset($preserve['jpegphoto']);
$content['jpegphoto'] = !empty($content['jpegphoto']); // unused and messes up json encoding (not utf-8)
unset($preserve['jpegphoto'], $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 (($first_call = !isset($tabs)))

View File

@ -349,7 +349,7 @@
<row class="dialogHeader">
<box align="center">
<hbox disabled="@hidebuttons" class="avatar">
<avatar contact_id="$cont[id]" crop="false" editable="true"/>
<avatar contact_id="$cont[id]" src="$cont[photo]" crop="false" editable="true"/>
</hbox>
</box>
<textbox id="n_fn" blur="Name" no_lang="1" tabindex="-1" class="cursorHand et2_fullWidth" onclick="jQuery('table.editname').css('display','inline'); var focElem = document.getElementById(form::name('n_prefix')); if (!(typeof(focElem) == 'undefined') &amp;&amp; typeof(focElem.focus)=='function') document.getElementById(form::name('n_prefix')).focus();" autocomplete="name"/>