From 31c0700959386a1218a8e1f4d88641197fada63f Mon Sep 17 00:00:00 2001 From: Ryu Date: Wed, 30 Sep 2009 21:51:26 +0200 Subject: [PATCH] Fix bug #8523 - Photo attribute is corrupted after a move or a copy Signed-off-by: Jan Schneider --- turba/lib/View/Browse.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/turba/lib/View/Browse.php b/turba/lib/View/Browse.php index 09d6df5ad..20cf7e1ec 100644 --- a/turba/lib/View/Browse.php +++ b/turba/lib/View/Browse.php @@ -191,7 +191,10 @@ class Turba_View_Browse { foreach ($targetDriver->getCriteria() as $info_key => $info_val) { if (!is_array($targetDriver->map[$info_key]) || isset($targetDriver->map[$info_key]['attribute'])) { - $objAttributes[$info_key] = $object->getValue($info_key); + $objectValue = $object->getValue($info_key); + + // get 'data' value if object type is image. Get the direct value in other case. + $objAttributes[$info_key] = ($GLOBALS['attributes'][$info_key]['type'] == 'image') ? $objectValue['load']['data'] : $objectValue; } } unset($objAttributes['__owner']); -- 2.11.0