From 8a11dc0c900e48d3625ad500290d862d5fa64667 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 31 May 2017 20:08:35 -0700 Subject: don't allow negative age in directory listings --- Zotlabs/Module/Directory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Module') diff --git a/Zotlabs/Module/Directory.php b/Zotlabs/Module/Directory.php index edcf43cd6..92c1e0245 100644 --- a/Zotlabs/Module/Directory.php +++ b/Zotlabs/Module/Directory.php @@ -233,7 +233,7 @@ class Directory extends \Zotlabs\Web\Controller { $age = ''; if(strlen($rr['birthday'])) { - if(($years = age($rr['birthday'],'UTC','')) != 0) + if(($years = age($rr['birthday'],'UTC','')) > 0) $age = $years; } -- cgit v1.2.3 From 01b541d8b04e93de8f90c420610c656f6d3e2fb0 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sat, 3 Jun 2017 16:08:08 -0700 Subject: oembed: ensure that width and height are returned as type int and not float --- Zotlabs/Module/Oep.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Module') diff --git a/Zotlabs/Module/Oep.php b/Zotlabs/Module/Oep.php index dc0547a42..9c05f5e3f 100644 --- a/Zotlabs/Module/Oep.php +++ b/Zotlabs/Module/Oep.php @@ -108,7 +108,7 @@ class Oep extends \Zotlabs\Web\Controller { $ret['type'] = 'rich'; $w = (($maxwidth) ? $maxwidth : 640); - $h = (($maxheight) ? $maxheight : $w * 2 / 3); + $h = (($maxheight) ? $maxheight : intval($w * 2 / 3)); $ret['html'] = '
' . $o . '
'; @@ -167,7 +167,7 @@ class Oep extends \Zotlabs\Web\Controller { $ret['type'] = 'rich'; $w = (($maxwidth) ? $maxwidth : 640); - $h = (($maxheight) ? $maxheight : $w * 2 / 3); + $h = (($maxheight) ? $maxheight : intval($w * 2 / 3)); $ret['html'] = '
' . $o . '
'; -- cgit v1.2.3 From 108b052e4eedc8d0002c34802d4a96faee4a7cd6 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 6 Jun 2017 17:38:34 -0700 Subject: hubzilla issue #810 --- Zotlabs/Module/Channel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Module') diff --git a/Zotlabs/Module/Channel.php b/Zotlabs/Module/Channel.php index 61df35a60..98a1e6c88 100644 --- a/Zotlabs/Module/Channel.php +++ b/Zotlabs/Module/Channel.php @@ -217,10 +217,10 @@ class Channel extends \Zotlabs\Web\Controller { else { if(x($category)) { - $sql_extra .= protect_sprintf(term_query('item', $category, TERM_CATEGORY)); + $sql_extra2 .= protect_sprintf(term_item_parent_query(\App::$profile['profile_uid'],'item', $category, TERM_CATEGORY)); } if(x($hashtags)) { - $sql_extra .= protect_sprintf(term_query('item', $hashtags, TERM_HASHTAG, TERM_COMMUNITYTAG)); + $sql_extra2 .= protect_sprintf(term_item_parent_query(\App::$profile['profile_uid'],'item', $hashtags, TERM_HASHTAG, TERM_COMMUNITYTAG)); } if($datequery) { -- cgit v1.2.3