aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Storage/Browser.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-11-01 12:08:59 +0100
committerMario Vavti <mario@mariovavti.com>2017-11-01 12:08:59 +0100
commit11cdc36bcc7414002c2e72fd0c45d285d9515f0c (patch)
treeffcb15dd536800b67c9918756e41bb4accde3320 /Zotlabs/Storage/Browser.php
parentb28ff509b1f7c95ac723fb1b2a20929da2ba7d3d (diff)
parent22d45a8d1ecfa0a0a2b8429ec3233e7099e84b66 (diff)
downloadvolse-hubzilla-11cdc36bcc7414002c2e72fd0c45d285d9515f0c.tar.gz
volse-hubzilla-11cdc36bcc7414002c2e72fd0c45d285d9515f0c.tar.bz2
volse-hubzilla-11cdc36bcc7414002c2e72fd0c45d285d9515f0c.zip
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'Zotlabs/Storage/Browser.php')
-rw-r--r--Zotlabs/Storage/Browser.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/Zotlabs/Storage/Browser.php b/Zotlabs/Storage/Browser.php
index 6f6f4a292..b5c3ac1cf 100644
--- a/Zotlabs/Storage/Browser.php
+++ b/Zotlabs/Storage/Browser.php
@@ -173,6 +173,7 @@ class Browser extends DAV\Browser\Plugin {
$displayName = $this->escapeHTML($displayName);
$type = $this->escapeHTML($type);
+
$icon = '';
if ($this->enableAssets) {
@@ -196,12 +197,28 @@ class Browser extends DAV\Browser\Plugin {
}
}
+ $photo_icon = '';
+
+ if(strpos($type,'image/') === 0 && $attachHash) {
+ $r = q("select resource_id, imgscale from photo where resource_id = '%s' and imgscale in ( %d, %d ) order by imgscale asc limit 1",
+ dbesc($attachHash),
+ intval(PHOTO_RES_320),
+ intval(PHOTO_RES_PROFILE_80)
+ );
+ if($r) {
+ $photo_icon = $r[0]['resource_id'] . '-' . $r[0]['imgscale'];
+ }
+ }
+
+
+
$attachIcon = ""; // "<a href=\"attach/".$attachHash."\" title=\"".$displayName."\"><i class=\"fa fa-arrow-circle-o-down\"></i></a>";
// put the array for this file together
$ft['attachId'] = $this->findAttachIdByHash($attachHash);
$ft['fileStorageUrl'] = substr($fullPath, 0, strpos($fullPath, "cloud/")) . "filestorage/" . $this->auth->getCurrentUser();
$ft['icon'] = $icon;
+ $ft['photo_icon'] = $photo_icon;
$ft['attachIcon'] = (($size) ? $attachIcon : '');
// @todo Should this be an item value, not a global one?
$ft['is_owner'] = $is_owner;
@@ -221,6 +238,7 @@ class Browser extends DAV\Browser\Plugin {
$this->server->emit('onHTMLActionsPanel', array($parent, &$output, $path));
}
+
$html .= replace_macros(get_markup_template('cloud.tpl'), array(
'$header' => t('Files') . ": " . $this->escapeHTML($path) . "/",
'$total' => t('Total'),
@@ -230,6 +248,8 @@ class Browser extends DAV\Browser\Plugin {
'$upload' => t('Upload'),
'$is_owner' => $is_owner,
'$parentpath' => $parentpath,
+ '$cpath' => bin2hex(\App::$query_string),
+ '$tiles' => intval($_SESSION['cloud_tiles']),
'$entries' => $f,
'$name' => t('Name'),
'$type' => t('Type'),