[Svn] r4892 - trunk/roundcubemail/program/steps/addressbook

trac at roundcube.net trac at roundcube.net
Wed Jun 29 19:15:09 CEST 2011


Author: alec
Date: 2011-06-29 12:15:08 -0500 (Wed, 29 Jun 2011)
New Revision: 4892

Modified:
   trunk/roundcubemail/program/steps/addressbook/edit.inc
   trunk/roundcubemail/program/steps/addressbook/func.inc
   trunk/roundcubemail/program/steps/addressbook/show.inc
Log:
- Fixed link to contact photo, when browsing the search results (#1487980)


Modified: trunk/roundcubemail/program/steps/addressbook/edit.inc
===================================================================
--- trunk/roundcubemail/program/steps/addressbook/edit.inc	2011-06-29 16:57:26 UTC (rev 4891)
+++ trunk/roundcubemail/program/steps/addressbook/edit.inc	2011-06-29 17:15:08 UTC (rev 4892)
@@ -53,6 +53,7 @@
     $CONTACTS = rcmail_contact_source($source, true);
 }
 
+$SOURCE_ID = $source;
 
 function rcmail_get_edit_record()
 {

Modified: trunk/roundcubemail/program/steps/addressbook/func.inc
===================================================================
--- trunk/roundcubemail/program/steps/addressbook/func.inc	2011-06-29 16:57:26 UTC (rev 4891)
+++ trunk/roundcubemail/program/steps/addressbook/func.inc	2011-06-29 17:15:08 UTC (rev 4892)
@@ -619,7 +619,7 @@
 
 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 @@
     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
 

Modified: trunk/roundcubemail/program/steps/addressbook/show.inc
===================================================================
--- trunk/roundcubemail/program/steps/addressbook/show.inc	2011-06-29 16:57:26 UTC (rev 4891)
+++ trunk/roundcubemail/program/steps/addressbook/show.inc	2011-06-29 17:15:08 UTC (rev 4892)
@@ -25,7 +25,8 @@
 $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))) {

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list