From e128ff4e8fa8da9ef7d0225c4e92b28d02155a12 Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Sat, 13 Aug 2016 14:20:41 -0400 Subject: Fixed bug preventing images in root photo album from loading in embedphotos dialog. --- Zotlabs/Module/Embedphotos.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Zotlabs/Module/Embedphotos.php b/Zotlabs/Module/Embedphotos.php index 0dac873c5..000caad60 100644 --- a/Zotlabs/Module/Embedphotos.php +++ b/Zotlabs/Module/Embedphotos.php @@ -40,8 +40,8 @@ class Embedphotos extends \Zotlabs\Web\Controller { } $resource_id = array_pop(explode("/", $href)); $r = q("SELECT obj from item where resource_type = 'photo' and resource_id = '%s' limit 1", - dbesc($resource_id) - ); + dbesc($resource_id) + ); if(!$r) { json_return_and_die(array('errormsg' => 'Error retrieving resource ' . $resource_id, 'status' => false)); } @@ -83,7 +83,7 @@ function embedphotos_widget_album($args) { return ''; if($args['album']) - $album = $args['album']; + $album = (($args['album'] === '/') ? '' : $args['album'] ); if($args['title']) $title = $args['title']; -- cgit v1.2.3 From 125713e9385a485b9b9615c0f016e99954c9cfcf Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Sat, 13 Aug 2016 14:38:13 -0400 Subject: Fix for older photos not being embedded by the embedphotos tool. --- Zotlabs/Module/Embedphotos.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Zotlabs/Module/Embedphotos.php b/Zotlabs/Module/Embedphotos.php index 000caad60..0dc745b0a 100644 --- a/Zotlabs/Module/Embedphotos.php +++ b/Zotlabs/Module/Embedphotos.php @@ -39,7 +39,7 @@ class Embedphotos extends \Zotlabs\Web\Controller { json_return_and_die(array('errormsg' => 'Error retrieving link ' . $href, 'status' => false)); } $resource_id = array_pop(explode("/", $href)); - $r = q("SELECT obj from item where resource_type = 'photo' and resource_id = '%s' limit 1", + $r = q("SELECT obj,body from item where resource_type = 'photo' and resource_id = '%s' limit 1", dbesc($resource_id) ); if(!$r) { @@ -50,7 +50,9 @@ class Embedphotos extends \Zotlabs\Web\Controller { $photolink = $obj['body']; } elseif (x($obj,'bbcode')) { $photolink = $obj['bbcode']; - } else { + } elseif ($r[0]['body'] !== '') { + $photolink = $r[0]['body']; + } else { json_return_and_die(array('errormsg' => 'Error retrieving resource ' . $resource_id, 'status' => false)); } json_return_and_die(array('status' => true, 'photolink' => $photolink)); -- cgit v1.2.3 From 2755c74c29d5c2cd7aca4ec0159dd2cc5fb41f9a Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sun, 14 Aug 2016 11:31:00 +0200 Subject: btn/dropdown rendering issue --- view/tpl/profile_advanced.tpl | 54 ++++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/view/tpl/profile_advanced.tpl b/view/tpl/profile_advanced.tpl index 947bdd51c..59490ccc1 100755 --- a/view/tpl/profile_advanced.tpl +++ b/view/tpl/profile_advanced.tpl @@ -1,32 +1,38 @@
- -