fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [15596] property: get by file_id


From: sigurdne
Subject: [Fmsystem-commits] [15596] property: get by file_id
Date: Tue, 6 Sep 2016 11:25:11 +0000 (UTC)

Revision: 15596
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15596
Author:   sigurdne
Date:     2016-09-06 11:25:11 +0000 (Tue, 06 Sep 2016)
Log Message:
-----------
property: get by file_id

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

Modified: trunk/property/inc/class.uigallery.inc.php
===================================================================
--- trunk/property/inc/class.uigallery.inc.php  2016-09-06 11:24:19 UTC (rev 
15595)
+++ trunk/property/inc/class.uigallery.inc.php  2016-09-06 11:25:11 UTC (rev 
15596)
@@ -147,14 +147,24 @@
                        }
 
                        $location_info = $this->bo->get_location($directory);
-
                        if (!$this->acl->check($location_info['location'], 
PHPGW_ACL_READ, 'property'))
                        {
                                echo 'sorry - no access';
                                $GLOBALS['phpgw']->common->phpgw_exit();
                        }
 
+                       $img_id = phpgw::get_var('img_id', 'int');
+
                        $bofiles = CreateObject('property.bofiles');
+
+                       if($img_id)
+                       {
+                               $file_info = $bofiles->vfs->get_info($img_id);
+                               $file = 
"{$file_info['directory']}/{$file_info['name']}";
+                       }
+
+
+
                        $source = "{$bofiles->rootdir}{$file}";
                        $thumbfile = "$source.thumb";
 
@@ -179,6 +189,10 @@
                                $this->create_thumb($source, $thumbfile, 
$thumb_size = 100);
                                readfile($thumbfile);
                        }
+                       else if ($img_id)
+                       {
+                               $bofiles->get_file($img_id);
+                       }
                        else
                        {
                                $bofiles->view_file('', $file);




reply via email to

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