From 0ced43b90dd19e1250d795ad6da16f81c5cd3e23 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 25 Jun 2019 16:11:22 -0700 Subject: [PATCH] make notes widget fixed height because it still doesn't play well with stickykit and I've wasted too much time trying to bludgeon it into submission. --- Zotlabs/Module/Poster.php | 11 ++++++++--- view/tpl/notes.tpl | 14 +++++++------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/Zotlabs/Module/Poster.php b/Zotlabs/Module/Poster.php index 10317ee61..f1aa2d6b5 100644 --- a/Zotlabs/Module/Poster.php +++ b/Zotlabs/Module/Poster.php @@ -13,25 +13,30 @@ class Poster extends Controller { $nick = argv(1); $hash = argv(2); - if(! ($nick && $hash)) { + if (! ($nick && $hash)) { return; } $u = channelx_by_nick($nick); + if (! $u) { + return; + } + $sql_extra = permissions_sql(intval($u['channel_id'])); $r = q("select content from attach where hash = '%s' and uid = %d and os_storage = 1 $sql_extra limit 1", dbesc($hash), intval($u['channel_id']) ); - if($r) { + if ($r) { $path = dbunescbin($r[0]['content']); - if($path && @file_exists($path . '.thumb')) { + if ($path && @file_exists($path . '.thumb')) { header('Content-Type: image/jpeg'); echo file_get_contents($path . '.thumb'); killme(); } } + killme(); } } diff --git a/view/tpl/notes.tpl b/view/tpl/notes.tpl index c6d5d8a73..300b63430 100644 --- a/view/tpl/notes.tpl +++ b/view/tpl/notes.tpl @@ -1,16 +1,16 @@

{{$banner}}

- +