fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [15704] Property: fix link to thumbs


From: sigurdne
Subject: [Fmsystem-commits] [15704] Property: fix link to thumbs
Date: Tue, 20 Sep 2016 10:44:09 +0000 (UTC)

Revision: 15704
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15704
Author:   sigurdne
Date:     2016-09-20 10:44:09 +0000 (Tue, 20 Sep 2016)
Log Message:
-----------
Property: fix link to thumbs

Modified Paths:
--------------
    trunk/property/inc/class.bogallery.inc.php

Modified: trunk/property/inc/class.bogallery.inc.php
===================================================================
--- trunk/property/inc/class.bogallery.inc.php  2016-09-20 10:43:07 UTC (rev 
15703)
+++ trunk/property/inc/class.bogallery.inc.php  2016-09-20 10:44:09 UTC (rev 
15704)
@@ -116,18 +116,6 @@
 
                public function read( $data = array() )
                {
-                       //$dry_run=''
-                       //$data = array()
-                       //$start_date   = 
phpgwapi_datetime::date_to_timestamp($this->start_date);
-                       //$end_date     = 
phpgwapi_datetime::date_to_timestamp($this->end_date);
-//                     $valid_locations = $this->get_gallery_location();
-//            //echo '<pre>'; print_r($valid_locations);echo '</pre>';
-//            array_unshift($data['valid_locations'],$valid_locations);
-//                     $values = $this->so->read(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
-//                     'allrows'=>$this->allrows, 'location_id' => 
$this->location_id, 'user_id' => $this->user_id,
-//                     'mime_type' => $this->mime_type, 'start_date' => 
$start_date, 'end_date' => $end_date,
-//                     'cat_id' => $this->cat_id, 'valid_locations' => 
$valid_locations, 'dry_run'=>$dry_run));
-
                        $values = $this->so->read($data);
 
                        $img_types = array
@@ -150,8 +138,15 @@
                                $entry['img_id'] = '';
                                if (in_array($entry['mime_type'], $img_types))
                                {
-                                       $entry['img_id'] = "img-{$i}";
-                                       $i++;
+                                       $entry['img_id'] = $entry['id'];
+                                       $entry['file_name'] = $entry['name'];
+                                       $entry['img_url'] = 
$GLOBALS['phpgw']->link('/index.php', array(
+                                                       'menuaction' => 
'property.uigallery.view_file',
+                                                       'img_id' => 
$entry['img_id'],
+                                                       'file' => 
"{$entry['directory']}/{$entry['file_name']}"
+                                               )
+                                       );
+                                       $entry['thumbnail_flag'] = 'thumb=1';
                                }
 
                                $entry['date'] = 
$GLOBALS['phpgw']->common->show_date(strtotime($entry['created']), $dateformat);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]