diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-06-29 17:15:08 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-06-29 17:15:08 +0000 |
| commit | 9720be10a00d9716fcb4dd117ddfa3e8f13ff6d4 (patch) | |
| tree | 5f2f3d36fa483cdc5956457e2da65e7781bcb80f /roundcubemail/program | |
| parent | d336e0d764b2eede3e6692ff26fdf32f3a5ca183 (diff) | |
- Fixed link to contact photo, when browsing the search results (#1487980)
git-svn-id: https://svn.roundcube.net/trunk@4892 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
| -rw-r--r-- | roundcubemail/program/steps/addressbook/edit.inc | 1 | ||||
| -rw-r--r-- | roundcubemail/program/steps/addressbook/func.inc | 4 | ||||
| -rw-r--r-- | roundcubemail/program/steps/addressbook/show.inc | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/roundcubemail/program/steps/addressbook/edit.inc b/roundcubemail/program/steps/addressbook/edit.inc index 05572de2b..39161127c 100644 --- a/roundcubemail/program/steps/addressbook/edit.inc +++ b/roundcubemail/program/steps/addressbook/edit.inc @@ -53,6 +53,7 @@ else { $CONTACTS = rcmail_contact_source($source, true); } +$SOURCE_ID = $source; function rcmail_get_edit_record() { diff --git a/roundcubemail/program/steps/addressbook/func.inc b/roundcubemail/program/steps/addressbook/func.inc index 2cb2b8a93..d0be00dbb 100644 --- a/roundcubemail/program/steps/addressbook/func.inc +++ b/roundcubemail/program/steps/addressbook/func.inc @@ -619,7 +619,7 @@ function rcmail_contact_form($form, $record, $attrib = null) function rcmail_contact_photo($attrib) { - global $CONTACTS, $CONTACT_COLTYPES, $RCMAIL, $CONFIG; + global $SOURCE_ID, $CONTACTS, $CONTACT_COLTYPES, $RCMAIL, $CONFIG; if (!$CONTACT_COLTYPES['photo']) return ''; @@ -634,7 +634,7 @@ function rcmail_contact_photo($attrib) if (strpos($record['photo'], 'http:') === 0) $photo_img = $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 $ff_value = '-del-'; // will disable delete-photo action diff --git a/roundcubemail/program/steps/addressbook/show.inc b/roundcubemail/program/steps/addressbook/show.inc index 36aff3141..fc983e60b 100644 --- a/roundcubemail/program/steps/addressbook/show.inc +++ b/roundcubemail/program/steps/addressbook/show.inc @@ -25,7 +25,8 @@ $source = key($cids); $cid = array_shift($cids[$source]); // Initialize addressbook source -$CONTACTS = rcmail_contact_source($source, true); +$CONTACTS = rcmail_contact_source($source, true); +$SOURCE_ID = $source; // read contact record if ($cid && ($record = $CONTACTS->get_record($cid, true))) { |
