- Fixed link to contact photo, when browsing the search results (#1487980)

release-0.6
alecpl 14 years ago
parent 77406bb731
commit c3dabfad7a

@ -53,6 +53,7 @@ else {
$CONTACTS = rcmail_contact_source($source, true); $CONTACTS = rcmail_contact_source($source, true);
} }
$SOURCE_ID = $source;
function rcmail_get_edit_record() function rcmail_get_edit_record()
{ {

@ -619,7 +619,7 @@ function rcmail_contact_form($form, $record, $attrib = null)
function rcmail_contact_photo($attrib) function rcmail_contact_photo($attrib)
{ {
global $CONTACTS, $CONTACT_COLTYPES, $RCMAIL, $CONFIG; global $SOURCE_ID, $CONTACTS, $CONTACT_COLTYPES, $RCMAIL, $CONFIG;
if (!$CONTACT_COLTYPES['photo']) if (!$CONTACT_COLTYPES['photo'])
return ''; return '';
@ -634,7 +634,7 @@ function rcmail_contact_photo($attrib)
if (strpos($record['photo'], 'http:') === 0) if (strpos($record['photo'], 'http:') === 0)
$photo_img = $record['photo']; $photo_img = $record['photo'];
else if ($record['photo']) else if ($record['photo'])
$photo_img = $RCMAIL->url(array('_action' => 'photo', '_cid' => $record['ID'], '_source' => $_REQUEST['_source'])); $photo_img = $RCMAIL->url(array('_action' => 'photo', '_cid' => $record['ID'], '_source' => $SOURCE_ID));
else else
$ff_value = '-del-'; // will disable delete-photo action $ff_value = '-del-'; // will disable delete-photo action

@ -26,6 +26,7 @@ $cid = array_shift($cids[$source]);
// Initialize addressbook source // Initialize addressbook source
$CONTACTS = rcmail_contact_source($source, true); $CONTACTS = rcmail_contact_source($source, true);
$SOURCE_ID = $source;
// read contact record // read contact record
if ($cid && ($record = $CONTACTS->get_record($cid, true))) { if ($cid && ($record = $CONTACTS->get_record($cid, true))) {

Loading…
Cancel
Save